Manual:Pywikibot/newitem.py

From MediaWiki.org
Jump to navigation Jump to search
Git logo
Wikimedia Git repository has this file: scripts/newitem.py

newitem.py is a script to mass create new Wikidata items.

Concept[edit]

New articles get created all the time on Wikipedia. With this script you can create new items connected to these articles. The bot looks at the age of the page and the last edit to the article. If both exceed the minimum threshold, the new item will be created. The default thresholds is 21 days for article creation and 7 days since last edit.

Syntax[edit]

The bot expects a generator:

python newitem.py <some generator>

You can modify the thresholds. This is the number of days. For example minimum age of 7 days and not edited for 2 days:

python newitem.py -pageage:7 -lastedit:2 <some generator>