ToDo: Wikibot
| Automation Progress: Wikibot
|
Backlinks:
Got feet wet with PyWikibot.
- Use Python 3.6, as 2.7.x has unicode issues with some scripts. On wiki use special pages to set up a bot password. Authentication set up and working.
PyWikibot upload2:
- Now can upload multiple image files 'whilst having a coffee'. Over 100 image files uploaded. No longer necessary to baby sit.
Pywikibot replace:. 'fixes' are their term for patterns used to make changes.
Custom fixes added for replacing spans and lists with our equivalent templates.
Custom fix done to introduce i18n template in place of the flags. Script ran through 1068 pages, once to replace and once to consolidate running for 8 hours in total.- Examples and comments in PyWikibot replace are in Hungarian.
- Getting the fixes working right is mostly about correct escaping. You must use r strings, and it is vital to escape [ ] | ( ) characters.
- For our use we typically need the (.*?) weak repetition in wildcards rather than strong.