jenkins-bot submitted this change.

View Change

Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
[6.0] restore replicate_wiki.py

Bug: T275291
Change-Id: I1fe127b7e75b32bc954826e4019c80cac3d63b53
---
M pywikibot/config2.py
M scripts/README.rst
R scripts/replicate_wiki.py
M tests/generate_user_files_tests.py
4 files changed, 19 insertions(+), 5 deletions(-)

diff --git a/pywikibot/config2.py b/pywikibot/config2.py
index ec99df7..38f0300 100644
--- a/pywikibot/config2.py
+++ b/pywikibot/config2.py
@@ -121,9 +121,9 @@
'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', 'replicate_replace', 'special_page_limit',
- 'splitLongParagraphs', 'sysopnames', 'use_mwparserfromhell',
- 'use_SSL_onlogin', 'use_SSL_always', 'without_interwiki', 'yahoo_appid',
+ 'persistent_http', 'proxy', 'special_page_limit', 'splitLongParagraphs',
+ 'sysopnames', 'use_mwparserfromhell', 'use_SSL_onlogin', 'use_SSL_always',
+ 'without_interwiki', 'yahoo_appid',
}
_future_variables = {'absolute_import', 'division', 'unicode_literals'}

@@ -709,6 +709,19 @@
cosmetic_changes_deny_script = ['category_redirect', 'cosmetic_changes',
'newitem', 'touch']

+# ############# REPLICATION BOT SETTINGS ################
+# You can add replicate_replace to your user-config.py.
+#
+# Use has the following format:
+#
+# replicate_replace = {
+# 'wikipedia:li': {'Hoofdpagina': 'Veurblaad'}
+# }
+#
+# to replace all occurrences of 'Hoofdpagina' with 'Veurblaad' when writing to
+# liwiki. Note that this does not take the origin wiki into account.
+replicate_replace = {} # type: Dict[str, Dict[str, str]]
+
# ############# FURTHER SETTINGS ##############

# Simulate settings
diff --git a/scripts/README.rst b/scripts/README.rst
index e299246..2e46e81 100644
--- a/scripts/README.rst
+++ b/scripts/README.rst
@@ -94,6 +94,8 @@
| | text files. The bot can either work on a set of given |
| | pages or crawl an SQL dump. |
+------------------------+---------------------------------------------------------+
+ | replicate_wiki.py | Replicates pages in wiki to a second wiki within family|
+ +------------------------+---------------------------------------------------------+
| revertbot.py | Revert edits. |
+------------------------+---------------------------------------------------------+
| shell.py | Spawns an interactive Python shell |
@@ -207,8 +209,6 @@
| | without title and fetch the html title from the link to |
| | use it as the title of the wiki link in the reference. |
+------------------------+---------------------------------------------------------+
- | replicate_wiki.py | Replicates pages in wiki to a second wiki within family|
- +------------------------+---------------------------------------------------------+
| selflink.py | This bot goes over multiple pages of the home wiki, |
| | searches for selflinks, and allows removing them. |
+------------------------+---------------------------------------------------------+
diff --git a/scripts/archive/replicate_wiki.py b/scripts/replicate_wiki.py
similarity index 100%
rename from scripts/archive/replicate_wiki.py
rename to scripts/replicate_wiki.py
diff --git a/tests/generate_user_files_tests.py b/tests/generate_user_files_tests.py
index 619f86d..69490d7 100644
--- a/tests/generate_user_files_tests.py
+++ b/tests/generate_user_files_tests.py
@@ -93,6 +93,7 @@
'EXTERNAL SCRIPT PATH SETTINGS',
'FURTHER SETTINGS',
'HTTP SETTINGS',
+ 'REPLICATION BOT SETTINGS',
):
self.assertIn(section, config_text)
lines = config_text.splitlines()

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

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I1fe127b7e75b32bc954826e4019c80cac3d63b53
Gerrit-Change-Number: 665807
Gerrit-PatchSet: 2
Gerrit-Owner: Xqt <info@gno.de>
Gerrit-Reviewer: D3r1ck01 <xsavitar.wiki@aol.com>
Gerrit-Reviewer: Xqt <info@gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged