Page MenuHomePhabricator

Supporting on-wiki list of replacements similar to
Open, LowPublic


A list of allowed/denied replacements are used in the hewp bots template.

This doesnt appear to be documented on the template page.

If we can obtain more detail about this usage, we can find a way to support it.

Event Timeline

jayvdb created this task.Jun 13 2015, 2:07 AM
jayvdb updated the task description. (Show Details)
jayvdb raised the priority of this task from to Needs Triage.
jayvdb assigned this task to eranroz.
jayvdb added a project: Pywikibot.
jayvdb added a subscriber: jayvdb.
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. · View Herald TranscriptJun 13 2015, 2:07 AM

Thank you for being proactive and creating a bug for it.

Some more details on the requirements and the current implementations:

Pywikibot support:

  • pywikibot have with some very specific fixes (such as music/datum for German). I think it is better to maintain such lists of replacements on wiki, so non programmers will be able to contribute to the replacement list. (Security note: it may be dangerous to have it on wiki but hewikiReplacebot: 1. sysops can protect such page. 2. the bot includes whitelist list of allowed editors)

@Matanya operates the bot in hewiki and he suggested we may include it in pywikibot/scripts ( ). The question is whether there are other wikis that have (or would like to have) a on-wiki community maintained list of replacements?

eranroz renamed this task from hewiki {{bots}}/{{nobots}} is not supported to Supporting on-wiki list of replacements similar to 13 2015, 7:34 AM
eranroz set Security to None.
Xqt added a subscriber: Xqt.Jun 13 2015, 8:35 AM
Dvorapa added a subscriber: Dvorapa.EditedMar 2 2018, 10:09 AM

Copied from

On many projects there already is some list of common fixes (see e.g. frwiki, cswiki or hewiki in for WPCleaner or for AWB). Pywikibot could read their syntax as well. I imagine something like (pseudo code):

$ replace -fixes:local

fixes = []
if local and site, family in wd.Q10957404 and page(site, wd.Q10957404).exists():
    # read and translate WPCleaner fixes to Pywikibot fixes
    fixes += wpc_fixes
if local and site, family in wd.Q6585066 and page(site, wd.Q6585066).exists():
    # read and translate AWB fixes to Pywikibot fixes
    fixes += awb_fixes
if local and site, family in fixes_pages_dict and page(site, fixes_pages_dict[site]).exists():
    fixes += page(site, fixes_pages_dict[site]).text
# fix fixes
Framawiki added a subscriber: Framawiki.
MuhammadShuaib added a comment.EditedMar 12 2018, 11:57 AM

Thank you for being proactive and creating a bug for it.

Some more details on the requirements and the current implementations:

And Urdu Wikipedia also implemented this bot.

Plan from abandoned patch:

Module to gather and run fixes from several sources.

This module can load all the available fixes from multiple sources
and apply more of them at once to a specified page text. It can process
on-wiki defined fixes in AutoWikiBrowser, WPCleaner and Pywikibot
formats, local file and also some other fixes sent within
the calling script after-save hook. Some sample fixes are prepared
in the L{fixes script<scripts.fixes>}.

- rethink the dividing line between fixes and cc! find a way to support both of them on-wiki (possibly dangerous)? or support both of them locally (already works for user-fixes file right)?
- refine current Pywikibot fixes format
- run fixes on save hook for any script (not just (script defined, global param?)
- allow to run defined set of fixes automatically on cc hook (config option, user-changes file)?
- allow to run fixes independently (instead of -fix:a -fix:b, just a b)?

- load on-wiki fixes
- load local file fixes
- move some of the current fixes on-wiki
- what about the rest? leave them in some sort of sample file? or move the rest to the cc?
- check loaded fixes for syntax errors
- parse Pywikibot format (how was that parsed before?)
- parse AWB and WPCleaner format from on-wiki source (ask them for help)
- let's make Pywikibot great!
Xqt triaged this task as Low priority.Sep 29 2018, 5:07 AM
Xqt added a comment.Sep 29 2018, 5:09 AM

@Dvorapa: could you link that path for reusing it?

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