Skip to content

Commit

Permalink
Convert to package & release official "Version 1.0.0"
Browse files Browse the repository at this point in the history
Also beefed up the readme, because it really looks bad to publish a
whole-ass package with no usage info.
  • Loading branch information
dgw committed Dec 16, 2022
1 parent 4515605 commit f290913
Show file tree
Hide file tree
Showing 8 changed files with 176 additions and 3 deletions.
57 changes: 57 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]

# C extensions
*.so

# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*,cover

# Translations
*.mo
*.pot

# Django stuff:
*.log

# Sphinx documentation
docs/_build/

# PyBuilder
target/
23 changes: 23 additions & 0 deletions COPYING
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

Eiffel Forum License, version 2

1. Permission is hereby granted to use, copy, modify and/or
distribute this package, provided that:
* copyright notices are retained unchanged,
* any distribution of this package, whether modified or not,
includes this license text.
2. Permission is hereby also granted to distribute binary programs
which depend on this package. If the binary program depends on a
modified version of this package, you are encouraged to publicly
release the modified version of this package.

***********************

THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT WARRANTY. ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE TO ANY PARTY FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THIS PACKAGE.

***********************
6 changes: 6 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
include NEWS
include COPYING
include README.md

recursive-exclude * __pycache__
recursive-exclude * *.py[co]
4 changes: 4 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
1.0.0
=====

First official release, converted from single .py file to package.
34 changes: 34 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,37 @@ Sopel plugin to generate "Spongemock" text (based on *that* SpongeBob meme)
## Requirements

Only [Sopel](https://github.com/sopel-irc/sopel) itself.

## Installation

```sh
pip install sopel-spongemock
```

## Usage

```
.spongemock <nick>|<text>
or
.smock <nick>|<text>
```

If a single word is passed, the command will first check if that nick has said
anything in the channel recently, and will mock their last message if so.

Any input that does not match a known user's nick will be mocked directly.

### Examples

```
<dgw> .smock Free speech!
<Sopel> fREe SpEEcH
```

```
<dgw> I'm something of a Pythonista myself
<ziro> .smock dgw
<Sopel> i'M soMeThiNg oF a pYtHOnIsTA mySElf
```
25 changes: 25 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[metadata]
name = sopel-spongemock
version = 1.0.0
description = Sopel plugin to generate "Spongemock" text (based on *that* SpongeBob meme)
author = dgw
author_email = dgw@technobabbl.es
url = https://github.com/dgw/sopel-spongemock
license = Eiffel Forum License, version 2
classifiers =
Intended Audience :: Developers
Intended Audience :: System Administrators
License :: Eiffel Forum License (EFL)
License :: OSI Approved :: Eiffel Forum License
Topic :: Communications :: Chat :: Internet Relay Chat

[options]
packages = find:
zip_safe = false
include_package_data = true
install_requires =
sopel>=7.0,<9

[options.entry_points]
sopel.plugins =
spongemock = sopel_spongemock
25 changes: 25 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# -*- coding: utf-8 -*-
from __future__ import print_function
import os
import sys
from setuptools import setup, find_packages


if __name__ == '__main__':
print('Sopel does not correctly load plugins installed with setup.py '
'directly. Please use "pip install .", or add '
'{}/sopel_spongemock to core.extra in your config.'
.format(os.path.dirname(os.path.abspath(__file__))),
file=sys.stderr)

with open('README.md') as readme_file:
readme = readme_file.read()

with open('NEWS') as history_file:
history = history_file.read()


setup(
long_description=readme + '\n\n' + history,
long_description_content_type='text/markdown',
)
5 changes: 2 additions & 3 deletions spongemock.py → sopel_spongemock/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# coding=utf8
"""
spongemock.py - Sopel "Mocking SpongeBob" Plugin
"""sopel-spongemock - Sopel "Mocking SpongeBob" Plugin
Copyright 2020 dgw, technobabbl.es
Copyright 2020-2022 dgw, technobabbl.es
"""
from __future__ import print_function, division, unicode_literals, absolute_import

Expand Down

0 comments on commit f290913

Please sign in to comment.