Page MenuHomePhabricator

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

Description

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

Event Timeline

Stigmj claimed this task.
Stigmj raised the priority of this task from to Medium.
Stigmj updated the task description. (Show Details)
Stigmj added a project: Pywikibot-replace.py.

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
Kizule added a subscriber: Kizule.

Fixing redirects is another script

Aklapper added a subscriber: Stigmj.

Removing task assignee due to inactivity, as this open task has been assigned to the same person for more than two years (see the emails sent to the task assignee on Oct27 and Nov23). Please assign this task to yourself again if you still realistically [plan to] work on this task - it would be welcome.
(See https://www.mediawiki.org/wiki/Bug_management/Assignee_cleanup for tips how to best manage your individual work in Phabricator.)