Pywikibot example to add or update template parameters on a page

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Pywikibot example to add or update template parameters on a page

Hogan (US), Michael C
Can anyone recommend an example or tutorial that demonstrates how to use Pywikibot for template parameter maintenance? Given a page title, I'd like to: (1) look for a template on the page, (2) add the template if it's missing, (3) set template parameters to specified values. Thank you!
-Michael H.

_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: Pywikibot example to add or update template parameters on a page

Pavel Astakhov
You can use wikicode parser mwparserfromhell, and there are some
examples https://github.com/earwig/mwparserfromhell

Pavel

On 11.06.2020 02:16, Hogan (US), Michael C wrote:
> Can anyone recommend an example or tutorial that demonstrates how to use Pywikibot for template parameter maintenance? Given a page title, I'd like to: (1) look for a template on the page, (2) add the template if it's missing, (3) set template parameters to specified values. Thank you!
> -Michael H.
>
> _______________________________________________
> Wikitech-l mailing list
> [hidden email]
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l



_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l