Bot24 Task | |
---|---|
Renames Mexican TV station callsign redirects. | |
Operator(s) | Negative24 |
Script | rename_redirect.py |
Script Author | Negative24 |
Type | Supervised (manual start; one-off batches) |
Programming language(s) | Pywikibot |
Script renames a batch of redirects specified in a Python file with tuples corresponding to original (currently existing) redirects and new redirects. Script then makes sure the new redirect points to the target the old redirect pointed to. It then finds all references to the old redirect, finds the links, and then if the link points to the old redirect, it modifies the link to point to the new redirect, keeping the original section, label, and any other arguments (it only targets the title to begin with).
Date: 03:47, 10 December 2015 (UTC)
Site:
Test Wikipedia
Machine: Tool Labs
Commit:
75a9513781ab11c660522642c73b074abaa4938e
Simulated? No
Objectives:
The old redirect, testwiki:Ausdrücklich, has been created and pointed to testwiki:Robert Domes ( diff). Many pages have been modified to contain different types of links (some with sections, labels, and linktrails) to the old redirect; some of these pages have special characters in their text and titles (diff 1 2 3).
The old redirect will be renamed to testwiki:Äußerung.
Run
|
---|
Command: python scripts/rename_redirect.py -family:test -lang:test -redirectfile:../test1.py -summary:"Bot24 Task #3, Test #1: Bot Action! Renaming redirect" Contents of test1.py: # -*- coding: utf-8 -*- (u"Ausdrücklich", u"Äußerung") Output: Summary: Bot24 Task #3, Test #1: Bot Action! Renaming redirect Moving Ausdrücklich to Äußerung. Ausdrücklich was found. Proceeding... Target: Robert Domes Äußerung doesn't exist. Creating it now... @@ -0,0 +1 @@ + #REDIRECT [[Robert Domes]] Sleeping for 9.4 seconds, 2015-12-10 03:33:32 Page [[Äußerung]] saved Working on: Anton Sterbling @@ -17 +17 @@ - # {{#explode: n/92/120525|/|1}} [[Ausdrücklich#Test Section]] generates: {{#explode: n/92/120525|/|1}} + # {{#explode: n/92/120525|/|1}} [[Äußerung#Test Section]] generates: {{#explode: n/92/120525|/|1}} Sleeping for 9.1 seconds, 2015-12-10 03:33:43 Page [[Anton Sterbling]] saved WARNING: /data/project/bot24/bot24/env/local/lib/python2.7/site-packages/pywikibot/family.py:931: FamilyMaintenanceWarning: Family name wikimediachapter does not match family module name wikimedia Working on: Wikipédia:Escolha do artigo em destaque/Teste @@ -13 +13 @@ - ;Prazo de votação (30 dias): das 20:57 '''UTC''' de 4 de [[Ausdrücklich|This is a label]] April de 2015 até às <section begin="fim do prazo"/>20:57 '''UTC''' de 4 de May de 2015<section end="fim do prazo"/> + ;Prazo de votação (30 dias): das 20:57 '''UTC''' de 4 de [[Äußerung|This is a label]] April de 2015 até às <section begin="fim do prazo"/>20:57 '''UTC''' de 4 de May de 2015<section end="fim do prazo"/> Sleeping for 8.7 seconds, 2015-12-10 03:33:53 Page [[Wikipédia:Escolha do artigo em destaque/Teste]] saved Working on: 21 Ocak @@ -37 +37 @@ - * [[2001]] - [[Filipinler]]'de Devlet Başkan Yardımcısı [[Gloria Arroyo]], sokağın [[Ausdrücklich#Section Test]]linktrail ve ordunun baskısıyla [[Joseph Estrada]]'nın yerine Devlet Başkanı oldu. + * [[2001]] - [[Filipinler]]'de Devlet Başkan Yardımcısı [[Gloria Arroyo]], sokağın [[Äußerung#Section Test]]linktrail ve ordunun baskısıyla [[Joseph Estrada]]'nın yerine Devlet Başkanı oldu. Sleeping for 9.5 seconds, 2015-12-10 03:34:02 Page [[21 Ocak]] saved |
Bot actions:
Bot edits: 4
All objectives met. No malfunctions or errors reported.
Date: 04:56, 13 December 2015 (UTC)
Site:
Test Wikipedia
Machine: Local machine
Commit: ded72963bd9eb853ec458d58739b782321d9213a
Simulated? No
Objectives:
testwiki:List of Redirects has been created with 2 redirects that will be moved ( diff).
testwiki:Redirect 1 and testwiki:Redirect 2 will be moved to testwiki:New Redirect 1 and testwiki:Redirect 2.
Run
|
---|
Command: python scripts/rename_redirect.py -family:test -lang:test -redirectfile:../redirects.py -summary:"Bot24 Test #2. Bot Action" Contents of redirects.py: # -*- coding: utf-8 -*- (u"Redirect 1", u"New Redirect 1") (u"Redirect 2", u"New Redirect 2") Output: Moving Redirect 1 to New Redirect 1. Redirect 1 was found. Proceeding... Target: Page759 New Redirect 1 doesn't exist. Creating it now... @@ -0,0 +1 @@ + #REDIRECT [[Page759]] Sleeping for 8.6 seconds, 2015-12-13 04:45:01 Page [[New Redirect 1]] saved Working on: Page 982 Working on: List of Redirects Moving Redirect 2 to New Redirect 2. Redirect 2 was found. Proceeding... Target: Test Felix New Redirect 2 doesn't exist. Creating it now... @@ -0,0 +1 @@ + #REDIRECT [[Test Felix]] Sleeping for 7.7 seconds, 2015-12-13 04:45:12 Page [[New Redirect 2]] saved Working on: List of Redirects @@ -2,2 +2,2 @@ - * [[Redirect 1]] + * [[New Redirect 1]] - * [[Redirect 2]] + * [[New Redirect 2]] Sleeping for 8.5 seconds, 2015-12-13 04:45:22 Page [[List of Redirects]] saved @@ -1 +1 @@ - This is a test page that links to a redirect. See, right here: [[Redirect 1]]. This is just a test. Thank you. + This is a test page that links to a redirect. See, right here: [[New Redirect 1]]. This is just a test. Thank you. Sleeping for 9.1 seconds, 2015-12-13 04:45:31 Page [[Page 982]] saved |
Bot actions:
Bot edits: 4
All objectives met. No malfunctions or errors reported.