Manual:Pywikibot/archivebot.py/setup

The archivebot.py is a script to archive discussion pages. Here we explain how to set up discussion pages on-wiki for the automatic archiving done by this bot. For a documentation on how to operate the bot, please see Manual:Pywikibot/archivebot.py.

How to set up for a discussion page
This bot only processes pages that are explicitly marked by transcluding a marker template. A commonly used marker template is. The template may have following parameters. (Most of them are optional.)

Meanings of the template's parameters are: archive             Name of the page to which archived threads will be put. Must be a subpage of the current page. Variables are supported. algo                specifies the maximum age of a thread. Must be in the form old where specifies the age in hours or                    days like 24h or 5d. Default is old(24h) counter             The current value of a counter which could be assigned as                     variable. Will be actualized by bot. Initial value is 1. maxarchivesize      The maximum archive size before incrementing the counter. Value can be given with appending letter like K or M which indicates KByte or MByte. Default value is 1000M. minthreadsleft      Minimum number of threads that should be left on a page. Default value is 5. minthreadstoarchive The minimum number of threads to archive at once. Default value is 2. archiveheader       Content that will be put on new archive pages as the header. This parameter supports the use of variables. Default value is key                 A secret key that (if valid) allows archives to not be                     subpages of the page being archived.

How to prevent archiving
To prevent a section (thread) from being archived, you can edit the section and insert a signature with a future timestamp indicating the deadline. (Remember that the bot will archive after the period specified in the template has passed after the newest timestamp in a section.)

You can imitate an indefinite block of archiving using a reasonably distant future timestamp, such as " (UTC)". The dummy signature could be written as a comment to not confuse readers.

You might want to have on your wiki a substitutable template for this particular purpose: w:Template:DNAU.