Page MenuHomePhabricator

add a way to overwrite pages using pywikibot
Open, MediumPublicFeature

Description

Feature summary (what you would like to be able to do and where):
From time to time I would need a way to overwrite the pages with a common prefix. There exist three scripts that go in this direction:

    • add_text - writes new pages or adds at the bottom or top the text
  • pagefromfile - with -force overwrites extisting file however does not work together with pagegenerators (so an external way to find all affected pages and feed them to the script is required)
  • replace - could replace the whole page-text ('.*' 'abcdef' -summary:"test" -regex -dotall) - however I doubt it is the efficient way

Use case(s) (list the steps that you performed to discover that problem, and describe the actual underlying problem which you want to solve. Do not describe only a solution):

  • on Wikisource a list of existing subpages could be re-generated (using for example a generic template or sth. like this)

Benefits (why should this be implemented?):

  • rather low priority, however I found it quite annoying and inconsistent not to be able to achieve it with the scritp pagefromfile or add_text