jenkins-bot submitted this change.

View Change

Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
Revert "[cleanup] remove interwiki config settings"

This reverts commit c455d2230eec9d7684e00f86dbdbfe93cffe7b60.

Bug: T278675
Change-Id: Id774c8a41fb848a0a0ec4500485cf6460818605f
---
M pywikibot/config2.py
M pywikibot/cosmetic_changes.py
M tests/generate_user_files_tests.py
3 files changed, 50 insertions(+), 7 deletions(-)

diff --git a/pywikibot/config2.py b/pywikibot/config2.py
index f514ce1..7e1680c 100644
--- a/pywikibot/config2.py
+++ b/pywikibot/config2.py
@@ -113,12 +113,10 @@
'copyright_max_query_for_page', 'copyright_msn', 'copyright_show_date',
'copyright_show_length', 'copyright_skip_query', 'copyright_yahoo',
'db_hostname', 'deIndentTables', 'fake_user_agent', 'flickr',
- 'interwiki_contents_on_disk', 'interwiki_backlink', 'interwiki_graph',
- 'interwiki_graph_formats', 'interwiki_graph_url', 'interwiki_min_subjects',
- 'interwiki_shownew', 'line_separator', 'LS', 'msn_appid', 'panoramio',
- 'persistent_http', 'proxy', 'special_page_limit', 'splitLongParagraphs',
- 'sysopnames', 'use_mwparserfromhell', 'use_SSL_onlogin', 'use_SSL_always',
- 'without_interwiki', 'yahoo_appid',
+ 'interwiki_contents_on_disk', 'line_separator', 'LS', 'msn_appid',
+ 'panoramio', 'persistent_http', 'proxy', 'special_page_limit',
+ 'splitLongParagraphs', 'sysopnames', 'use_mwparserfromhell',
+ 'use_SSL_onlogin', 'use_SSL_always', 'yahoo_appid',
}
_future_variables = {'absolute_import', 'division', 'unicode_literals'}

@@ -606,6 +604,49 @@
# user_families_paths = ['data/families']
user_families_paths = [] # type: List[str]

+# ############# INTERWIKI SETTINGS ##############
+
+# Should interwiki.py report warnings for missing links between foreign
+# languages?
+interwiki_backlink = True
+
+# Should interwiki.py display every new link it discovers?
+interwiki_shownew = True
+
+# Should interwiki.py output a graph PNG file on conflicts?
+# You need pydot for this:
+# https://pypi.org/project/pydot/
+interwiki_graph = False
+
+# Specifies that the robot should process that amount of subjects at a time,
+# only starting to load new pages in the original language when the total
+# falls below that number. Default is to process (at least) 100 subjects at
+# once.
+interwiki_min_subjects = 100
+
+# If interwiki graphs are enabled, which format(s) should be used?
+# Supported formats include png, jpg, ps, and svg. See:
+# http://www.graphviz.org/doc/info/output.html
+# If you want to also dump the dot files, you can use this in your
+# user-config.py:
+# interwiki_graph_formats = ['dot', 'png']
+# If you need a PNG image with an HTML image map, use this:
+# interwiki_graph_formats = ['png', 'cmap']
+# If you only need SVG images, use:
+# interwiki_graph_formats = ['svg']
+interwiki_graph_formats = ['png']
+
+# You can post the contents of your autonomous_problems.dat to the wiki,
+# e.g. to https://de.wikipedia.org/wiki/Wikipedia:Interwiki-Konflikte .
+# This allows others to assist you in resolving interwiki problems.
+# To help these people, you can upload the interwiki graphs to your
+# webspace somewhere. Set the base URL here, e.g.:
+# 'https://www.example.org/~yourname/interwiki-graphs/'
+interwiki_graph_url = None
+
+# Save file with local articles without interwikis.
+without_interwiki = False
+
# ############# SOLVE_DISAMBIGUATION SETTINGS ############
#
# Set disambiguation_comment[FAMILY][LANG] to a non-empty string to override
@@ -707,7 +748,7 @@

# ############# COSMETIC CHANGES SETTINGS ##############
# The bot can make some additional changes to each page it edits, e.g. fix
-# whitespace or positioning category links.
+# whitespace or positioning of category links.

# This is an experimental feature; handle with care and consider re-checking
# each bot edit if enabling this!
diff --git a/pywikibot/cosmetic_changes.py b/pywikibot/cosmetic_changes.py
index 8ef0bfd..f6f0929 100755
--- a/pywikibot/cosmetic_changes.py
+++ b/pywikibot/cosmetic_changes.py
@@ -79,6 +79,7 @@

# Subpage templates. Must be in lower case,
# whereas subpage itself must be case sensitive
+# This is also used by interwiki.py
# TODO: Maybe move it to family file and implement global instances
moved_links = {
'ar': (['documentation', 'template documentation', 'شرح', 'توثيق'],
diff --git a/tests/generate_user_files_tests.py b/tests/generate_user_files_tests.py
index 69490d7..9cf64d3 100644
--- a/tests/generate_user_files_tests.py
+++ b/tests/generate_user_files_tests.py
@@ -91,6 +91,7 @@
self.assertIsNotNone(config_text)
for section in ('LOGFILE SETTINGS',
'EXTERNAL SCRIPT PATH SETTINGS',
+ 'INTERWIKI SETTINGS',
'FURTHER SETTINGS',
'HTTP SETTINGS',
'REPLICATION BOT SETTINGS',

To view, visit change 675761. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: Id774c8a41fb848a0a0ec4500485cf6460818605f
Gerrit-Change-Number: 675761
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info@gno.de>
Gerrit-Reviewer: Xqt <info@gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged