Page MenuHomePhabricator

Make fixing_redirects.py not use linktext as an option
Open, NormalPublic

Description

I would like the option to not use linktexts when fixing the redirects.

Event Timeline

Stigmj created this task.Jan 11 2016, 8:54 PM
Stigmj claimed this task.
Stigmj raised the priority of this task from to Normal.
Stigmj updated the task description. (Show Details)
Stigmj added a project: Pywikibot-replace.py.
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. · View Herald TranscriptJan 11 2016, 8:54 PM
Stigmj set Security to None.

Change 263420 had a related patch set uploaded (by Mpaa):
Added -nolinktext and -always to script

https://gerrit.wikimedia.org/r/263420

Examples from running:

Without "-nolinktext":

$ python pwb.py fixing_redirects.py -simulate -page:"Bruker:Stigmj/Redirect_tests" 
Retrieving 1 pages from wikipedia:no.

>>> Bruker:Stigmj/Redirect tests <<<
@@ -1,16 +1,16 @@
- * [[Bruker:Stigmj/Old title]]
- * [[bruker:Stigmj/Old title]]
+ * [[Bruker:Stigmj/New title|Bruker:Stigmj/Old title]]
+ * [[bruker:Stigmj/New title|bruker:Stigmj/Old title]]
- * [[Bruker:Stigmj/Old title|page_title_upper_linktext_lower]]
+ * [[bruker:Stigmj/New title|page_title_upper_linktext_lower]]
- * [[Bruker:Stigmj/Old title|Page_title_upper_Linktext_upper]]
+ * [[Bruker:Stigmj/New title|Page_title_upper_Linktext_upper]]
- * [[bruker:Stigmj/Old title|page_title_lower_linktext_lower]]
+ * [[bruker:Stigmj/New title|page_title_lower_linktext_lower]]
- * [[bruker:Stigmj/Old title|Page_title_lower_Linktext_upper]]
+ * [[Bruker:Stigmj/New title|Page_title_lower_Linktext_upper]]
- * [[Bruker:Stigmj/Old title]]with_blend_and_page_title_upper
+ * [[Bruker:Stigmj/New title|Bruker:Stigmj/Old titlewith]]_blend_and_page_title_upper
- * [[bruker:Stigmj/Old title]]with_blend_and_page_title_lower
+ * [[bruker:Stigmj/New title|bruker:Stigmj/Old titlewith]]_blend_and_page_title_lower
- * [[Bruker:Stigmj/Old title|page_title_upper_linktext_lower]]with_blend
+ * [[bruker:Stigmj/New title|page_title_upper_linktext_lowerwith]]_blend
- * [[Bruker:Stigmj/Old title|Page_title_upper_Linktext_upper]]with_blend
+ * [[Bruker:Stigmj/New title|Page_title_upper_Linktext_upperwith]]_blend
- * [[bruker:Stigmj/Old title|page_title_lower_linktext_lower]]with_blend
+ * [[bruker:Stigmj/New title|page_title_lower_linktext_lowerwith]]_blend
- * [[bruker:Stigmj/Old title|Page_title_lower_Linktext_upper]]with_blend
+ * [[Bruker:Stigmj/New title|Page_title_lower_Linktext_upperwith]]_blend
- * [[Bruker:Stigmj/Old title|page_title_upper_linktext_lower]]<nowiki />with_blend_and_nowiki
+ * [[bruker:Stigmj/New title|page_title_upper_linktext_lower]]<nowiki />with_blend_and_nowiki
- * [[Bruker:Stigmj/Old title|Page_title_upper_Linktext_upper]]<nowiki />with_blend_and_nowiki
+ * [[Bruker:Stigmj/New title|Page_title_upper_Linktext_upper]]<nowiki />with_blend_and_nowiki
- * [[bruker:Stigmj/Old title|page_title_lower_linktext_lower]]<nowiki />with_blend_and_nowiki
+ * [[bruker:Stigmj/New title|page_title_lower_linktext_lower]]<nowiki />with_blend_and_nowiki
- * [[bruker:Stigmj/Old title|Page_title_lower_Linktext_upper]]<nowiki />with_blend_and_nowiki
+ * [[Bruker:Stigmj/New title|Page_title_lower_Linktext_upper]]<nowiki />with_blend_and_nowiki

