ବ୍ୟବହାରକାରୀ:Orbot0/Archive HowTo
There are 3 bots that perform archiving of pages for different namespaces:
- ଆଲୋଚନା: namespace - [[::User:orbot0|orbot0]] ([[::User talk:orbot0|talk]] · [[::Special:Contributions/orbot0|contribs]])
- ଉଇକିପିଡ଼ିଆ:, ଉଇକିପିଡ଼ିଆ ଆଲୋଚନା: and ଟେଁପଲେଟ ଆଲୋଚନା: namespaces - [[::User:orbot1|orbot1]] ([[::User talk:orbot1|talk]] · [[::Special:Contributions/orbot1|contribs]])
- ବ୍ୟବହାରକାରୀଙ୍କ ଆଲୋଚନା: namespace - [[::User:orbot2|orbot2]] ([[::User talk:orbot2|talk]] · [[::Special:Contributions/orbot2|contribs]])
Before setting up automatic archiving on an article's talk page, please establish a consensus that archiving is really needed there. |
Setting up archiving
ସମ୍ପାଦନାPut the following template at the top of the page that you want automatically archived:
The exact code below won't work - please see the examples for possible options - I'm tired of fixing dozens of malformed templates. |
{{User:orbot0/config | algo = old(...) | archive = Name of archive page [other parameters - ***read below***] }}
Well, maybe not exactly that (read about required options below), but that's how it's done. By the way, the template has no content and is sysop-protected, so don't worry about visual appearance. :)
The bot expects to see only one parameter per line. The closing }} must be on its own line. There must be no leading spaces before the pipes. If you drop out the newlines used in the above example, e.g. by wrapping the template invocation onto a single line, the bot may not do what you expect.
Also, the template must be located:
- before the first ==second level header== on the page
- on the actual page and not transcluded from a subpage, such as a page header, etc.
Quick examples
ସମ୍ପାଦନାTo get the hang of it - configuration may not be intuitive, but it's flexible and gives potentially vast possibilities.
- Please change "User talk:Example" to the exact name of your own page!
- If it's still not working, read about the "minthreadsleft" and "minthreadstoarchive" parameters below.
Example 1 - static archive
ସମ୍ପାଦନାWhile the simplest, this is probably not the best option - the second example is the most common. |
{{User:orbot0/config | algo = old(7d) | archive = User talk:Example/Archive }}
This setup archives threads from User talk:Example to User talk:Example/Archive after they are 7 days old (counting from newest timestamp). The archive will grow indefinitely. Probably not a very useful config (unless for sending threads to a periodically cleaned trash bin or to decide yourself when to go to the next archive page), but it's easiest, so I'm mentioning it first.
Example 2 - incremental archives
ସମ୍ପାଦନା{{User:orbot0/config | algo = old(31d) | archive = User talk:Example/Archive %(counter)d | counter = 1 | maxarchivesize = 70K | archiveheader = {{talk archive navigation}} | minthreadstoarchive = 1 | minthreadsleft = 4 }}
This tells the bot to archive threads over a month old (leaving the four most recent) from User talk:Example to User talk:Example/Archive 1 (more about variables below) until it fills up to 70 kilobytes, whereupon the bot will move to 2 (updating the counter when saving page). Remember to specify the maximum size of an archive, or it will behave pretty much like in the first example. In addition, each archive page is given a {{talk archive navigation}} banner, which makes it easy to move between the different archive pages.
Example 3 - date-based archives
ସମ୍ପାଦନାDo not substitute the "year" and "monthname" with actual values - the bot will treat them as variables accordingly. |
{{User:orbot0/config | algo = old(5d) | archive = User talk:Example/Archives/%(year)d/%(monthname)s }}
In this configuration, threads older than 5 days will land in archives depending on their date (that is newest timestamp). You can read about other variables below.
Parameters explained
ସମ୍ପାଦନା{{User:orbot0/config | archive = | algo = | counter = | maxarchivesize = | minthreadsleft = | minthreadstoarchive = | archiveheader = | key = }}
parameter | meaning |
---|---|
archive | Name of the page to which archived threads will be put. This parameter supports the use of variables, which can be used to create dynamically named archives (such as using date ranges). Note that magic words and templates do not work with this parameter, and unless a key is supplied (see below), the target page must be a subpage of the current page. |
algo | Algorithm that instructs the bot how to decide whether to archive a thread or not. Complex formulas (including regex matching) will be available in the future, but so far it must be of the form old(...) where ... specifies the maximum age of a thread (in hours or days: 24h, 72h, 5d, 21d etc.) |
counter | The current value of the counter. If the %(counter)d variable is not used, it is ignored. orbot0 will update this parameter as necessary. |
maxarchivesize | The maximum archive size before incrementing the counter. Ignored if counter is not used. The values used must be in a #K format, using a capital letter "K". For example: maxarchivesize=256K |
minthreadsleft | The minimum number of threads that should be left on a page (to prevent pages from getting completely harvested). Default value: 5 |
minthreadstoarchive | The minimum number of threads to archive at one time, which is used to lower edit frequency. MiszaBot will not archive threads when fewer than the value of this parameter would be archived. Default value: 2 |
archiveheader | Content that will be put on new archive pages as the header. This parameter supports the use of variables. The value of this parameter Cannot be multiline! Use a template such as {{archive navigation}} in order to add significant content. The Default value is {{talk archive}}. |
key | A secret key that (if valid) allows archives to not be subpages of the page being archived. To obtain such a key, ask me and have a good reason for that. :-) |
Variables
ସମ୍ପାଦନାvariable... | ...expands to... |
---|---|
%(counter)d | the current value of the counter |
%(year)d | year of the thread being archived |
%(month)d | month (as a number 1-12) of the thread being archived |
%(monthname)s | English name of the month above |
%(monthnameshort)s | first three letters of the name above |
Those python-savvy people will immediately recognize these variables are filled at runtime with the % operator and should know how to adjust the format. A few points of interest to others:
After you have set up archiving
ସମ୍ପାଦନାThe bot runs once a day at a preset hour, or twice a day for WP:AN and WP:AN/I. Simply wait for the next cycle and you should see the bot's entries in the history list of your article providing there was anything to archive, and the history list entry should provide a link to the archive page you specified.
Various templates will produce an automatic list of archive subpages. Typically, such a template will be added to the top-level talk page to make archives easier to find. Simply add the template name in {{curly-braces}}
where you want it to appear. Popular templates used for this purpose include:
{{archives}}
{{archive box}}
{{talk header}}
(this template has other functions, but can include a list of archives and a search box)
Delaying or preventing archival of particular threads
ସମ୍ପାଦନାArchiving can be delayed for a particular thread by substituting the template {{DNAU}} into the thread. Use {{subst:DNAU}}
to retain a thread indefinitely, or {{subst:DNAU|<integer>}}
to retain a thread for <integer> days. see the template documentation for details about its use and function.
See also
ସମ୍ପାଦନା- User:HBC Archive Indexerbot - Creates a subject index of archived talk pages automatically
- {{auto archiving notice}} - a header to add to pages with automatic archiving