summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorCalum Lind <calumlind+deluge@gmail.com>2019-06-15 19:44:33 +0100
committerCalum Lind <calumlind+deluge@gmail.com>2019-06-15 21:06:27 +0100
commit8b62e50eb8bf81a177c4d62484a44b766c6f54a6 (patch)
tree1d10524d4a28f008dd0a95dfd33afe7773c27345 /docs
parent5b315e90c508c7fb1123d137c82a3c378e4fb69c (diff)
downloaddeluge-8b62e50eb8bf81a177c4d62484a44b766c6f54a6.tar.gz
deluge-8b62e50eb8bf81a177c4d62484a44b766c6f54a6.tar.bz2
deluge-8b62e50eb8bf81a177c4d62484a44b766c6f54a6.zip
[Docs] Add spellchecking with pyenchant
- Use sphinxcontrib.spelling with custom wordlist. - Skip the checking of the modules documents as they raise false-positives. - Add a setup.py spellcheck_docs command. - Fix spelling and other issues. - Add a doc favicon.
Diffstat (limited to 'docs')
-rw-r--r--docs/requirements.txt1
-rw-r--r--docs/source/conf.py14
-rw-r--r--docs/source/contributing/code.md46
-rw-r--r--docs/source/contributing/testing.md6
-rw-r--r--docs/source/contributing/translations.md9
-rw-r--r--docs/source/devguide/how-to/curl-jsonrpc.md18
-rw-r--r--docs/source/devguide/how-to/update-1.3-plugin.md8
-rw-r--r--docs/source/devguide/packaging/launchpad-recipe.md8
-rw-r--r--docs/source/devguide/packaging/release.md6
-rw-r--r--docs/source/how-to/set-mime-type.md20
-rw-r--r--docs/source/intro/01-install.md6
-rw-r--r--docs/source/reference/rpc.rst4
-rw-r--r--docs/source/reference/web.md10
-rw-r--r--docs/source/releases/2.0.md4
-rw-r--r--docs/spelling_wordlist.txt28
15 files changed, 117 insertions, 71 deletions
diff --git a/docs/requirements.txt b/docs/requirements.txt
index ea2d9e329..c8a0d0546 100644
--- a/docs/requirements.txt
+++ b/docs/requirements.txt
@@ -1,3 +1,4 @@
sphinx==2.0.*
recommonmark==0.4.*
sphinx_rtd_theme
+sphinxcontrib-spelling
diff --git a/docs/source/conf.py b/docs/source/conf.py
index 6db6da02a..450e802aa 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -49,6 +49,7 @@ extensions = [
'sphinx.ext.doctest',
'sphinx.ext.napoleon',
'sphinx.ext.coverage',
+ 'sphinxcontrib.spelling',
]
napoleon_include_init_with_doc = True
@@ -85,8 +86,7 @@ today_fmt = '%B %d, %Y'
# List of directories, relative to source directories, that shouldn't be searched
# for source files.
-# exclude_dirs = []
-# exclude_patterns = []
+exclude_patterns = []
# The reST default role (used for this markup: `text`) to use for all documents.
# default_role = None
@@ -106,6 +106,14 @@ today_fmt = '%B %d, %Y'
pygments_style = 'sphinx'
+# Options for spelling
+# --------------------
+spelling_show_suggestions = True
+spelling_word_list_filename = '../spelling_wordlist.txt'
+# Skip Deluge module rst files
+if 'spelling' in sys.argv or 'spellcheck_docs' in sys.argv:
+ exclude_patterns += ['modules']
+
# Options for HTML output
# -----------------------
html_theme = 'sphinx_rtd_theme'
@@ -132,7 +140,7 @@ html_css_files = [
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
-# html_favicon = None
+html_favicon = '../../deluge/ui/data/pixmaps/deluge.ico'
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
diff --git a/docs/source/contributing/code.md b/docs/source/contributing/code.md
index 9fdf85425..1148d7646 100644
--- a/docs/source/contributing/code.md
+++ b/docs/source/contributing/code.md
@@ -5,13 +5,13 @@
- A [new ticket](http://dev.deluge-torrent.org/newticket) is required for bugs
or features. Search the ticket system first, to avoid filing a duplicate.
- Ensure code follows the [syntax and conventions](#syntax-and-conventions).
-- Code must pass tests. See [testing.md] for
+- Code must pass tests. See [testing](testing.md) document for
information on how to run and write unit tests.
- Commit messages are informative.
## Pull request process:
-- Fork us on [github](https://github.com/deluge-torrent/deluge).
+- Fork us on [GitHub](https://github.com/deluge-torrent/deluge).
- Clone your repository.
- Create a feature branch for your issue.
- Apply your changes:
@@ -19,16 +19,16 @@
- Run the tests until they pass.
- When you feel you are finished, rebase your commits to ensure a simple
and informative commit log.
-- Create a pull request on github from your forked repository.
+- Create a pull request on GitHub from your forked repository.
- Verify that the tests run by [Travis-ci](https://travis-ci.org/deluge-torrent/deluge)
are passing.
## Syntax and conventions
-### Code formatters
+### Code formatting
We use two applications to automatically format the code to save development
-time. They are both run with pre-commit.
+time. They are both run with [pre-commit].
#### Black
@@ -36,7 +36,7 @@ time. They are both run with pre-commit.
#### Prettier
-- Javascript
+- JavaScript
- CSS
- YAML
- Markdown
@@ -51,32 +51,32 @@ time. They are both run with pre-commit.
We follow [PEP8](http://www.python.org/dev/peps/pep-0008/) and
[Python Code Style](http://docs.python-guide.org/en/latest/writing/style/)
-which is adhered to with Black formatter.
+which is adhered to with [Black].
-- Code '''must''' pass [flake8](https://pypi.python.org/pypi/flake8) (w/[https://pypi.python.org/pypi/flake8-quotes flake8-quotes]), [https://pypi.python.org/pypi/isort isort] and [http://www.pylint.org/ Pylint] source code checkers.
+- Code '''must''' pass [Black], [flake8] and [isort] source code checkers.
+ (Optionally [Pylint])
- flake8 deluge
- isort -rc -df deluge
- pylint deluge
- pylint deluge/plugins/\*/deluge/
+ flake8 deluge
+ isort -rc -df deluge
+ pylint deluge
+ pylint deluge/plugins/\*/deluge/
-- Using the [http://pre-commit.com/ pre-commit] app can aid in picking up
- issues before creating git commits.
+- Using the [pre-commit] app can aid in identifying issues while creating git commits.
#### Strings and bytes
To prevent bugs or errors in the code byte strings (`str`) must be decoded to
-strings (unicode strings, `unicode`) on input and then encoded on output.
+strings (Unicode text strings, `unicode`) on input and then encoded on output.
_Notes:_
-- PyGTK/GTK+ will accept `str` (utf8 encoded) or `unicode` but will only return
- `str`. See [http://python-gtk-3-tutorial.readthedocs.org/en/latest/unicode.html GTK+ Unicode] docs.
+- PyGTK/GTK+ will accept `str` (UTF-8 encoded) or `unicode` but will only return
+ `str`. See [GTK3 Unicode] docs.
- There is a `bytearray` type which enables in-place modification of a string.
See [Python Bytearrays](http://stackoverflow.com/a/9099337/175584)
- Python 3 renames `unicode` to `str` type and byte strings become `bytes` type.
-### Javascript
+### JavaScript
- Classes should follow the Ext coding style.
- Class names should be in !CamelCase
@@ -108,8 +108,16 @@ Google Style example:
"""
return
-See complete list of [http://www.sphinx-doc.org/en/master/usage/extensions/napoleon.html#docstring-sections supported headers].
+See complete list of [supported headers][napoleon sections].
Verify that the documentation parses correctly with:
python setup.py build_docs
+
+[pre-commit]: http://pre-commit.com/
+[flake8]: https://pypi.python.org/pypi/flake8
+[isort]: https://pypi.python.org/pypi/isort
+[pylint]: http://www.pylint.org/
+[black]: https://github.com/python/black/
+[gtk3 unicode]: http://python-gtk-3-tutorial.readthedocs.org/en/latest/unicode.html
+[napoleon sections]: http://www.sphinx-doc.org/en/master/usage/extensions/napoleon.html#docstring-sections
diff --git a/docs/source/contributing/testing.md b/docs/source/contributing/testing.md
index b77cf5128..1f511245a 100644
--- a/docs/source/contributing/testing.md
+++ b/docs/source/contributing/testing.md
@@ -36,7 +36,7 @@ Running the tests for a specific plugin (requires [pytest](https://pypi.python.o
## Tox
-All the tests for Deluge can be run using [tox](https://pypi.python.org/pypi/tox)
+All the tests for Deluge can be run using [Tox](https://pypi.python.org/pypi/tox)
#### See available targets:
@@ -54,10 +54,10 @@ All the tests for Deluge can be run using [tox](https://pypi.python.org/pypi/tox
tox -e lint
-## Travis-ci
+## Travis CI
Deluge develop branch is tested automatically by [Travis].
-When creating a pull request (PR) on [github], Travis will be automatically run
+When creating a pull request (PR) on [GitHub], Travis will be automatically run
the unit tests with the code in the PR.
[travis]: https://travis-ci.org/deluge-torrent/deluge
diff --git a/docs/source/contributing/translations.md b/docs/source/contributing/translations.md
index bbb36bb9d..fa32d827d 100644
--- a/docs/source/contributing/translations.md
+++ b/docs/source/contributing/translations.md
@@ -16,7 +16,7 @@ For GTK the text can also be marked translatable in the `glade/*.ui` files:
<property name="label" translatable="yes">Max Upload Speed:</property>
-For more details see: [http://docs.python.org/library/gettext.html Python Gettext]
+For more details see: [Python Gettext]
## Translation process
@@ -35,13 +35,13 @@ These are the overall stages in gettext translation:
- The binary `MO` files for each language are generated by `setup.py`
using the `msgfmt.py` script.
-To enable WebUI to use translations update `gettext.js` by running `gen_gettext.py` script.
+To enable Web UI to use translations update `gettext.js` by running `gen_gettext.py` script.
## Useful applications
- [podiff](http://puszcza.gnu.org.ua/projects/podiff/) - Compare textual information in two PO files
-- [gtranslator](http://projects.gnome.org/gtranslator/) - GUI po file editor
-- [Poedit](http://www.poedit.net/) - GUI po file editor
+- [gtranslator](http://projects.gnome.org/gtranslator/) - GUI PO file editor
+- [Poedit](http://www.poedit.net/) - GUI PO file editor
## Testing translation
@@ -63,3 +63,4 @@ will only translate based on the `MO` files for Deluge so some GTK
text/button strings will remain in English.
[launchpad translations]: https://translations.launchpad.net/deluge/
+[python gettext]: http://docs.python.org/library/gettext.html
diff --git a/docs/source/devguide/how-to/curl-jsonrpc.md b/docs/source/devguide/how-to/curl-jsonrpc.md
index a89091141..0d39c5813 100644
--- a/docs/source/devguide/how-to/curl-jsonrpc.md
+++ b/docs/source/devguide/how-to/curl-jsonrpc.md
@@ -1,8 +1,8 @@
# How to connect to JSON-RPC with curl
-Before continuing make sure deluge-web or webui plugin is running.
+Before continuing make sure `deluge-web` or Web UI plugin is running.
-## Create a curl config
+## Create a curl configuration file
To save a lot of typing and to keep the curl command short we shall create
a `curl.cfg` files and put the following contents in it:
@@ -16,11 +16,11 @@ a `curl.cfg` files and put the following contents in it:
url = "http://localhost:8112/json"
write-out = "\n"
-To pretty-print the JSON result see: https://stackoverflow.com/q/352098/175584
+To pretty-print the JSON result see: <https://stackoverflow.com/q/352098/175584>
-## Login to WebUI
+## Login to Web UI
-Login to the WebUI and get session cookie:
+Login to the Web UI and get session cookie:
curl -d '{"method": "auth.login", "params": ["deluge"], "id": 1}' -K curl.cfg
@@ -43,12 +43,12 @@ Check the contents of the cookie file to verify session ID created.
## Check connected to deluged
-Use the `web.connected` method to get a boolean response if the webui is
+Use the `web.connected` method to get a boolean response if the Web UI is
connected to a deluged host:
curl -d '{"method": "web.connected", "params": [], "id": 1}' -K curl.cfg
-Result is `false` because WebUI is not yet connected to the daemon:
+Result is `false` because Web UI is not yet connected to the daemon:
{
"error": null,
@@ -101,7 +101,7 @@ To connect to deluged with `<hostID>`:
curl -d '{"method": "web.connect", \
"params": ["<hostID>"], "id": 1}' -K curl.cfg
-The result contains the full list of avaiable host methods:
+The result contains the full list of available host methods:
{
"error": null,
@@ -148,7 +148,7 @@ A successful result:
{"error": null, "result": null, "id": 1}
-## Useful curl config options
+## Useful curl configuration options
For full list of options see man page `man curl` or help `curl --help`:
diff --git a/docs/source/devguide/how-to/update-1.3-plugin.md b/docs/source/devguide/how-to/update-1.3-plugin.md
index 99cc9fc32..6374a0c0d 100644
--- a/docs/source/devguide/how-to/update-1.3-plugin.md
+++ b/docs/source/devguide/how-to/update-1.3-plugin.md
@@ -27,7 +27,7 @@ Use [six] to assist with compatibility.
### Unicode literals
-Add the following to files to ensure strings and bytes separatation so there
+Add the following to files to ensure strings and bytes separation so there
are no surprises when running on Python 3.
from __future__ import unicode_literals
@@ -49,7 +49,7 @@ GtkBuilder `.ui` files and the Python code updated.
See the official [Migrating to GtkBuilder][migrate-gtkbuilder] document for more details.
-#### gtk-builder-convert
+#### GtkBuilder conversion script
Install the `gtk-builder-convert` converter on Ubuntu with:
@@ -103,7 +103,7 @@ If you open and save the file it will update with the new requirement header:
<requires lib="gtk+" version="3.10"/>
You can fix deprecated widgets but keep the minimum GTK version to <= 3.10 for
-desktop compatiblity.
+desktop compatibility.
An example of migrating a Deluge plugin to GtkBuilder: [AutoAdd GtkBuilder]
@@ -111,7 +111,7 @@ An example of migrating a Deluge plugin to GtkBuilder: [AutoAdd GtkBuilder]
Move from PyGTK to GTK3 using Python bindings.
-https://pygobject.readthedocs.io/en/latest/guide/porting.html
+<https://pygobject.readthedocs.io/en/latest/guide/porting.html>
wget https://gitlab.gnome.org/GNOME/pygobject/raw/master/tools/pygi-convert.sh
cp gtkui.py gtk3ui.py
diff --git a/docs/source/devguide/packaging/launchpad-recipe.md b/docs/source/devguide/packaging/launchpad-recipe.md
index 7494cb934..7d487273c 100644
--- a/docs/source/devguide/packaging/launchpad-recipe.md
+++ b/docs/source/devguide/packaging/launchpad-recipe.md
@@ -1,15 +1,15 @@
# Launchpad recipe
The launchpad build recipes are for build from source automatically to provide
-ubuntu packages. They are used to create daily builds of a git repo branch.
+Ubuntu packages. They are used to create daily builds of a Deluge git branch.
Note these don't have the same control as a creating a publishing to PPA.
-Main reference: https://help.launchpad.net/Packaging/SourceBuilds/Recipes
+Main reference: <https://help.launchpad.net/Packaging/SourceBuilds/Recipes>
-## Deluge launchpad build recipes
+## Deluge Launchpad build recipes
-Recipe configuration: https://code.launchpad.net/~deluge-team/+recipes
+Recipe configuration: <https://code.launchpad.net/~deluge-team/+recipes>
An example for building the develop branch:
diff --git a/docs/source/devguide/packaging/release.md b/docs/source/devguide/packaging/release.md
index 74dfdce6f..8fd9af5c7 100644
--- a/docs/source/devguide/packaging/release.md
+++ b/docs/source/devguide/packaging/release.md
@@ -1,6 +1,6 @@
# Release Checklist
-## Pre-Release
+## Pre-release
- Update [translation] `po` files from [Launchpad] account.
- Changelog is updated with relevant commits and release date is added.
@@ -30,9 +30,9 @@
- Change release version in `version` files.
- Run `trigger-deluge` to sync OSUOSL ftp site.
- Create packages (Ubuntu, Windows, OSX).
- - Ubuntu: https://code.launchpad.net/~deluge-team/+recipe/stable-releases
+ - Ubuntu: <https://code.launchpad.net/~deluge-team/+recipe/stable-releases>
-## Post-Release
+## Post-release
- Update with version, hashes and release notes:
- Publish docs on [ReadTheDocs].
diff --git a/docs/source/how-to/set-mime-type.md b/docs/source/how-to/set-mime-type.md
index 7d5ebd8bd..29bad15f4 100644
--- a/docs/source/how-to/set-mime-type.md
+++ b/docs/source/how-to/set-mime-type.md
@@ -1,24 +1,24 @@
# How to set Deluge as default torrent application
-## Check registered mime types
+## Check registered MIME types
-gio mime application/x-bittorrent
-gio mime x-scheme-handler/magnet
+ gio mime application/x-bittorrent
+ gio mime x-scheme-handler/magnet
-## Set Deluge as default mime
+## Set Deluge as default for MIME types
-gio mime x-scheme-handler/magnet deluge.desktop
-gio mime application/x-bittorrent deluge.desktop
+ gio mime x-scheme-handler/magnet deluge.desktop
+ gio mime application/x-bittorrent deluge.desktop
## Troubleshooting
-update-mime-database ~/.local/share/mime
-update-desktop-database ~/.local/share/applications
+ update-mime-database ~/.local/share/mime
+ update-desktop-database ~/.local/share/applications
### XDG Check
-xdg-mime query default x-scheme-handler/magnet
+ xdg-mime query default x-scheme-handler/magnet
## References
-https://help.gnome.org/admin/system-admin-guide/stable/mime-types-custom-user.html.en
+<https://help.gnome.org/admin/system-admin-guide/stable/mime-types-custom-user.html.en>
diff --git a/docs/source/intro/01-install.md b/docs/source/intro/01-install.md
index bbfe846eb..9d7ab1a9a 100644
--- a/docs/source/intro/01-install.md
+++ b/docs/source/intro/01-install.md
@@ -24,14 +24,14 @@ Install with pip:
## <i class="fa fa-windows"></i> Windows
-Unfortuately due to move to GTK3 and Python 3 there is no installer package currently
+Unfortunately due to move to GTK3 and Python 3 there is no installer package currently
available for Windows.
-Intrepid users can install Deluge from seperate packages as detailed in [issue #3201].
+Intrepid users can install Deluge from separate packages as detailed in [issue #3201].
## <i class="fa fa-apple"></i> macOS
-There is no `.app` package currently for macOS, but can try Deluge with homebrew.
+There is no `.app` package currently for macOS, but can try Deluge with [Homebrew].
1. Install [Homebrew]
2. Open a terminal.
diff --git a/docs/source/reference/rpc.rst b/docs/source/reference/rpc.rst
index 95b5ecbee..7454bd2c3 100644
--- a/docs/source/reference/rpc.rst
+++ b/docs/source/reference/rpc.rst
@@ -5,8 +5,8 @@ Message Formats
---------------
DelugeRPC is a protocol used for daemon/client communication. There are four
types of messages involved in the protocol: RPC Request, RPC Response,
-RPC Error and Event. All messages are zlib compressed rencoded strings and
-their data formats are detailed below.
+RPC Error and Event. All messages are zlib compressed with rencode encoded strings
+and their data formats are detailed below.
"""""""""""
RPC Request
diff --git a/docs/source/reference/web.md b/docs/source/reference/web.md
index a91d85173..f0471ce47 100644
--- a/docs/source/reference/web.md
+++ b/docs/source/reference/web.md
@@ -1,7 +1,7 @@
# Deluge Web UI
The Deluge web interface is a full featured interface built using the ExtJS framework,
-running on top of a Twisted webserver.
+running on top of a Twisted web server.
## SSL Configuration
@@ -23,15 +23,15 @@ Sample guide: [How to Create a SSL Certificate][ssl cert]
### Enable Web UI SSL
-There are two ways to enable SSL encryption in the webserver:
+There are two ways to enable SSL encryption in the web server:
- Specify in your config (accessible via the Preferences window).
-- Use `--ssl` when running the webserver, overriding the configuration value to enable SSL.
+- Use `--ssl` when running the web server, overriding the configuration value to enable SSL.
## Enable Development mode
-Add `?dev=true` to the webui url to enable development mode, uses the source js files
-(if available) rather than compressed versions:
+Append `?dev=true` to the Web UI URL to enable development mode, uses the source
+JavaScript files (if available) rather than compressed versions:
http://127.0.0.1:8112/?dev=true
diff --git a/docs/source/releases/2.0.md b/docs/source/releases/2.0.md
index 890394af5..145171c9f 100644
--- a/docs/source/releases/2.0.md
+++ b/docs/source/releases/2.0.md
@@ -17,7 +17,7 @@ Some of the highlights since the last major release.
- Language switching support.
- Improved documentation hosted on ReadTheDocs.
- AutoAdd plugin replaces built-in functionality.
-- WebUI now daemonizes by default so service scripts will require `-d` option.
+- Web UI now daemonizes by default so service scripts will require `-d` option.
## Packaging
@@ -26,7 +26,7 @@ Some of the highlights since the last major release.
As well as the usual source tarball available for [download] we now have published
Deluge on the PyPi software repository.
-- https://pypi.org/project/deluge/
+- <https://pypi.org/project/deluge/>
### Windows and MacOS
diff --git a/docs/spelling_wordlist.txt b/docs/spelling_wordlist.txt
new file mode 100644
index 000000000..0673c588e
--- /dev/null
+++ b/docs/spelling_wordlist.txt
@@ -0,0 +1,28 @@
+Changelog
+tooltip
+Gtk
+libglade
+Wayland
+macOS
+codebase
+unmanaged
+rebase
+formatter
+camelCase
+docstring
+docstrings
+Pytest
+Tox
+pre
+Blocklist
+boolean
+daemonizes
+daemonize
+config
+Trac
+runtime
+codec
+auth
+hostlist
+hostname
+filesystem