Editing User:ArchiveBot
520 editsJoined
More actions
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
| Latest revision | Your text | ||
| Line 1: | Line 1: | ||
{{Bot|Shane| | {{Bot|Shane|dev}} | ||
Hello. I am the '''ArchiveBot''' that makes archives for | Hello. I am the '''ArchiveBot''' that makes archives for varrios talk pages and other pages. I am built using the [http://sourceforge.net/projects/pywikipediabot/ pywikipediabot] Python code. Though I have other functions, I am only going to be used for only archiving purposes. [http://meta.wikimedia.org/wiki/Archivebot.py Archivebot.py] is the primary file that I use. | ||
== How to set up archiving? == | == How to set up archiving? == | ||
Put the following template on | Put the following template on the page that you want automatically archived: | ||
<pre><nowiki> | <pre><nowiki> | ||
{{Template:Archive-bot | {{Template:Archive-bot | ||
|algo = old(...) | | algo = old(...) | ||
|archive = Name of archive page | | archive = Name of archive page | ||
[ other parameters - read below ] | [ other parameters - read below ] | ||
}} | }} | ||
| Line 19: | Line 19: | ||
<pre><nowiki> | <pre><nowiki> | ||
{{Template:Archive-bot | {{Template:Archive-bot | ||
|algo = old(7d) | | algo = old(7d) | ||
|archive = User talk:Example/Archives | | archive = User talk:Example/Archives | ||
}} | }} | ||
</nowiki></pre> | </nowiki></pre> | ||
| Line 29: | Line 29: | ||
<pre><nowiki> | <pre><nowiki> | ||
{{Template:Archive-bot | {{Template:Archive-bot | ||
| algo = old(48h) | |||
| archive = User talk:Example/Archive%(counter)d | |||
|algo = old( | | counter = 3 | ||
|archive = User talk:Example/Archive%(counter)d | | maxarchivesize = 250K | ||
}} | }} | ||
</nowiki></pre> | </nowiki></pre> | ||
This tells | This tells the bot to archive threads from <code>User talk:Example</code> to <code>User talk:Example/Archive3</code> (more about variables [[#Variables|below]]) until it fills up to 250 kilobytes, whereupon the bot will move to 4 (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. | ||
==== Example 3 - Date-based archives ==== | ==== Example 3 - Date-based archives ==== | ||
<pre><nowiki> | <pre><nowiki> | ||
{{Template:Archive-bot | {{Template:Archive-bot | ||
|algo = old(5d) | | algo = old(5d) | ||
|archive = User talk:Example/Archives/%(year)d/%(monthname)s | | archive = User talk:Example/Archives/%(year)d/%(monthname)s | ||
}} | }} | ||
</nowiki></pre> | </nowiki></pre> | ||
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 [[#Variables|below]]. | 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 [[#Variables|below]]. | ||
=== Parameters explained === | === Parameters explained === | ||
{| class = "messagebox" | {| class = "messagebox" | ||
! Parameter || Meaning | ! Parameter || Meaning | ||
|- | |- | ||
| <tt>archive</tt> || Name of the page to which archived threads will be put. Supports [[#Variables|variables]]. | | <tt>archive</tt> || Name of the page to which archived threads will be put. Supports [[#Variables|variables]]. | ||
|- | |- | ||
| <tt>algo</tt> || 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 '''<tt>old(...)</tt>''' where '''...''' specifies the maximum age of a thread (in hours or days: ''24h'', ''72h'', ''5d'', ''21d'' etc.) | | <tt>algo</tt> || 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 '''<tt>old(...)</tt>''' where '''...''' specifies the maximum age of a thread (in hours or days: ''24h'', ''72h'', ''5d'', ''21d'' etc.) | ||
|- | |- | ||
| <tt>counter</tt> || The current value of the counter. If the <tt>%(counter)d</tt> variable is not used, it is ignored. Bot will update this parameter as necessary. | | <tt>counter</tt> || The current value of the counter. If the <tt>%(counter)d</tt> variable is not used, it is ignored. Bot will update this parameter as necessary. | ||
|- | |- | ||
| <tt>maxarchivesize</tt> || Specifies the maximum archive size before incrementing the counter. Ignored if counter is not used. | |||
|} | |||
| <tt>maxarchivesize</tt> || Specifies the maximum archive size before incrementing the counter. Ignored if counter is not used. | |||
|} | |||
=== Variables === | === Variables === | ||
| Line 88: | Line 77: | ||
| <tt>%(monthnameshort)s</tt> || first three letters of the name above | | <tt>%(monthnameshort)s</tt> || first three letters of the name above | ||
|} | |} | ||