From 999f72684ea687db86bacea5f9a4b814edd424ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Klinkovsk=C3=BD?= Date: Sat, 19 Jun 2021 10:10:46 +0200 Subject: [PATCH] improved documentation for version 1.3 --- docs/index.rst | 26 ++++++++++++++++---------- ws/client/api.py | 4 ++-- ws/db/database.py | 1 + 3 files changed, 19 insertions(+), 12 deletions(-) diff --git a/docs/index.rst b/docs/index.rst index 401ad746..2b8c5f9b 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -43,9 +43,14 @@ Featured scripts updates the interlanguage links based on the ArchWiki's `interlanguage map`_ and fixes categories of local pages. - ``link-checker.py`` - parses all pages on the wiki and tries to fix broken wikilinks, simplify - links over redirects and relative links, and to beautify them based on - ArchWiki's `style recommendations`_. + parses all pages on the wiki and tries to fix various functional and `stylistic`_ + issues with wikilinks, external links and manual page links. +- ``url-replace.py`` + parses all pages on the wiki and performs various replacements on external + link URLs. This functionality is also included in ``link-checker.py``. +- ``extlink-checker.py`` + parses all pages and checks if external links are accessible and marks them + with the `Dead link`_ template if they are clearly broken. - ``statistics.py`` generates automatic updates to the `ArchWiki:Statistics`_ page. - ``toc.py`` @@ -59,13 +64,14 @@ For a full list of available scripts see the `root directory`_ in the git repository. The `examples directory`_ contains less notable notable scripts showing various ways of the core :py:mod:`ws` module usage. -.. _`interlanguage map`: https://wiki.archlinux.org/index.php/Help:I18n -.. _`style recommendations`: https://wiki.archlinux.org/index.php/Help:Style -.. _`ArchWiki:Statistics`: https://wiki.archlinux.org/index.php/ArchWiki:Statistics -.. _`Table of contents`: https://wiki.archlinux.org/index.php/Table_of_contents -.. _`AUR`: https://wiki.archlinux.org/index.php/Template:AUR -.. _`Grp`: https://wiki.archlinux.org/index.php/Template:Grp -.. _`Pkg`: https://wiki.archlinux.org/index.php/Template:Pkg +.. _`interlanguage map`: https://wiki.archlinux.org/title/Help:I18n +.. _`stylistic`: https://wiki.archlinux.org/title/Help:Style +.. _`ArchWiki:Statistics`: https://wiki.archlinux.org/title/ArchWiki:Statistics +.. _`Table of contents`: https://wiki.archlinux.org/title/Table_of_contents +.. _`Dead link`: https://wiki.archlinux.org/title/Template:Dead_link +.. _`AUR`: https://wiki.archlinux.org/title/Template:AUR +.. _`Grp`: https://wiki.archlinux.org/title/Template:Grp +.. _`Pkg`: https://wiki.archlinux.org/title/Template:Pkg .. _`root directory`: https://github.com/lahwaacz/wiki-scripts .. _`examples directory`: https://github.com/lahwaacz/wiki-scripts/blob/master/examples diff --git a/ws/client/api.py b/ws/client/api.py index 07a69d79..1a320625 100644 --- a/ws/client/api.py +++ b/ws/client/api.py @@ -190,8 +190,8 @@ def call_api_autoiter_ids(self, params=None, *, expand_result=True, **kwargs): :py:attr:`API.max_ids_per_query`. Note that this is applicable only to the ``titles``, ``pageids`` and - ``revids`` API parameters which have to be supplied as :py:type:`list` - or :py:type:`set` to this method. Exactly one of these parameters has + ``revids`` API parameters which have to be supplied as :py:class:`!list` + or :py:class:`set` to this method. Exactly one of these parameters has to be supplied. The parameters have the same meaning as those in the diff --git a/ws/db/database.py b/ws/db/database.py index 6626fbac..8ae902a3 100644 --- a/ws/db/database.py +++ b/ws/db/database.py @@ -155,6 +155,7 @@ def sync_revisions_content(self, api, *, mode="latest"): :param ws.client.api.API api: interface to the remote MediaWiki instance :param str mode: the mode of operation: + - `"latest"`: the content of the latest revisions of all pags on the wiki will be synchronized - `"all"`: the content of all revisions will be synchronized