jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/779851 )
Change subject: [IMPR] Implement a new and easier color format for Pywikibot
......................................................................
[IMPR] Implement a new and easier color format for Pywikibot
The old color format is like 'this is a \03{green}colored\03{default} text'.
With Python 3 curly brackets are parts of the default format string. Using
it needs strings like
'this is a \03{{green}}{color}colored\03{{default}} text'
.format(color='red')
which needs double brackets.
A color_format method was introduced to omit the \03 escape sequence which
allows strings like
color_format('this is a {green}{col} colored{default} text', col='red')
but be aware the 'color' key is reserved for a color key and will be
escaped then. In short: it is not very helpful to simplify colored text
because each string must be passed through that function.
Now a new color pattern is implemented which can be used directly with output
methods and does not bother any format string. The sample above can be
written like
'this is a <<green>>{color} colored<<default>> text'.format(color='red')
The advantages are
- the escape sequence \03{...} is replaced by <<...>>
- the color_format method will be deprecated, there is no benefit to
keep it.
- the old and new implementation will be supported both for a while
but must not be mixed in the same output statement
- a usage sample is made in pwb.py
Change-Id: I5bfcaac8ef12a65dab1a2515809373633e1706b1
---
M pwb.py
M pywikibot/userinterfaces/terminal_interface_base.py
2 files changed, 15 insertions(+), 10 deletions(-)
Approvals:
Xqt: Looks good to me, approved
Matěj Suchánek: Looks good to me, but someone else must approve
jenkins-bot: Verified
diff --git a/pwb.py b/pwb.py
index 5e9d14a..6fddcec 100755
--- a/pwb.py
+++ b/pwb.py
@@ -293,7 +293,6 @@
"""Search for similar filenames in the given script paths."""
from pywikibot import config, input_choice, output
from pywikibot.bot import QuitKeyboardInterrupt, ShowingListOption
- from pywikibot.tools.formatter import color_format
assert config.pwb_close_matches > 0, \
'config.pwb_close_matches must be greater than 0'
@@ -324,11 +323,10 @@
if len(similar_scripts) == 1:
script = similar_scripts[0]
wait_time = config.pwb_autostart_waittime
- output(color_format(
- 'NOTE: Starting the most similar script '
- '{lightyellow}{0}.py{default}\n'
- ' in {1} seconds; type CTRL-C to stop.',
- script, wait_time))
+ output('NOTE: Starting the most similar script '
+ '<<lightyellow>>{}.py<<default>>\n'
+ ' in {} seconds; type CTRL-C to stop.'
+ .format(script, wait_time))
try:
sleep(wait_time) # Wait a bit to let it be cancelled
except KeyboardInterrupt:
diff --git a/pywikibot/userinterfaces/terminal_interface_base.py b/pywikibot/userinterfaces/terminal_interface_base.py
index 9a9b443..0444206 100644
--- a/pywikibot/userinterfaces/terminal_interface_base.py
+++ b/pywikibot/userinterfaces/terminal_interface_base.py
@@ -50,9 +50,9 @@
'white',
]
-_color_pat = '{}|previous'.format('|'.join(colors))
-colorTagR = re.compile('\03{{((:?{cpat});?(:?{cpat})?)}}'
- .format(cpat=_color_pat))
+_color_pat = '((:?{0});?(:?{0})?)'.format('|'.join(colors + ['previous']))
+old_colorTagR = re.compile('\03{{{cpat}}}'.format(cpat=_color_pat))
+new_colorTagR = re.compile('<<{cpat}>>'.format(cpat=_color_pat))
class UI(ABUIC):
@@ -195,7 +195,14 @@
# Color tags might be cascaded, e.g. because of transliteration.
# Therefore we need this stack.
color_stack = ['default']
- text_parts = colorTagR.split(text) + ['default']
+ old_parts = old_colorTagR.split(text)
+ new_parts = new_colorTagR.split(text)
+ if min(len(old_parts), len(new_parts)) > 1:
+ raise ValueError('Old color format must not be mixed with new '
+ 'color format. Found:\n'
+ + text.replace('\03', '\\03'))
+ text_parts = old_parts if len(old_parts) > 1 else new_parts
+ text_parts += ['default']
# match.split() includes every regex group; for each matched color
# fg_col:b_col, fg_col and bg_col are added to the resulting list.
len_text_parts = len(text_parts[::4])
--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/779851
To unsubscribe, or for help writing mail filters, visit https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I5bfcaac8ef12a65dab1a2515809373633e1706b1
Gerrit-Change-Number: 779851
Gerrit-PatchSet: 16
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Matěj Suchánek <matejsuchanek97(a)gmail.com>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged
jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/776176 )
Change subject: [IMPR] Port CommonsDelinker to core
......................................................................
[IMPR] Port CommonsDelinker to core
This is an initial rewrite of compat's CommonsDelinker.
It reads the local deletion log and shared repository deletion log and
delinks local references.
Also backport image_regex to image.py
Bug: T299563
Change-Id: Ib7b7405115b485d4f404aedecc0146bb30c21468
---
M docs/scripts/unsorted.rst
M docs/scripts_ref/scripts.rst
M scripts/README.rst
A scripts/delinker.py
M scripts/image.py
M tests/script_tests.py
6 files changed, 181 insertions(+), 2 deletions(-)
Approvals:
Rubin: Looks good to me, but someone else must approve
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/docs/scripts/unsorted.rst b/docs/scripts/unsorted.rst
index ec81ef4..f7686d2 100644
--- a/docs/scripts/unsorted.rst
+++ b/docs/scripts/unsorted.rst
@@ -19,6 +19,11 @@
.. automodule:: scripts.coordinate_import
:no-members:
+delinker script
+---------------
+.. automodule:: scripts.delinker
+ :no-members:
+
djvutext script
---------------
.. automodule:: scripts.djvutext
diff --git a/docs/scripts_ref/scripts.rst b/docs/scripts_ref/scripts.rst
index b40ab91..d4c262d 100644
--- a/docs/scripts_ref/scripts.rst
+++ b/docs/scripts_ref/scripts.rst
@@ -97,6 +97,11 @@
.. automodule:: scripts.delete
+delinker script
+---------------
+
+.. automodule:: scripts.delinker
+
djvutext script
---------------
.. automodule:: scripts.djvutext
diff --git a/scripts/README.rst b/scripts/README.rst
index d8311a4..7282cc6 100644
--- a/scripts/README.rst
+++ b/scripts/README.rst
@@ -58,6 +58,8 @@
+------------------------+---------------------------------------------------------+
| delete.py | This script can be used to delete pages en masse. |
+------------------------+---------------------------------------------------------+
+ | delinker.py | Delink file references of deleted images. |
+ +------------------------+---------------------------------------------------------+
| djvutext.py | Extracts OCR text from djvu files and uploads onto |
| | pages in the "Page" namespace on Wikisource. |
+------------------------+---------------------------------------------------------+
diff --git a/scripts/delinker.py b/scripts/delinker.py
new file mode 100644
index 0000000..9ee7e59
--- /dev/null
+++ b/scripts/delinker.py
@@ -0,0 +1,165 @@
+#!/usr/bin/python3
+"""Delink removed files from wiki.
+
+This script keeps track of image deletions and delinks removed files
+from current wiki in namespace 0. This script is suitable to delink
+files from a image repository as well as for local images.
+
+The following parameters are supported:
+
+-exclude: If the deletion log contains this pattern, the file is not
+ delinked (default is 'no-delink').
+
+-localonly Retrieve deleted File pages from local log only
+
+-since: Start the deletion log with this timestamp given in MediaWiki
+ timestamp format. If no `-since` option is given, the start
+ timestamp is read from setting file. If the option is empty,
+ the processing starts from the very beginning. If the script
+ stops, the last timestamp is written to the settings file and
+ the next script call starts there if no `-since` is given.
+
+.. note:: This sample script is a
+ :class:`ConfigParserBot <pywikibot.bot.ConfigParserBot>`. All
+ settings can be made either by giving option with the command line or
+ with a settings file which is scripts.ini by default. If you don't
+ want the default values you can add any option you want to change to
+ that settings file below the [delinker] section like.
+
+.. versionadded:: 7.2
+ This script is completely rewriten from compat branch.
+"""
+#
+# (C) Pywikibot team, 2006-2022
+#
+# Distributed under the terms of the MIT license.
+#
+import configparser
+import heapq
+import re
+
+import pywikibot
+from pywikibot.backports import removeprefix
+from pywikibot.bot import (
+ ConfigParserBot,
+ AutomaticTWSummaryBot,
+ SingleSiteBot,
+ calledModuleName,
+)
+from pywikibot.textlib import case_escape, ignore_case, replaceExcept
+from pywikibot.tools.formatter import color_format
+
+
+class CommonsDelinker(SingleSiteBot, ConfigParserBot, AutomaticTWSummaryBot):
+
+ """Bot to delink deleted images."""
+
+ update_options = {
+ 'exclude': 'no-delink',
+ 'localonly': False,
+ 'since': '',
+ }
+ summary_key = 'delinker-delink'
+
+ @property
+ def generator(self):
+ """Read deletion logs and yield the oldest entry first."""
+ ts = (pywikibot.Timestamp.fromtimestampformat(self.opt.since)
+ if self.opt.since else None)
+ params = {
+ 'logtype': 'delete',
+ 'namespace': 6,
+ 'reverse': True,
+ 'start': ts,
+ }
+
+ iterables = [self.site.logevents(**params)]
+ repo = self.site.image_repository() if not self.opt.localonly else None
+ if repo:
+ iterables.append(repo.logevents(**params))
+
+ for entry in heapq.merge(*iterables,
+ key=lambda event: event.timestamp()):
+ self.last_ts = entry.timestamp()
+ if entry['action'] == 'delete' \
+ and self.opt.exclude not in entry.get('comment', ''):
+ yield entry
+
+ def init_page(self, item) -> 'pywikibot.page.FilePage':
+ """Upcast logevent to FilePage and combine edit summary."""
+ self.summary_parameters = dict(item)
+ return pywikibot.FilePage(self.site, item['title'])
+
+ def skip_page(self, page) -> bool:
+ """Skip pages which neither exists locally nor on shared repository."""
+ pywikibot.output('.', newline=False)
+ if page.file_is_shared() or page.exists():
+ return True
+ return super().skip_page(page)
+
+ def treat(self, file_page):
+ """Set page to current page and delink that page."""
+ # use image_regex from image.py
+ namespace = file_page.site.namespaces[6]
+ escaped = case_escape(namespace.case, file_page.title(with_ns=False))
+ # Be careful, spaces and _ have been converted to '\ ' and '\_'
+ escaped = re.sub('\\\\[_ ]', '[_ ]', escaped)
+ self.image_regex = re.compile(
+ r'\[\[ *(?:{})\s*:\s*{} *(?P<parameters>\|'
+ r'(?:[^\[\]]|\[\[[^\]]+\]\]|\[[^\]]+\])*|) *\]\]'
+ .format('|'.join(ignore_case(s) for s in namespace), escaped))
+
+ shown = False
+ for page in file_page.usingPages(content=True, namespaces=0):
+ if not shown:
+ pywikibot.output(
+ color_format('\n>>> {lightgreen}Delinking {}{default} <<<',
+ file_page.title()))
+ shown = True
+ super().treat(page)
+
+ def treat_page(self):
+ """Delink a single page."""
+ new = replaceExcept(self.current_page.text, self.image_regex, '', [])
+ self.put_current(new)
+
+ def teardown(self):
+ """Save the last used logevent timestamp."""
+ if not hasattr(self, 'last_ts'):
+ return
+
+ pywikibot.output("\nUpdate 'since' to {} file".format(self.INI))
+ conf = configparser.ConfigParser(inline_comment_prefixes=[';'])
+ conf.read(self.INI)
+ section = calledModuleName()
+ if not conf.has_section(section):
+ conf.add_section(section)
+ conf.set(section, 'since', self.last_ts.totimestampformat())
+ with open(self.INI, 'w') as f:
+ conf.write(f)
+
+
+def main(*args: str) -> None:
+ """
+ Process command line arguments and invoke bot.
+
+ If args is an empty list, sys.argv is used.
+
+ :param args: command line arguments
+ """
+ options = {}
+ local_args = pywikibot.handle_args()
+ for arg in local_args:
+ opt, _, value = arg.partition(':')
+ opt = removeprefix(opt, '-')
+ if opt == 'localonly':
+ options[opt] = True
+ else:
+ options[opt] = value
+
+ bot = CommonsDelinker(site=pywikibot.Site(), **options)
+ bot.run()
+
+
+if __name__ == '__main__':
+ main()
diff --git a/scripts/image.py b/scripts/image.py
index 84785e7..f29c5f7 100755
--- a/scripts/image.py
+++ b/scripts/image.py
@@ -91,7 +91,8 @@
escaped = re.sub('\\\\[_ ]', '[_ ]', escaped)
if not self.opt.loose or not self.new_image:
image_regex = re.compile(
- r'\[\[ *(?:{})\s*:\s*{} *(?P<parameters>\|[^\n]+?|) *\]\]'
+ r'\[\[ *(?:{})\s*:\s*{} *(?P<parameters>\|'
+ r'(?:[^\[\]]|\[\[[^\]]+\]\]|\[[^\]]+\])*|) *\]\]'
.format('|'.join(ignore_case(s) for s in namespace), escaped))
else:
image_regex = re.compile(r'' + escaped)
diff --git a/tests/script_tests.py b/tests/script_tests.py
index 2ab29cd..5b7e1b4 100755
--- a/tests/script_tests.py
+++ b/tests/script_tests.py
@@ -79,13 +79,14 @@
'category_redirect',
'checkimages',
'clean_sandbox',
+ 'delinker',
'login',
'misspelling',
- 'revertbot',
'noreferences',
'nowcommons',
'parser_function_count',
'patrol',
+ 'revertbot',
'shell',
'unusedfiles',
'upload',
--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/776176
To unsubscribe, or for help writing mail filters, visit https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: Ib7b7405115b485d4f404aedecc0146bb30c21468
Gerrit-Change-Number: 776176
Gerrit-PatchSet: 20
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: D3r1ck01 <xsavitar.wiki(a)aol.com>
Gerrit-Reviewer: MarcoAurelio <maurelio(a)toolforge.org>
Gerrit-Reviewer: Rubin <rubin.happy(a)gmail.com>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: Zabe <alexander.vorwerk(a)stud.uni-goettingen.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-CC: Matěj Suchánek <matejsuchanek97(a)gmail.com>
Gerrit-MessageType: merged
jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/281945 )
Change subject: [L10N] use page_from_repository() method in checkimages.py
......................................................................
[L10N] use page_from_repository() method in checkimages.py
- use items 'Q4481876', 'Q7451504' as license categories
- use a set for all loaded licenses for quicker lookup
- rename list_licences to licences reflect this issue
- raise Error instead of TranslationError if no category was found;
only raise it during load_licenses()
Change-Id: I0e995bef9a1bc376057d68464c4b3b1d52320177
---
M scripts/checkimages.py
1 file changed, 34 insertions(+), 49 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/scripts/checkimages.py b/scripts/checkimages.py
index d8598de..651bf10 100755
--- a/scripts/checkimages.py
+++ b/scripts/checkimages.py
@@ -91,7 +91,7 @@
import pywikibot
from pywikibot import config, i18n
from pywikibot import pagegenerators as pg
-from pywikibot.backports import List, Tuple
+from pywikibot.backports import List, Set, Tuple
from pywikibot.bot import suggest_help
from pywikibot.exceptions import (
EditConflictError,
@@ -422,28 +422,13 @@
'sr': r'\{\{[nN](?:C|ow(?: c|[cC])ommons)[\|\}',
}
-# Category with the licenses and / or with subcategories with the other
-# licenses.
-CATEGORY_WITH_LICENSES = {
- 'commons': 'Category:License tags',
- 'meta': 'Category:License templates',
- 'test': 'Category:CC license tags',
- 'ar': 'تصنيف:قوالب حقوق الصور',
- 'arz': 'تصنيف:Wikipedia image copyright templates',
- 'de': 'Kategorie:Vorlage:Lizenz für Bilder',
- 'en': 'Category:Wikipedia file copyright templates',
- 'fa': 'رده:الگو:حق تکثیر پرونده',
- 'ga': "Catagóir:Clibeanna cóipchirt d'íomhánna",
- 'it': 'Categoria:Template Licenze copyright',
- 'ja': 'Category:画像の著作権表示テンプレート',
- 'ko': '분류:위키백과 그림 저작권 틀',
- 'ru': 'Category:Шаблоны:Лицензии файлов',
- 'sd': 'زمرو:وڪيپيڊيا فائل ڪاپي رائيٽ سانچا',
- 'sr': 'Категорија:Шаблони за слике',
- 'ta': 'Category:காப்புரிமை வார்ப்புருக்கள்',
- 'ur': 'زمرہ:ویکیپیڈیا سانچہ جات حقوق تصاویر',
- 'zh': 'Category:版權申告模板',
-}
+CATEGORIES_WITH_LICENSES = 'Q4481876', 'Q7451504'
+"""Category items with the licenses; subcategories may contain other
+licenses.
+
+.. versionchanged:: 7.2
+ uses wikibase items instead of category titles.
+"""
# Page where is stored the message to send as email to the users
EMAIL_PAGE_WITH_TEXT = {
@@ -563,7 +548,7 @@
self.num_notify = None
# Load the licenses only once, so do it once
- self.list_licenses = self.load_licenses()
+ self.licenses = self.load_licenses()
def set_parameters(self, image) -> None:
"""Set parameters."""
@@ -1152,23 +1137,25 @@
else:
pywikibot.output('>> No additional settings found! <<')
- def load_licenses(self) -> List[pywikibot.Page]:
- """Load the list of the licenses."""
- cat_name = i18n.translate(self.site, CATEGORY_WITH_LICENSES)
- if not cat_name:
- raise TranslationError(
- 'No allowed licenses category provided in '
- '"CATEGORY_WITH_LICENSES" dict for your project!')
+ def load_licenses(self) -> Set[pywikibot.Page]:
+ """Load the list of the licenses.
+
+ .. versionchanged:: 7.2
+ return a set instead of a list for quicker lookup.
+ """
pywikibot.output('\nLoading the allowed licenses...\n')
- cat = pywikibot.Category(self.site, cat_name)
- list_licenses = list(cat.articles())
+ licenses = set()
+ for item in CATEGORIES_WITH_LICENSES:
+ cat = self.site.page_from_repository(item)
+ if cat:
+ licenses.update(cat.articles())
+
if self.site.code == 'commons':
no_licenses_to_skip = pywikibot.Category(self.site,
'License-related tags')
for license_given in no_licenses_to_skip.articles():
- if license_given in list_licenses:
- list_licenses.remove(license_given)
- pywikibot.output('')
+ if license_given in licenses:
+ licenses.remove(license_given)
# Add the licenses set in the default page as licenses to check
if self.page_allowed:
@@ -1176,20 +1163,23 @@
page_allowed_text = pywikibot.Page(self.site,
self.page_allowed).get()
except (NoPageError, IsRedirectPageError):
- page_allowed_text = ''
+ pass
+ else:
+ for name_license in self.load(page_allowed_text):
+ licenses.add(pywikibot.Page(self.site, name_license))
- for name_license in self.load(page_allowed_text):
- page_license = pywikibot.Page(self.site, name_license)
- if page_license not in list_licenses:
- # the list has wiki-pages
- list_licenses.append(page_license)
- return list_licenses
+ if not licenses:
+ raise pywikibot.Error(
+ 'No allowed licenses categories provided. Add that category '
+ 'to wikibase to make the script work correctly')
+
+ return licenses
def mini_template_check(self, template) -> bool:
"""Check if template is in allowed licenses or in licenses to skip."""
# the list_licenses are loaded in the __init__
# (not to load them multimple times)
- if template in self.list_licenses:
+ if template in self.licenses:
self.license_selected = template.title(with_ns=False)
self.seems_ok = True
# let the last "fake" license normally detected
@@ -1258,11 +1248,6 @@
'page {}!'.format(self.image))
self.all_licenses = []
- if not self.list_licenses:
- raise TranslationError(
- 'No allowed licenses found in "CATEGORY_WITH_LICENSES" '
- 'category for your project!')
-
# Found the templates ONLY in the image's description
for template_selected in templates_in_the_image_raw:
tp = pywikibot.Page(self.site, template_selected)
--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/281945
To unsubscribe, or for help writing mail filters, visit https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I0e995bef9a1bc376057d68464c4b3b1d52320177
Gerrit-Change-Number: 281945
Gerrit-PatchSet: 12
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Magul <tomasz.magulski(a)gmail.com>
Gerrit-Reviewer: Meno25 <meno25mail(a)gmail.com>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged
jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/783440 )
Change subject: [cleanup] Remove unused xmlreader.XmlParserThread
......................................................................
[cleanup] Remove unused xmlreader.XmlParserThread
xmlreader.XmlParserThread isn't uses in the framework. It was introduced
2005 with https://static-codereview.wikimedia.org/pywikipedia/2003.html
and was given up in 2006 when the parser was changed from xml.sax to
xml.etree.
Its handler was never ported to core. Thus no deprecation period is
necessary beause this class never worked with core.
Change-Id: Ia38681a481e43df2a4a006e39d25f82a5a0f9e34
---
M pywikibot/xmlreader.py
1 file changed, 0 insertions(+), 25 deletions(-)
Approvals:
JJMC89: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/xmlreader.py b/pywikibot/xmlreader.py
index 5437a82..02e1bcf 100644
--- a/pywikibot/xmlreader.py
+++ b/pywikibot/xmlreader.py
@@ -13,8 +13,6 @@
# Distributed under the terms of the MIT license.
#
import re
-import threading
-import xml.sax
from xml.etree.ElementTree import iterparse
from pywikibot.tools import open_archive
@@ -66,29 +64,6 @@
self.isredirect = redirect
-class XmlParserThread(threading.Thread):
-
- """
- XML parser that will run as a single thread.
-
- This allows the XmlDump
- generator to yield pages before the parser has finished reading the
- entire dump.
-
- There surely are more elegant ways to do this.
- """
-
- def __init__(self, filename, handler) -> None:
- """Initializer."""
- super().__init__()
- self.filename = filename
- self.handler = handler
-
- def run(self) -> None:
- """Parse the file in a single thread."""
- xml.sax.parse(self.filename, self.handler)
-
-
class XmlDump:
"""
--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/783440
To unsubscribe, or for help writing mail filters, visit https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: Ia38681a481e43df2a4a006e39d25f82a5a0f9e34
Gerrit-Change-Number: 783440
Gerrit-PatchSet: 2
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: JJMC89 <JJMC89.Wikimedia(a)gmail.com>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged
Xqt has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/783434 )
Change subject: [doc] Fix sphinx doc
......................................................................
[doc] Fix sphinx doc
Change-Id: Ife7c22463b26a24ff568fbc7c2841a5916e3657c
---
M docs/glossary.rst
D docs/scripts_ref/scripts.archive.rst
M docs/scripts_ref/scripts.rst
3 files changed, 3 insertions(+), 7 deletions(-)
Approvals:
Xqt: Verified; Looks good to me, approved
diff --git a/docs/glossary.rst b/docs/glossary.rst
index 57dcc97..bfc7a3b 100644
--- a/docs/glossary.rst
+++ b/docs/glossary.rst
@@ -10,7 +10,7 @@
Often seen for code examples which can be executed interactively
in the interpreter. The :mod:`pywikibot` module is preloaded. The
:mod:`pywikibot.scripts.shell` script is part of the
- :ref:`Pywikibot Utility Scripts<utility_scripts>`.
+ :ref:`Pywikibot Utility Scripts<Utility Scripts>`.
compat
The first Pywikibot package formerly known as *Pywikipediabot*
@@ -57,7 +57,8 @@
tag
A marker of particular revisions (e.g. a release version). Each
- Pywikibot release is tagged with its release version number.
+ Pywikibot release is tagged with its release version number. The
+ current last tag is |version|.
trunk
A former name of :term:`compat`.
diff --git a/docs/scripts_ref/scripts.archive.rst b/docs/scripts_ref/scripts.archive.rst
deleted file mode 100644
index 79c34d1..0000000
--- a/docs/scripts_ref/scripts.archive.rst
+++ /dev/null
@@ -1,4 +0,0 @@
-scripts.archive archived scripts
-================================
-
-.. automodule:: scripts.archive
\ No newline at end of file
diff --git a/docs/scripts_ref/scripts.rst b/docs/scripts_ref/scripts.rst
index b242a8b..b40ab91 100644
--- a/docs/scripts_ref/scripts.rst
+++ b/docs/scripts_ref/scripts.rst
@@ -8,7 +8,6 @@
.. toctree::
- scripts.archive
scripts.i18n
scripts.maintenance
scripts.userscripts
--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/783434
To unsubscribe, or for help writing mail filters, visit https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: Ife7c22463b26a24ff568fbc7c2841a5916e3657c
Gerrit-Change-Number: 783434
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-MessageType: merged