Manual:Pywikibot/touch.py

From MediaWiki.org
Jump to: navigation, search
Wikimedia-logo-meta.png

This page was moved from MetaWiki.
It probably requires cleanup – please feel free to help out. In addition, some links on the page may be red; respective pages might be found at Meta. Remove this template once cleanup is complete.

Bug blank.svg
Wikimedia Git repository has this file:
compat: touch.py

When a page needs to be changed in order to refresh all kinds of relations, touch.py can do the work. This program updates a record without making any changes. Running touchall.py will not create entries on the "recent changes". Technically, what it does is take each page and save it, without making any changes (null edit), thus refreshing the relations with categories and other relations.

Scenario 1[edit | edit source]

When a category is added to a much used template, running touch.py will add the existing pages to the category.

Parameters[edit | edit source]

Basically touch.py understands the same like replace.py as well as the general parameters.

Furthermore the parameter purge is supported which applies a purge operation instead of a null edit to the selected files.

Examples[edit | edit source]

 touch.py -start:!
 python touch.py -lang:fr -family:wiktionary -cat:anglais
 python touch.py -lang:fr -family:wiktionary -transcludes:"pron-rég" -purge

See also[edit | edit source]