@@ -18,16 +18,16 @@
- * [[Bruker:Stigmj/Old title_with_section]]
- * [[bruker:Stigmj/Old title_with_section]]
- * [[Bruker:Stigmj/Old title_with_section|page_title_upper_linktext_lower]]
- * [[Bruker:Stigmj/Old title_with_section|Page_title_upper_Linktext_upper]]
- * [[bruker:Stigmj/Old title_with_section|page_title_lower_linktext_lower]]
- * [[bruker:Stigmj/Old title_with_section|Page_title_lower_Linktext_upper]]
+ * [[Bruker:Stigmj/New title#The section|Bruker:Stigmj/Old title_with_section]]
+ * [[bruker:Stigmj/New title#The section|bruker:Stigmj/Old title_with_section]]
+ * [[Bruker:Stigmj/New title#The section|Bruker:Stigmj/Old title_with_section]]
+ * [[Bruker:Stigmj/New title#The section|Bruker:Stigmj/Old title_with_section]]
+ * [[bruker:Stigmj/New title#The section|bruker:Stigmj/Old title_with_section]]
+ * [[bruker:Stigmj/New title#The section|bruker:Stigmj/Old title_with_section]]
- * [[Bruker:Stigmj/Old title_with_section]]with_blend_and_page_title_upper
+ * [[Bruker:Stigmj/New title#The section|Bruker:Stigmj/Old title_with_sectionwith]]_blend_and_page_title_upper
- * [[bruker:Stigmj/Old title_with_section]]with_blend_and_page_title_lower
+ * [[bruker:Stigmj/New title#The section|bruker:Stigmj/Old title_with_sectionwith]]_blend_and_page_title_lower
- * [[Bruker:Stigmj/Old title_with_section|page_title_upper_linktext_lower]]with_blend
- * [[Bruker:Stigmj/Old title_with_section|Page_title_upper_Linktext_upper]]with_blend
- * [[bruker:Stigmj/Old title_with_section|page_title_lower_linktext_lower]]with_blend
- * [[bruker:Stigmj/Old title_with_section|Page_title_lower_Linktext_upper]]with_blend
- * [[Bruker:Stigmj/Old title_with_section|page_title_upper_linktext_lower]]<nowiki />with_blend_and_nowiki
- * [[Bruker:Stigmj/Old title_with_section|Page_title_upper_Linktext_upper]]<nowiki />with_blend_and_nowiki
- * [[bruker:Stigmj/Old title_with_section|page_title_lower_linktext_lower]]<nowiki />with_blend_and_nowiki
- * [[bruker:Stigmj/Old title_with_section|Page_title_lower_Linktext_upper]]<nowiki />with_blend_and_nowiki
+ * [[Bruker:Stigmj/New title#The section|Bruker:Stigmj/Old title_with_sectionwith]]_blend
+ * [[Bruker:Stigmj/New title#The section|Bruker:Stigmj/Old title_with_sectionwith]]_blend
+ * [[bruker:Stigmj/New title#The section|bruker:Stigmj/Old title_with_sectionwith]]_blend
+ * [[bruker:Stigmj/New title#The section|bruker:Stigmj/Old title_with_sectionwith]]_blend
+ * [[Bruker:Stigmj/New title#The section|Bruker:Stigmj/Old title_with_section]]<nowiki />with_blend_and_nowiki
+ * [[Bruker:Stigmj/New title#The section|Bruker:Stigmj/Old title_with_section]]<nowiki />with_blend_and_nowiki
+ * [[bruker:Stigmj/New title#The section|bruker:Stigmj/Old title_with_section]]<nowiki />with_blend_and_nowiki
+ * [[bruker:Stigmj/New title#The section|bruker:Stigmj/Old title_with_section]]<nowiki />with_blend_and_nowiki

With "-nolinktext", which is the option I want to have:

$ python pwb.py fixing_redirects.py -simulate -page:"Bruker:Stigmj/Redirect_tests" -nolinktext
Retrieving 1 pages from wikipedia:no.

>>> Bruker:Stigmj/Redirect tests <<<
@@ -1,16 +1,16 @@
- * [[Bruker:Stigmj/Old title]]
+ * [[Bruker:Stigmj/New title]]
- * [[bruker:Stigmj/Old title]]
+ * [[bruker:Stigmj/New title]]
- * [[Bruker:Stigmj/Old title|page_title_upper_linktext_lower]]
+ * [[bruker:Stigmj/New title|page_title_upper_linktext_lower]]
- * [[Bruker:Stigmj/Old title|Page_title_upper_Linktext_upper]]
+ * [[Bruker:Stigmj/New title|Page_title_upper_Linktext_upper]]
- * [[bruker:Stigmj/Old title|page_title_lower_linktext_lower]]
+ * [[bruker:Stigmj/New title|page_title_lower_linktext_lower]]
- * [[bruker:Stigmj/Old title|Page_title_lower_Linktext_upper]]
+ * [[Bruker:Stigmj/New title|Page_title_lower_Linktext_upper]]
- * [[Bruker:Stigmj/Old title]]with_blend_and_page_title_upper
+ * [[Bruker:Stigmj/New title|Bruker:Stigmj/Old titlewith]]_blend_and_page_title_upper
- * [[bruker:Stigmj/Old title]]with_blend_and_page_title_lower
+ * [[bruker:Stigmj/New title|bruker:Stigmj/Old titlewith]]_blend_and_page_title_lower
- * [[Bruker:Stigmj/Old title|page_title_upper_linktext_lower]]with_blend
+ * [[bruker:Stigmj/New title|page_title_upper_linktext_lowerwith]]_blend
- * [[Bruker:Stigmj/Old title|Page_title_upper_Linktext_upper]]with_blend
+ * [[Bruker:Stigmj/New title|Page_title_upper_Linktext_upperwith]]_blend
- * [[bruker:Stigmj/Old title|page_title_lower_linktext_lower]]with_blend
+ * [[bruker:Stigmj/New title|page_title_lower_linktext_lowerwith]]_blend
- * [[bruker:Stigmj/Old title|Page_title_lower_Linktext_upper]]with_blend
+ * [[Bruker:Stigmj/New title|Page_title_lower_Linktext_upperwith]]_blend
- * [[Bruker:Stigmj/Old title|page_title_upper_linktext_lower]]<nowiki />with_blend_and_nowiki
+ * [[bruker:Stigmj/New title|page_title_upper_linktext_lower]]<nowiki />with_blend_and_nowiki
- * [[Bruker:Stigmj/Old title|Page_title_upper_Linktext_upper]]<nowiki />with_blend_and_nowiki
+ * [[Bruker:Stigmj/New title|Page_title_upper_Linktext_upper]]<nowiki />with_blend_and_nowiki
- * [[bruker:Stigmj/Old title|page_title_lower_linktext_lower]]<nowiki />with_blend_and_nowiki
+ * [[bruker:Stigmj/New title|page_title_lower_linktext_lower]]<nowiki />with_blend_and_nowiki
- * [[bruker:Stigmj/Old title|Page_title_lower_Linktext_upper]]<nowiki />with_blend_and_nowiki
+ * [[Bruker:Stigmj/New title|Page_title_lower_Linktext_upper]]<nowiki />with_blend_and_nowiki

@@ -18,16 +18,16 @@
- * [[Bruker:Stigmj/Old title_with_section]]
- * [[bruker:Stigmj/Old title_with_section]]
- * [[Bruker:Stigmj/Old title_with_section|page_title_upper_linktext_lower]]
- * [[Bruker:Stigmj/Old title_with_section|Page_title_upper_Linktext_upper]]
- * [[bruker:Stigmj/Old title_with_section|page_title_lower_linktext_lower]]
- * [[bruker:Stigmj/Old title_with_section|Page_title_lower_Linktext_upper]]
+ * [[Bruker:Stigmj/New title#The section|Bruker:Stigmj/Old title_with_section]]
+ * [[bruker:Stigmj/New title#The section|bruker:Stigmj/Old title_with_section]]
+ * [[Bruker:Stigmj/New title#The section|Bruker:Stigmj/Old title_with_section]]
+ * [[Bruker:Stigmj/New title#The section|Bruker:Stigmj/Old title_with_section]]
+ * [[bruker:Stigmj/New title#The section|bruker:Stigmj/Old title_with_section]]
+ * [[bruker:Stigmj/New title#The section|bruker:Stigmj/Old title_with_section]]
- * [[Bruker:Stigmj/Old title_with_section]]with_blend_and_page_title_upper
+ * [[Bruker:Stigmj/New title#The section|Bruker:Stigmj/Old title_with_sectionwith]]_blend_and_page_title_upper
- * [[bruker:Stigmj/Old title_with_section]]with_blend_and_page_title_lower
+ * [[bruker:Stigmj/New title#The section|bruker:Stigmj/Old title_with_sectionwith]]_blend_and_page_title_lower
- * [[Bruker:Stigmj/Old title_with_section|page_title_upper_linktext_lower]]with_blend
- * [[Bruker:Stigmj/Old title_with_section|Page_title_upper_Linktext_upper]]with_blend
- * [[bruker:Stigmj/Old title_with_section|page_title_lower_linktext_lower]]with_blend
- * [[bruker:Stigmj/Old title_with_section|Page_title_lower_Linktext_upper]]with_blend
- * [[Bruker:Stigmj/Old title_with_section|page_title_upper_linktext_lower]]<nowiki />with_blend_and_nowiki
- * [[Bruker:Stigmj/Old title_with_section|Page_title_upper_Linktext_upper]]<nowiki />with_blend_and_nowiki
- * [[bruker:Stigmj/Old title_with_section|page_title_lower_linktext_lower]]<nowiki />with_blend_and_nowiki
- * [[bruker:Stigmj/Old title_with_section|Page_title_lower_Linktext_upper]]<nowiki />with_blend_and_nowiki
+ * [[Bruker:Stigmj/New title#The section|Bruker:Stigmj/Old title_with_sectionwith]]_blend
+ * [[Bruker:Stigmj/New title#The section|Bruker:Stigmj/Old title_with_sectionwith]]_blend
+ * [[bruker:Stigmj/New title#The section|bruker:Stigmj/Old title_with_sectionwith]]_blend
+ * [[bruker:Stigmj/New title#The section|bruker:Stigmj/Old title_with_sectionwith]]_blend
+ * [[Bruker:Stigmj/New title#The section|Bruker:Stigmj/Old title_with_section]]<nowiki />with_blend_and_nowiki
+ * [[Bruker:Stigmj/New title#The section|Bruker:Stigmj/Old title_with_section]]<nowiki />with_blend_and_nowiki
+ * [[bruker:Stigmj/New title#The section|bruker:Stigmj/Old title_with_section]]<nowiki />with_blend_and_nowiki
+ * [[bruker:Stigmj/New title#The section|bruker:Stigmj/Old title_with_section]]<nowiki />with_blend_and_nowiki
Zoranzoki21 added a subscriber: Zoranzoki21.

Fixing redirects is another script

D3r1ck01 moved this task from Backlog to Needs Review on the Pywikibot board.Nov 5 2018, 11:27 AM