User:Ahechtbot
Operator: Ahecht (talk · contributions · Statistics · Recent activity · block log · User rights log · uploads · Global account information)
Bot's tasks: Many of the pages in Category:Days by day contain both {{YMDcat}} and {{Date navbox}}, both of which have been outputting the current date into the category description. {{Date navbox}} also has output a navbox, which is more useful. I have now integrated {{YMDcat}} into {{Date navbox}} so that both are no longer needed on the same page.
- The first task of the bot is to go through all category pages that transclude {{Date navbox}} and remove {{YMDcat}}.
pwb.py replace -always -transcludes:Template:Date_navbox -ns:14 -log -v -summary:"Bot: Removing redundant {{[[Template:YMDcat|YMDcat]]}} template (v2)" -regex "{{YMDcat(.*?)}}\n{{Date navbox(.*?)}}|{{Date navbox(.*?)}}\n{{YMDcat(.*?)}}" "{{Date navbox\2\3}}"
- The second task of the bot is to then go through all the remaining category pages that transclude {{YMDcat}} and replace it with {{Date navbox}}
pwb.py replace -always -transcludes:Template:YMDcat -ns:14 -log -v -summary:"Bot: Replacing {{[[Template:YMDcat|YMDcat]]}} with {{[[Template:Date navbox|Date navbox]]}}" -regex "{{YMDcat\|(.*?)\|(.*?)\|(.*?)\|(.*?)}}" "{{Date navbox|\1\2|\3|\4}}"
Automatic or manually assisted: Bot will be started manually. Once it is running, pywikibot will continue automatically with occasional supervision.
Edit type (e.g. Continuous, daily, one time run): One time run
Maximum edit rate (e.g. edits per minute): Pywikibot default (6 edits per minute)
Programming language(s): Pywikibot