Ladsgroup has uploaded a new change for review.
https://gerrit.wikimedia.org/r/91849
Change subject: Adding option of not deleting the old cat, It was partially
implemented already
......................................................................
Adding option of not deleting the old cat, It was partially implemented already
Bug: 55291
Change-Id: I76b512acb692598a6a9528a162085e5ee330ffb8
---
M category.py
1 file changed, 5 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/pywikibot/compat
refs/changes/49/91849/1
diff --git a/category.py b/category.py
index e1bb0ad..e58be71 100644
--- a/category.py
+++ b/category.py
@@ -39,6 +39,7 @@
Options for "move" action:
* -hist - Creates a nice wikitable on the talk page of target category
that contains detailed page history of the source category.
+ * -nodelete - Don't delete the old category after move
Options for several actions:
* -rebuild - reset the database
@@ -885,6 +886,7 @@
sort_by_last_name = False
restore = False
create_pages = False
+ deleteEmptySourceCat = True
for arg in pywikibot.handleArgs(*args):
if arg == 'add':
action = 'add'
@@ -898,6 +900,8 @@
action = 'tree'
elif arg == 'listify':
action = 'listify'
+ elif arg =='-nodelete':
+ deleteEmptySourceCat = False
elif arg == '-person':
sort_by_last_name = True
elif arg == '-rebuild':
@@ -971,7 +975,7 @@
newCatTitle = pywikibot.input(
u'Please enter the new name of the category:')
bot = CategoryMoveRobot(oldCatTitle, newCatTitle, batchMode,
- editSummary, inPlace, titleRegex=titleRegex,
+ editSummary, inPlace, deleteEmptySourceCat=
deleteEmptySourceCat, titleRegex=titleRegex,
withHistory=withHistory)
bot.run()
elif action == 'tidy':
--
To view, visit https://gerrit.wikimedia.org/r/91849
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I76b512acb692598a6a9528a162085e5ee330ffb8
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/compat
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits