User:Bot24/Tasks/Task 3

From Wikipedia, the free encyclopedia

Operator(s)Negative24
Script AuthorNegative24
TypeSupervised (manual start; one-off batches)
Quick facts Bot24 Task, Operator(s) ...
Task #3
Bot24 Task
Renames Mexican TV station callsign redirects.
Operator(s)Negative24
Scriptrename_redirect.py
Script AuthorNegative24
TypeSupervised (manual start; one-off batches)
Programming language(s)Pywikibot
Close

Description

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).

Operation Actions

  1. FOR every old redirect in list of old redirects to new redirects:
    1. IF old redirect doesn't exist, BREAK to next old redirect
    2. IF new redirect doesn't exist, create it and point to final destination
    3. Create a list of pages linking to old redirect to process; FOR every page in list of pages to process:
      1. FOR every link on page:
        1. IF link points to old redirect, modify the title to point to the new redirect

Consensus

Support

  1. Support I commissioned this as a bot to simplify one of the most daunting tasks I've faced in my 10 years as an editor: the need to move hundreds of redirects as Mexico's analog-digital transition hits peak form. Since I began editing Mexico TV articles on a large scale in 2014, Mexico's digital transition has advanced extremely rapidly, which last year led to the beginning of the rewrite of the 32 state lists, and this year to many additions of new digital television technical information. I had to spend time doing the small batches of stations that were done earlier this year. It was quite a task just to do 10 or 12 of them, let alone the hundreds that will be changing over in the next month. With the DTV transition and analog shutoff occurring primarily this month, the use of a bot to complete the task will automate a lot of manual labor (hundreds of TV stations are affected, most of them redirects in Wikipedia) and ensure that my time can go to updating the separate articles that exist and improving coverage of Mexican broadcasting on en.wiki. Raymie (tc) 04:36, 10 December 2015 (UTC)

Oppose

Tests

Test 1

Date: 03:47, 10 December 2015 (UTC)
Site: Test Wikipedia
Machine: Tool Labs
Commit: 75a9513781ab11c660522642c73b074abaa4938e
Simulated? No
Objectives:

  1. Demonstrate scripts capability to modify a new redirect correctly
  2. Demonstrate scripts capability to change links from old redirect to new redirect correctly
  3. Demonstrate scripts capability to work on pages with special characters

Scenario

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).

Action

The old redirect will be renamed to testwiki:Äußerung.

More information Run ...
Close

Results

Bot actions:

checkY The new redirect, testwiki:Äußerung, was created and was pointed to the correct target (diff)
checkY All links pointing to the old redirect were changed correctly to point to the new redirect (diff 1 2 3)

Bot edits: 4

Conclusion

All objectives met. No malfunctions or errors reported.

Test 2

Date: 04:56, 13 December 2015 (UTC)
Site: Test Wikipedia
Machine: Local machine
Commit: ded72963bd9eb853ec458d58739b782321d9213a
Simulated? No
Objectives:

  1. Demonstrate that script doesn't save each page with fixed links after every redirect (bundles edits and submits at the end)

Scenario

testwiki:List of Redirects has been created with 2 redirects that will be moved (diff).

Action

testwiki:Redirect 1 and testwiki:Redirect 2 will be moved to testwiki:New Redirect 1 and testwiki:Redirect 2.

More information Run ...
Close

Results

Bot actions:

Bot edits: 4

Conclusion

All objectives met. No malfunctions or errors reported.

Related Articles

Wikiwand AI