Open main menu

MediaWiki β

Manual:Pywikibot/archivebot.py

< Manual:Pywikibot(Redirected from Manual:Pywikipediabot/archivebot.py)

Other languages:
català • ‎čeština • ‎Deutsch • ‎English • ‎español • ‎français • ‎italiano • ‎日本語 • ‎polski • ‎português • ‎português do Brasil • ‎русский • ‎中文
Git logo
Wikimedia Git repository has this file: scripts/archivebot.py

The archivebot.py is a script to archive discussion pages.

How it works?Edit

The bot examines backlinks (Special:Whatlinkshere) to the requested page(s). It then goes through all pages (or a specific page if specified using options) and archives old discussions. This is done by breaking a page into threads, then scanning each thread for timestamps. Threads older than a specified threshold are then moved to another page (the archive), the name of which can be based on either the thread's name or a counter that is incremented when the archive reaches a certain size. For a documentation on on-wiki setup, please see archivebot.py/setup.

ParametersEdit

Usage: archivebot.py [options] TEMPLATE_PAGE

Options:
  -help           show this help message and exit
  -calc:PAGE      calculate key for PAGE and exit
  -file:FILE      load list of pages from FILE
  -force          override security options
  -locale:LOCALE  switch to locale LOCALE
  -namespace:NS   only archive pages from a given namespace
  -page:PAGE      archive a single PAGE, default ns is a user talk page
  -salt:SALT      specify salt
  -simulate         Do not change pages, just simulate