Hello Bináris,
Thanks for your reply.
Yes, I thought first about the bash/shell file with a bunch of
template.py commands but like you said, it's not very elegant as I
understand it would require several edits per page (one for each
template that requires a replacement).
I'll try the replace.py way configuring a series of user-fixes for said project.
Best regards, M.
El lun, 7 jun 2021 a las 16:34, Bináris (<wikiposta(a)gmail.com>) escribió:
>
>
>
> MarcoAurelio <strigiwm(a)gmail.com> ezt írta (időpont: 2021. jún. 7., H, 16:18):
>>
>> (e.g. just replace the template name leaving brakets
>> and parameters untouched i.e. {{template|1=parameter}}).
>
>
> This is the easiest case if only the template names change and there are no nested
templates. That's what replace.py is for.
>
> A fix r'\{\{oldtemplate(\|.*?)\}\}', r'{{newtemplate\1}}' should do
the work.
> A less elegant trick, if your problem is, that template.py should be run several
times: put the commands in a batch file / bash script.
>
> _______________________________________________
> pywikibot mailing list -- pywikibot(a)lists.wikimedia.org
> To unsubscribe send an email to pywikibot-leave(a)lists.wikimedia.org