Skip to content

Commit 2e6b2a1

Browse files
committed
Convert to a package using latest Sopel 8+ cookiecutter template
First time I've done this for a plugin not under EFLv2, which threw me for a bit of a loop. Finding the GPLv3 text to paste into COPYING (over top of the template's EFLv2 text) wasn't too hard, though. I *could* relicense the thing, since it's my own damn code, but I also happen to appreciate having some variety in my life.
1 parent cce4b30 commit 2e6b2a1

File tree

8 files changed

+764
-52
lines changed

8 files changed

+764
-52
lines changed

.gitignore

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Byte-compiled / optimized / DLL files
22
__pycache__/
33
*.py[cod]
4-
*$py.class
54

65
# C extensions
76
*.so
@@ -43,51 +42,16 @@ htmlcov/
4342
nosetests.xml
4443
coverage.xml
4544
*,cover
46-
.hypothesis/
4745

4846
# Translations
4947
*.mo
5048
*.pot
5149

5250
# Django stuff:
5351
*.log
54-
local_settings.py
55-
56-
# Flask stuff:
57-
instance/
58-
.webassets-cache
59-
60-
# Scrapy stuff:
61-
.scrapy
6252

6353
# Sphinx documentation
6454
docs/_build/
6555

6656
# PyBuilder
6757
target/
68-
69-
# IPython Notebook
70-
.ipynb_checkpoints
71-
72-
# pyenv
73-
.python-version
74-
75-
# celery beat schedule file
76-
celerybeat-schedule
77-
78-
# dotenv
79-
.env
80-
81-
# virtualenv
82-
venv/
83-
ENV/
84-
85-
# Spyder project settings
86-
.spyderproject
87-
88-
# Rope project settings
89-
.ropeproject
90-
91-
# PyCharm
92-
.idea/
93-

COPYING

Lines changed: 674 additions & 0 deletions
Large diffs are not rendered by default.

MANIFEST.in

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
include NEWS
2+
include COPYING
3+
include README.md
4+
5+
recursive-exclude * __pycache__
6+
recursive-exclude * *.py[co]

NEWS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
## Changelog
2+
3+
### 0.1.0
4+
5+
First packaged release of `sopel-jisho`.

README.md

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,35 @@
11
# sopel-jisho
2-
Sopel plugin that provides search results from the Jisho Japanese/English dictionary
32

4-
This plugin has alpha-level functionality. It can request and display most results, but
5-
may not correctly deal with incomplete API responses (words that have no readings, for
6-
example). That said, anything that doesn't behave as expected should be reported in the
7-
plugin's [issue tracker](https://github.com/dgw/sopel-jisho/issues) if it isn't already
8-
listed there (be sure to **also search closed issues!**).
3+
Sopel plugin to search Jisho.org, a Japanese/English dictionary.
94

10-
Jisho's API is undocumented and subject to change, so there are sure to be edge cases
11-
where the code receives something it doesn't expect. Some of these are handled. Others
12-
aren't...yet. Report problematic queries to the issue tracker.
5+
## Installing
136

14-
## Requirements
15-
The Jisho plugin relies on `requests`, which Sopel itself also requires.
7+
Releases are hosted on PyPI, so after installing Sopel, all you need is `pip`:
168

17-
You will need Sopel 7.1+ to load this plugin.
9+
```shell
10+
$ pip install sopel-jisho
11+
```
12+
13+
### Requirements
14+
15+
`sopel-jisho` requires Sopel 7.1+ and `requests`.
1816

1917
## Usage
2018
Commands & arguments:
2119

2220
* `.jisho <search query>` (also available as `.ji`)
2321
* `<search query>`: the keyword(s) to search for on Jisho
2422

23+
## Notes
24+
25+
This plugin has beta-level functionality. It can search and display most
26+
queries, but may not correctly deal with incomplete API responses (for example,
27+
words that have no readings). That said, anything that doesn't behave as
28+
expected should be reported in the plugin's [issue tracker][] if it isn't
29+
already listed there (be sure to **also search closed issues!**).
30+
31+
Jisho's API is undocumented and subject to change, so there are sure to be edge
32+
cases where the code receives something it doesn't expect. Some of these are
33+
handled. Others aren't…yet. Report problematic queries to the issue tracker.
34+
35+
[issue tracker]: https://github.com/dgw/sopel-jisho/issues

pyproject.toml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
[build-system]
2+
requires = ["setuptools>=63.0", "wheel"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[tool.setuptools]
6+
platforms = ["Linux x86, x86-64"]
7+
8+
[tool.setuptools.packages.find]
9+
include = ["sopel_jisho", "sopel_jisho.*"]
10+
namespaces = false
11+
12+
[tool.setuptools.dynamic]
13+
readme = { file=["README.md", "NEWS"], content-type="text/markdown" }
14+
15+
[project]
16+
name = "sopel-jisho"
17+
version = "0.1.0"
18+
description = "Jisho lookup plugin for Sopel IRC bots."
19+
20+
authors = [
21+
{ name="dgw", email="dgw@technobabbl.es" },
22+
]
23+
24+
license = { text="GPL-3.0" }
25+
dynamic = ["readme"]
26+
27+
classifiers = [
28+
"Development Status :: 4 - Beta",
29+
"Intended Audience :: Developers",
30+
"Intended Audience :: System Administrators",
31+
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
32+
"Topic :: Communications :: Chat :: Internet Relay Chat",
33+
]
34+
keywords = [
35+
"sopel",
36+
"plugin",
37+
"bot",
38+
"irc",
39+
]
40+
41+
requires-python = ">=3.8, <4"
42+
dependencies = [
43+
"sopel>=8.0",
44+
]
45+
46+
[project.urls]
47+
"Homepage" = "https://github.com/dgw/sopel-jisho"
48+
"Bug Tracker" = "https://github.com/dgw/sopel-jisho/issues"
49+
50+
[project.entry-points."sopel.plugins"]
51+
"jisho" = "sopel_jisho.plugin"

sopel_jisho/__init__.py

Whitespace-only changes.

jisho.py renamed to sopel_jisho/plugin.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
"""
2-
jisho.py - Jisho lookup module for Sopel
1+
"""sopel-jisho
2+
3+
Jisho lookup plugin for Sopel IRC bots.
4+
35
Copyright 2016, dgw
46
Licensed under the GPL v3.0 or later
57
"""
6-
7-
from __future__ import unicode_literals
8+
from __future__ import annotations
89

910
from sopel import plugin
1011

0 commit comments

Comments
 (0)