Misplaced Pages

User:ClueBot III/Documentation: Difference between revisions

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
< User:ClueBot III Browse history interactively← Previous editContent deleted Content addedVisualWikitext
Revision as of 09:40, 4 February 2017 edit5 albert square (talk | contribs)Autopatrolled, Administrators68,587 edits How your page is archived: updated← Previous edit Latest revision as of 09:15, 23 November 2024 edit undoRetro (talk | contribs)Extended confirmed users5,022 edits Normalize docs + categorize. 
(45 intermediate revisions by 23 users not shown)
Line 1: Line 1:
{{Documentation subpage|]|override=documentation}}
<noinclude>{{nobots}}<!-- Try to prevent ClueBot III from creating an index from this page -->
{{High-use|12000|demo=User:ClueBot III/ArchiveThis}}
{{notice|In order to edit/view this page here you will need to revert ] {{history|User:ClueBot III/Documentation|to a version that is short}}. ClueBot III routinely updates that page with a large number of articles. That page is transcluded into the archive boxes produced by the ClueBot III template. It only results in a problem when viewing this documentation page, not when this page is transcluded onto where it is normally viewed: ].}}</noinclude>
{{Bot use warning|bots=]}}


==Quick start==
{{Warning|1=Cluebot III is currently underperforming when confronted with large collections of archive pages for the same talk page (around 200 archive pages for the same talk page seems to be a maximum that should not be exceeded). The issue is discussed at ]. Please don't remove this warning before all related issues are resolved. --] (]) 11:02, 27 January 2016 (UTC)}}
If you want to take default options and just get archives up and running on your page, just place this at the top of the talk page you want archived: {{tlsx|User:ClueBot III/JustArchiveThis}}.

If you want to configure it more, read on for how to use the full ArchiveThis template.
You can use {{tls|Setup cluebot archiving}} to automatically add a talk header, an archiving notice, and/or a list of archives.


==How your page is archived== ==How your page is archived==

# ClueBot III can be used to automatically archive sections/threads from a given page. Usually the page you are archiving from will be a talk page. Your archive pages can be numbered, or organized by date. Combinations of dates and numbering are also possible. This is configured by the arguments used for the ''']''' and ''']''' parameters. Please see the ] and ] for a few of the many ways to do this. ClueBot III can be used to automatically archive sections/threads from a given page. Usually the page you are archiving from will be a talk page. Your archive pages can be organized by date, or numbered. Combinations of dates and numbering are also possible. This is configured by the arguments used for the ''']''' and ''']''' parameters. Please see the ] and ] for a few of the many ways to do this.
#:&nbsp;

# Archiving by date doesn't means storing according to the last date of each section, but <span style="color:red;">'''storing according to the archiving decision'''.</span> Better use ] if you want to segment a talk page according to the dates of the threads.
=== How does ClueBot III know when to archive my page? ===
#:&nbsp;
ClueBot III works based on the '''revision history''' of the page in question, and '''not on the timestamps''' associated with signatures. This means that the practice of manually adding a timestamp way in the future will not work to prevent ClueBot III from archiving a thread. Furthermore, on one archival sweep, ClueBot III will select an archive target and will archive all eligible threads to that archive. This means that when you initially set up ClueBot III, if you have untidy archives then, it will sweep all of the old conversations into whatever archive it deems to be the current one. It also means that pages with massively long discussion threads will have the entire thread archived into the current archive, which can cause slight overstuffing of size-based archives.
# Archive boxes. ClueBot III gives you two methods for configuring an archive box. You can set <code>archivebox=yes</code> and use the cosmetic parameters to configure the archive box provided by {{tlu|User:ClueBot III/ArchiveThis}}. Or you can set <code>archivebox=yes|index=true</code>. Then template {{tlu|User:ClueBot III/ArchiveThis}} will result into the ] a ClueBot III generated list of archive pages (that can be used inside an {{tl|archivebox}} template. This is useful when archiving is organized by date rather than only by number. When using the standard archiving by number, the various ] can be configured to automatically detect the archive pages. For more information, see the ''']''' and ''']''' parameters.

#:&nbsp;
=== Keeping linked ===
# Keeping linked, i.e. updating the links to the archived threads. Once a series of threads is archived, ClueBot III looks for all pages that could have been linked to the moved parts, and updates the links that need to be fixed. <span style="color:red;"> '''When a page is linked to a huge number of others pages, the process takes a lot of time'''</span>. In fact, only the links to an internal anchor of the page should be checked. In any case, this is the reason of collapse described at ]. <span style="color:red;"> '''Said more clearly: don't use ClueBot III on a page where the ''what links here'' are large'''</span>.
Once a series of threads is archived, ClueBot III looks for all pages that linked to the moved parts, and updates the links to point to the archives, ensuring that no links are broken.
#:&nbsp;

# In addition to archiving your page, ClueBot III can also generate an index of all your archive pages. Assuming that you are archiving the page <tt>Talk:YourPage</tt>, the archive index generated by Cluebot III is located at:<br /> <tt>User:ClueBot III/Master Detailed Indices/Talk:YourPage</tt><br /> You can make use of this either directly or by transcluding it onto your <tt>Talk:YourPage/Archive index</tt> page. One way to use this directly would be to include it as the archive index page in your archive box. For example:<br /> <code><nowiki>{{Archives |auto= short |index= User:ClueBot III/Master Detailed Indices/{{FULLPAGENAME}} |search= yes |bot= ClueBot III |age= 90}}</nowiki></code><br /> will produce an archive box with an appropriate link to your index. If you want to use this index with the {{tl|talk header}} template you will need to transclude it onto your <tt>Talk:YourPage/Archive index</tt> page. To do so you would put the text:<br /> <code><nowiki>{{User:ClueBot III/Master Detailed Indices/{{NAMESPACE}}:{{BASEPAGENAME}}}}</nowiki></code><br /> on your </tt>Talk:YourPage/Archive index</tt> page.
ClueBot III can correctly handle most talk pages, but may not be able to handle pages with a large ] list, as the link updating process will take a lot of time and may prevent other pages from being archived (see ]). Consider using ] to archive pages that are linked to from many places.

=== Index generation ===

In addition to archiving your page, ClueBot III can also generate an index of all your archive pages. Assuming that you are archiving the page <samp>Talk:YourPage</samp>, the archive index generated by ClueBot III is located at:<br /> <samp>User:ClueBot III/Master Detailed Indices/Talk:YourPage</samp><br /> You can make use of this either directly or by transcluding it onto your <samp>Talk:YourPage/Archive index</samp> page. One way to use this directly would be to include it as the archive index page in your archive box. For example:<br /> <code><nowiki>{{Archives |auto= short |index= User:ClueBot III/Master Detailed Indices/{{FULLPAGENAME}} |search= yes |bot= ClueBot III |age= 90}}</nowiki></code><br /> will produce an archive box with an appropriate link to your index.

The {{tl|talk header}} template automatically detects the existence of this index and will link it accordingly.


==General template format== ==General template format==
Line 19: Line 31:


<pre> <pre>
<nowiki>{{User:ClueBot III/ArchiveThis <nowiki>{{</nowiki><nowiki>User:ClueBot III/ArchiveThis
|archiveprefix= |archiveprefix=
|format= |format=
Line 31: Line 43:
''Type'': unsigned integer<br /> ''Type'': unsigned integer<br />
''Default'': 0<br /> ''Default'': 0<br />
''Description'': This parameter must be set to the number '''of hours''' a thread can go without a reply before it should be archived. If you do not set it '''all''' threads will qualify to be archived. ''Description'': This parameter must be set to the number of '''hours''' a thread can go without a reply before it should be archived. If you do not set it '''all''' threads will qualify to be archived. For 30 days, enter 720, and for one year, enter 8760.




{{anchor|archiveprefix}}'''archiveprefix'''<br /> {{anchor|archiveprefix}}'''archiveprefix'''<br />
''Type'': string<br /> ''Type'': string<br />
''Description'': This parameter must be set to a fully qualified page name under the page you wish to archive. For example, if <samp>User&nbsp;talk:Cobi</samp> was being archived using dated archives, then <code>archiveprefix=User&nbsp;talk:Cobi/Archives/</code> would be appropriate. For the same page being archived with numbered archives, <code>archiveprefix=User&nbsp;talk:Cobi/Archive</code> would be appropriate. Not setting this parameter correctly can have some strange results. The {{tlf|]}} variable can not actually be passed to ClueBot III. The fully qualified page name must be hard coded. The easiest way to do this is to use immediate ] as follows:<br />
''Default'': "<nowiki>{{</nowiki>]<nowiki>}}</nowiki>/Archives/" <br />
''Description'': This parameter must be set to a fully qualified page name under the page you wish to archive. For example, if <tt>User&nbsp;talk:Cobi</tt> was being archived using dated archives, then <code>archiveprefix=User&nbsp;talk:Cobi/Archives/</code> would be used. For the same page being archived with numbered archives, <code>archiveprefix=User&nbsp;talk:Cobi/Archive</code> would be appropriate. If you do not set this argument, or if you set it to something invalid, then the default value will be used. However, not setting this parameter correctly can have some strange results. The <nowiki>{{</nowiki>]<nowiki>}}</nowiki> variable can not actually be passed to ClueBot III. The fully qualified page name must be hard coded. The easiest way to do this is to use immediate substitution such as:<br />
For archives organized by date enter:<br /> For archives organized by date enter:<br />
<code><nowiki>|archiveprefix={{subst:FULLPAGENAME}}/Archives/</nowiki></code><br /> {{para|archiveprefix|{{tlf|subst:#titleparts:{{tlf|subst:FULLPAGENAME}}}}/Archives/}}<br />
For numbered archives enter (note <tt>/Archive</tt> instead of <tt>/Archives/</tt>):<br /> For numbered archives enter (note <samp>/Archive</samp> instead of <samp>/Archives/</samp>):<br />
<code><nowiki>|archiveprefix={{subst:FULLPAGENAME}}/Archive</nowiki></code><br /> {{para|archiveprefix|{{tlf|subst:#titleparts:{{tlf|subst:FULLPAGENAME}}}}/Archive}}<br />


{{anchor|PAGENAMEE}}Warning: system variables such as <nowiki>{{SUBST:FULLPAGENAME}}</nowiki> are replaced by the page name to be archived when the system variable is saved to the page to be archived. However some punctuation characters that can appear in a page name (<code>"&'</code>) are replaced by HTML character codes that are not recognised by the bot (see ] for details about these and other characters). For example <code>'</code> is replaced with <code>&#39&#59;</code> (so if the bot is to work then <code>&#39&#59;</code> must be replaced with <code>'</code>. This can be circumvented by using <code><nowiki>{{SUBST:#titleparts:{{SUBST:FULLPAGENAME}}}}</nowiki></code> to automatically sort the encoding.




Line 48: Line 60:
''Type'': string<br /> ''Type'': string<br />
''Default'': ""<br /> ''Default'': ""<br />
''Description'': This parameter must be set to a valid argument to ]'s function. You may also include an <tt>%%i</tt> value. <tt>%%i</tt> is for numbered archives instead of dated archives, and is replaced with the archive number. Once variable substitution has occurred it will be concatenated onto the end of the value of ''archiveprefix''. The result of the concatenation will be the the name of the archive page(s). See examples. Most commonly, for archives organized by date use:<br /> ''Description'': This parameter must be set to a valid argument to ]'s function. You may also include an <samp>%%i</samp> value. <samp>%%i</samp> is for numbered archives instead of dated archives, and is replaced with the archive number. Once variable substitution has occurred it will be concatenated onto the end of the value of ''archiveprefix''. The result of the concatenation will be the name of the archive page(s). See examples. Most commonly, for archives organized by date use:<br />
<code>|format=Y/F</code>. <code>|format=Y/F</code>.
This gives "Archives/2016/January". In order to obtain "Archives/2016/01 (January)", use <code>|format='Y/m (F)'</code>. <br /> This gives "Archives/2016/January". In order to obtain "Archives/2016/01 (January)", use <code>|format=Y/m (F)</code>. <br />
For numbered archives use:<br /> For numbered archives use (note the single space after the equals sign):<br />
<code>|format= %%i</code><br /> <code>|format= %%i</code><br />
Note for date based archives: Cluebot III stores files into a ''single'' archive page each time it runs. With date based archives, the page name is whatever <tt>archiveprefix</tt> concatenated with <tt>format</tt> is for the date that is NOW-age (where age is in hours). For example, if you are starting up YYYY/Month archiving from scratch with many old threads in the page being archived, ClueBot II will put ''all'' of the threads into a single file, not multiple files. If you want a single archiving run to be split into multiple files based on the last date in each thread you will need to use ] (lowercase sigmabot III). Note for date-based archives: Cluebot III stores files into a ''single'' archive page each time it runs. With date-based archives, the page name is whatever <samp>archiveprefix</samp> concatenated with <samp>format</samp> is for the date that is NOW-age (where age is in hours). For example, if you are starting up YYYY/Month archiving from scratch with many old threads in the page being archived, ClueBot III will put ''all'' of the threads into a single file, not multiple files. If you want a single archiving run to be split into multiple files based on the last date in each thread you will need to use ].<br>
Note: <code>format= %%i</code> is better in most cases. <code>format=Y/F</code> can end up as many tiny archives that can take forever to look through manually when a user is not sure what search term to look for with the archive search tool.


===Optional parameters=== ===Optional parameters===


These parameters are shaping the behavior of the archiver. These parameters control the behavior of the archiver.


{{anchor|archivenow}}'''archivenow'''<br /> {{anchor|archivenow}}'''archivenow'''<br />
''Type'': comma delimited array of strings<br /> ''Type'': comma delimited array of strings<br />
''Default'': ""<br /> ''Default'': ""<br />
''Description'': This optional parameter should contain a comma separated list of strings for which ClueBot III will search within the threads on the page. If any of these strings are found in a thread, the bot will archive the thread immediately. The bot will also convert <nowiki>{{templates}}</nowiki> in this list to <nowiki>{{tl|escaped templates}}</nowiki> upon archival. This could be useful for pages where {{tl|resolved}} or such is used. The {{tlu|User:ClueBot III/ArchiveNow}} blank template is available for this use. However, it has no special properties. It is only just another string that happens to be a template for which ClueBot III can be told to search. In addition to the following typical usage, an example of its use is ].<br /> ''Description'': This optional parameter should contain a comma separated list of strings for which ClueBot III will search within the threads on the page. If any of these strings are found in a thread, the bot will archive the thread immediately. The bot will also convert {{tlf|templates}} in this list to {{tlf|tl|escaped templates}} upon archival. This could be useful for pages where {{tl|resolved}} or such is used. The {{tlu|User:ClueBot III/ArchiveNow}} blank template is available for this use. However, it has no special properties. It is only just another string that happens to be a template for which ClueBot III can be told to search. In addition to the following typical usage, an example of its use is ].<br />
Typical usage: <code><nowiki>|archivenow=<nowiki>{{User:ClueBot III/ArchiveNow}}</nowiki></nowiki></code> Typical usage: <code><nowiki>|archivenow=<nowiki>{{User:ClueBot III/ArchiveNow}}</nowiki></nowiki></code>
<br /> <br />
Line 69: Line 82:
{{anchor|header}}'''header'''<br /> {{anchor|header}}'''header'''<br />
''Type'': string<br /> ''Type'': string<br />
''Default'': "{{tl|Talkarchive}}"<br /> ''Default'': "{{tl|Archive}}"<br />
''Description'': When creating a new archive page, the bot will put this at the top of the new page.<br /> ''Description'': When creating a new archive page, the bot will put this at the top of the new page.<br />


Line 88: Line 101:
''Type'': unsigned integer, greater than 10000<br /> ''Type'': unsigned integer, greater than 10000<br />
''Default'': 0<br /> ''Default'': 0<br />
''Description'': The target maximum size of the archive in bytes before ''%%i'' (see ''']''') is incremented. If 0, this is disabled. In general, this parameter is used for numbered archives, but not for archives organized by date. This is not a hard limit. Resulting archive page sizes will almost always exceed this number, perhaps by a great amount. Each time ClueBot III runs on a page it archives all threads that are old enough to qualify for archiving into a ''single'' file. If you have <code>maxarchsize=100000</code> with a current archive file size of 90k and it ends up that there are 60 threads to archive with a total size of 250k, then the current archive will be extended to 340k despite of the 100k limit.<br /> ''Description'': The target maximum size of the archive in bytes before ''%%i'' (see ''']''') is incremented. If 0, this is disabled. In general, this parameter is used for numbered archives, but not for archives organized by date. This is not a hard limit. Resulting archive page sizes will almost always exceed this number, perhaps by a great amount. Each time ClueBot III runs on a page it archives all threads that are old enough to qualify for archiving into a ''single'' file. If you have <code>maxarchsize=100000</code> with a current archive file size of 90k and it ends up that there are 60 threads to archive with a total size of 250k, then the current archive will be extended to 340k despite the 100k limit.<br />




Line 128: Line 141:


{{anchor|transformheader}}'''transformheader''' ''Warning! An invalid option here can screw up your archives!''<br /> {{anchor|transformheader}}'''transformheader''' ''Warning! An invalid option here can screw up your archives!''<br />
''Type'': string, <tt>search===replace</tt> pairs delimited by <tt>&&&</tt><br /> ''Type'': string, <samp>search===replace</samp> pairs delimited by <samp>&&&</samp><br />
''Default'': ""<br /> ''Default'': ""<br />
''Description'': Convert archived thread headers. For each pair, <tt>search</tt> must be a valid regular expression and <tt>replace</tt> is a replacement string. See for more information, <tt>search</tt> corresponds to <tt>$pattern</tt>, <tt>replace</tt> corresponds to <tt>$replacement</tt>, and the thread header corresponds to <tt>$subject</tt>. If you do not understand what this does, don't try to use it. Instead, ask for help from ].<br /> ''Description'': Convert archived thread headers. For each pair, <samp>search</samp> must be a valid regular expression and <samp>replace</samp> is a replacement string. See for more information, <samp>search</samp> corresponds to <samp>$pattern</samp>, <samp>replace</samp> corresponds to <samp>$replacement</samp>, and the thread header corresponds to <samp>$subject</samp>. If you do not understand what this does, don't try to use it. Instead, ask for help from ].<br />




===Cosmetic parameters=== ===Cosmetic parameters===
Line 144: Line 155:
''Type'': string ("yes" or "no")<br /> ''Type'': string ("yes" or "no")<br />
''Default'': "no"<br /> ''Default'': "no"<br />
''Description'': Causes an archive box to be displayed similar to {{tl|archive box}}<br /> ''Description'': Causes an archive box to be displayed similar to {{tl|archives}}<br />
The example archive box is with non-default value of <code>archivebox=yes</code>. The example archive box is with non-default value of <code>archivebox=yes</code>.


Line 207: Line 218:
''Type'': string <br /> ''Type'': string <br />
''Default'': ""<br /> ''Default'': ""<br />
''Description'': This parameter is only valid if <code>archivebox=yes</code> and the page on which the archive box is displayed is in the <tt>User talk</tt> namespace. If not set, or set to anything other than ''yes'', the color scheme of the archive box on a <tt>User talk</tt> page will not be the standard talk page color scheme. In such a case, the archive box will use the same color scheme as is used for archive boxes on non-talk pages. If this parameter is set to ''yes'' and the page on which the archive box is displayed is in the <tt>User talk</tt> namespace, the archive box will use the standard talk page color scheme.<br/> ''Description'': This parameter is only valid if <code>archivebox=yes</code> and the page on which the archive box is displayed is in the <samp>User talk</samp> namespace. If not set, or set to anything other than ''yes'', the color scheme of the archive box on a <samp>User talk</samp> page will not be the standard talk page color scheme. In such a case, the archive box will use the same color scheme as is used for archive boxes on non-talk pages. If this parameter is set to ''yes'' and the page on which the archive box is displayed is in the <samp>User talk</samp> namespace, the archive box will use the standard talk page color scheme.<br/>
The two parameters are equivalent, and are only provided to avoid an attrition war in the MOS-style. The two parameters are equivalent, and are only provided to avoid an attrition war in the MOS-style.


Line 217: Line 228:
''Type'': string <br /> ''Type'': string <br />
''Default'': ""<br /> ''Default'': ""<br />
''Description'': All values of this parameter are equivalent except ''yes''. This parameter should not be set to ''yes'' unless you have wrapped the ClueBot III template with an {{tl|archive box}}. ''Description'': All values of this parameter are equivalent except ''yes''. This parameter should not be set to ''yes'' unless you have wrapped the ClueBot III template with {{tl|archives}}.
Using <code>index=yes</code> results in the ClueBot III automatically generated index contained on the page <tt>User:ClueBot&nbsp;III/Indices/Talk:YourPage</tt> being ] onto <tt>Talk:YourPage</tt> in place of the {{tlu|User:ClueBot&nbsp;III/ArchiveThis}} template on <tt>Talk:YourPage</tt>.<br /> Using <code>index=yes</code> results in the ClueBot III automatically generated index contained on the page <samp>User:ClueBot&nbsp;III/Indices/Talk:YourPage</samp> being ] onto <samp>Talk:YourPage</samp> in place of the {{tlu|User:ClueBot&nbsp;III/ArchiveThis}} template on <samp>Talk:YourPage</samp>.<br />
This parameter is only valid if <code>archivebox=no</code>. If <code>archivebox=yes</code> this parameter has no effect on the index being included in the archive box and does not cause a copy of <tt>User:ClueBot&nbsp;III/Indices/Talk:YourPage</tt> to be ] onto <tt>Talk:YourPage</tt>.<br /> This parameter is only valid if <code>archivebox=no</code>. If <code>archivebox=yes</code> this parameter has no effect on the index being included in the archive box and does not cause a copy of <samp>User:ClueBot&nbsp;III/Indices/Talk:YourPage</samp> to be ] onto <samp>Talk:YourPage</samp>.<br />


like in <code><nowiki>{{archivebox|{{User:ClueBot III/ArchiveThis|index=yes}}}}</nowiki></code> like in {{tlx|archives|{{tlf|User:ClueBot III/ArchiveThis|index=yes}}}}
<!-- DO NOT USE this code on your own page. --> <!-- DO NOT USE this code on your own page. -->
{{archivebox|{{User:ClueBot III/Indices/{{FULLPAGENAME}}}}}} {{archivebox|{{User:ClueBot III/Indices/{{FULLPAGENAME}}}}}}
Line 229: Line 240:


==Examples== ==Examples==
The following examples can be cut & pasted into the top portion of the page you desire to archive. <nowiki>{{subst:FULLPAGENAME}}</nowiki> will be substituted by the name of the page you are editing when you save the page.<br /> The following examples can be cut and pasted into the top portion of the page you desire to archive. {{tls|FULLPAGENAME}} will be substituted by the name of the page you are editing when you save the page.<br />
The text explaining the following examples assumes that <nowiki>{{subst:FULLPAGENAME}}</nowiki> evaluates to <tt>Talk:YourPage</tt>. In other words, that <tt>Talk:YourPage</tt> is the page you are archiving.<br /> The text explaining the following examples assumes that {{tls|FULLPAGENAME}} evaluates to <samp>Talk:YourPage</samp>. In other words, that <samp>Talk:YourPage</samp> is the page you are archiving.<br />
The age in all of these examples is set t 2160 hours, which is 90 days. If you want a different amount of time, then change the age argument. The age in all of these examples is set to 2160 hours, which is 90 days. If you want a different amount of time, then change the age argument.


===Example: Archives by date (without archive box)=== ===Example: Archives by date (without archive box)===
<pre> <pre>
<nowiki>{{User:ClueBot III/ArchiveThis <nowiki>{{</nowiki><nowiki>User:ClueBot III/ArchiveThis
|archiveprefix={{subst:FULLPAGENAME}}/Archives/ |archiveprefix={{subst:#titleparts:{{subst:FULLPAGENAME}}}}/Archives/
|format=Y/F |format=Y/F
|age=2160 |age=2160
Line 242: Line 253:
</pre> </pre>
The archive subpages produced by this example will be in the format of: <br /> The archive subpages produced by this example will be in the format of: <br />
<tt>Talk:YourPage/Archives/2013/June</tt><br /> <samp>Talk:YourPage/Archives/2013/June</samp><br />
<tt>Talk:YourPage/Archives/2013/July</tt><br /> <samp>Talk:YourPage/Archives/2013/July</samp><br />
<tt>...</tt> <samp>...</samp>


===Example: Archives by date (with archive box)=== ===Example: Archives by date (with archive box)===
<pre> <pre>
<nowiki>{{User:ClueBot III/ArchiveThis <nowiki>{{</nowiki><nowiki>User:ClueBot III/ArchiveThis
|archiveprefix={{subst:FULLPAGENAME}}/Archives/ |archiveprefix={{subst:#titleparts:{{subst:FULLPAGENAME}}}}/Archives/
|format=Y/F |format=Y/F
|age=2160 |age=2160
Line 257: Line 268:
</pre> </pre>
The subpages created, as needed, for your archives by this example will be named similar to: <br /> The subpages created, as needed, for your archives by this example will be named similar to: <br />
<tt>Talk:YourPage/Archives/2013/June</tt><br /> <samp>Talk:YourPage/Archives/2013/June</samp><br />
<tt>Talk:YourPage/Archives/2013/July</tt><br /> <samp>Talk:YourPage/Archives/2013/July</samp><br />
<tt>...</tt> <samp>...</samp>


===Example: Numbered archives (without archive box)=== ===Example: Numbered archives (without archive box)===
<pre> <pre>
<nowiki>{{User:ClueBot III/ArchiveThis <nowiki>{{</nowiki><nowiki>User:ClueBot III/ArchiveThis
|archiveprefix={{subst:FULLPAGENAME}}/Archive |archiveprefix={{subst:#titleparts:{{subst:FULLPAGENAME}}}}/Archive
|format= %%i |format= %%i
|age=2160 |age=2160
Line 272: Line 283:
</pre> </pre>
The subpages created, as needed, for your archives by this example will be named similar to: <br /> The subpages created, as needed, for your archives by this example will be named similar to: <br />
<tt>Talk:YourPage/Archive 1</tt><br /> <samp>Talk:YourPage/Archive 1</samp><br />
<tt>Talk:YourPage/Archive 2</tt><br /> <samp>Talk:YourPage/Archive 2</samp><br />
<tt>...</tt> <samp>...</samp>


===Example: Numbered archives (with archive box)=== ===Example: Numbered archives (with archive box)===
<pre> <pre>
<nowiki>{{User:ClueBot III/ArchiveThis <nowiki>{{</nowiki><nowiki>User:ClueBot III/ArchiveThis
|archiveprefix={{subst:FULLPAGENAME}}/Archive |archiveprefix={{subst:#titleparts:{{subst:FULLPAGENAME}}}}/Archive
|format= %%i |format= %%i
|age=2160 |age=2160
Line 289: Line 300:
</pre> </pre>
The subpages created, as needed, for your archives by this example will be named similar to: <br /> The subpages created, as needed, for your archives by this example will be named similar to: <br />
<tt>Talk:YourPage/Archive 1</tt><br /> <samp>Talk:YourPage/Archive 1</samp><br />
<tt>Talk:YourPage/Archive 2</tt><br /> <samp>Talk:YourPage/Archive 2</samp><br />
<tt>...</tt> <samp>...</samp>


===Example: By year and numbered (without archive box)=== ===Example: By year and numbered (with archive box)===
<pre> <pre>
<nowiki>{{</nowiki>User:ClueBot III/ArchiveThis <nowiki>{{</nowiki><nowiki></nowiki>User:ClueBot III/ArchiveThis
|archiveprefix={{subst:FULLPAGENAME}}/Archives/ |archiveprefix={{subst:#titleparts:{{subst:FULLPAGENAME}}}}/Archives/
|format=Y %%i |format=Y %%i
|age=2160 |age=2160
Line 302: Line 313:
|minkeepthreads=0 |minkeepthreads=0
|archivenow=<nowiki><nowiki>{{User:ClueBot III/ArchiveNow}},{{resolved|,{{Resolved|,{{done}},{{Done}}</nowiki></nowiki> |archivenow=<nowiki><nowiki>{{User:ClueBot III/ArchiveNow}},{{resolved|,{{Resolved|,{{done}},{{Done}}</nowiki></nowiki>
|header=<nowiki><nowiki>{{Talkarchive}}</nowiki></nowiki> |header=<nowiki><nowiki>{{Automatic archive navigator}}</nowiki></nowiki>
|headerlevel=2 |headerlevel=2
|nogenerateindex=0 |nogenerateindex=0
Line 314: Line 325:
</pre> </pre>
The subpages created, as needed, for your archives by this example will be named similar to: <br /> The subpages created, as needed, for your archives by this example will be named similar to: <br />
<tt>Talk:YourPage/Archives/2012 1</tt><br /> <samp>Talk:YourPage/Archives/2012 1</samp><br />
<tt>Talk:YourPage/Archives/2012 2</tt><br /> <samp>Talk:YourPage/Archives/2012 2</samp><br />
<tt>...</tt><br /> <samp>...</samp><br />
<tt>Talk:YourPage/Archives/2013 1</tt><br /> <samp>Talk:YourPage/Archives/2013 1</samp><br />
<tt>Talk:YourPage/Archives/2013 2</tt><br /> <samp>Talk:YourPage/Archives/2013 2</samp><br />
<tt>...</tt> <samp>...</samp>


===Example: Changing from MiszaBot to ClueBot III=== ===Example: Changing from MiszaBot to ClueBot III===
Line 328: Line 339:
| <pre> | <pre>
<nowiki>{{User:MiszaBot/config <nowiki>{{User:MiszaBot/config
|archive = {{subst:FULLPAGENAME}}/Archive %(counter)d |archive = {{subst:#titleparts:{{subst:FULLPAGENAME}}}}/Archive %(counter)d
|algo = old(90d) |algo = old(90d)
|archiveheader = {{aan}} |archiveheader = {{aan}}
Line 337: Line 348:
</pre> </pre>
|| <pre> || <pre>
<nowiki>{{User:ClueBot III/ArchiveThis <nowiki>{{</nowiki><nowiki>User:ClueBot III/ArchiveThis
|archiveprefix={{subst:FULLPAGENAME}}/Archive |archiveprefix={{subst:#titleparts:{{subst:FULLPAGENAME}}}}/Archive
|age=2160 |age=2160
|header={{aan}} |header={{aan}}
Line 349: Line 360:
|} |}
The subpages created, as needed, for your archives by this example will be named similar to: <br /> The subpages created, as needed, for your archives by this example will be named similar to: <br />
<tt>Talk:YourPage/Archive 21</tt><br /> <samp>Talk:YourPage/Archive 21</samp><br />
<tt>Talk:YourPage/Archive 22</tt><br /> <samp>Talk:YourPage/Archive 22</samp><br />
<tt>...</tt> <samp>...</samp>


The numberstart is one more than the last used by MiszaBot because the first time ClueBot III is run it may be archiving a large number of sections. Increasing this by one will prevent the current archive from being appended. In the case from which this example is taken a 90k archive page was appended by an additional 100k leaving a 190k page for which the max was supposed to be 100k. This has been reported as a bug. The numberstart is one more than the last used by MiszaBot because the first time ClueBot III is run it may be archiving a large number of sections. Increasing this by one will prevent the current archive from being appended. In the case from which this example is taken a 90k archive page was appended by an additional 100k leaving a 190k page for which the max was supposed to be 100k. This has been reported as a bug.
Line 361: Line 372:
to:<br /> to:<br />
<code><nowiki>{{Archives |auto= short |index= /Archive index |search= yes |bot= </nowiki>'''ClueBot III'''<nowiki> |age= 90}}</nowiki></code><br /> <code><nowiki>{{Archives |auto= short |index= /Archive index |search= yes |bot= </nowiki>'''ClueBot III'''<nowiki> |age= 90}}</nowiki></code><br />

<includeonly>{{Sandbox other||
<!-- Categories below this line -->
]
}}</includeonly>

Latest revision as of 09:15, 23 November 2024

This is a documentation subpage for User:ClueBot III/ArchiveThis.
It may contain usage information, categories and other content that is not part of the original user template page.
WarningThis template is used on approximately 12,000 pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them.
This user page is used by one or more bots.
If you intend to make significant changes to this user page, move it, or nominate it for deletion, please notify the bot operator(s) in advance. The relevant bots are: ClueBot III.

Quick start

If you want to take default options and just get archives up and running on your page, just place this at the top of the talk page you want archived: {{subst:User:ClueBot III/JustArchiveThis}}.

If you want to configure it more, read on for how to use the full ArchiveThis template. You can use {{subst:Setup cluebot archiving}} to automatically add a talk header, an archiving notice, and/or a list of archives.

How your page is archived

ClueBot III can be used to automatically archive sections/threads from a given page. Usually the page you are archiving from will be a talk page. Your archive pages can be organized by date, or numbered. Combinations of dates and numbering are also possible. This is configured by the arguments used for the format and archiveprefix parameters. Please see the parameter descriptions and examples for a few of the many ways to do this.

How does ClueBot III know when to archive my page?

ClueBot III works based on the revision history of the page in question, and not on the timestamps associated with signatures. This means that the practice of manually adding a timestamp way in the future will not work to prevent ClueBot III from archiving a thread. Furthermore, on one archival sweep, ClueBot III will select an archive target and will archive all eligible threads to that archive. This means that when you initially set up ClueBot III, if you have untidy archives then, it will sweep all of the old conversations into whatever archive it deems to be the current one. It also means that pages with massively long discussion threads will have the entire thread archived into the current archive, which can cause slight overstuffing of size-based archives.

Keeping linked

Once a series of threads is archived, ClueBot III looks for all pages that linked to the moved parts, and updates the links to point to the archives, ensuring that no links are broken.

ClueBot III can correctly handle most talk pages, but may not be able to handle pages with a large what links here list, as the link updating process will take a lot of time and may prevent other pages from being archived (see User talk:Jimbo Wales/Archive_202#Conspiracy Unveiled). Consider using lowercase sigmabot III to archive pages that are linked to from many places.

Index generation

In addition to archiving your page, ClueBot III can also generate an index of all your archive pages. Assuming that you are archiving the page Talk:YourPage, the archive index generated by ClueBot III is located at:
User:ClueBot III/Master Detailed Indices/Talk:YourPage
You can make use of this either directly or by transcluding it onto your Talk:YourPage/Archive index page. One way to use this directly would be to include it as the archive index page in your archive box. For example:
{{Archives |auto= short |index= User:ClueBot III/Master Detailed Indices/{{FULLPAGENAME}} |search= yes |bot= ClueBot III |age= 90}}
will produce an archive box with an appropriate link to your index.

The {{talk header}} template automatically detects the existence of this index and will link it accordingly.

General template format

The general format for the archive template:

{{User:ClueBot III/ArchiveThis
|archiveprefix=
|format=
|age=
}}


Required parameters

age
Type: unsigned integer
Default: 0
Description: This parameter must be set to the number of hours a thread can go without a reply before it should be archived. If you do not set it all threads will qualify to be archived. For 30 days, enter 720, and for one year, enter 8760.


archiveprefix
Type: string
Description: This parameter must be set to a fully qualified page name under the page you wish to archive. For example, if User talk:Cobi was being archived using dated archives, then archiveprefix=User talk:Cobi/Archives/ would be appropriate. For the same page being archived with numbered archives, archiveprefix=User talk:Cobi/Archive would be appropriate. Not setting this parameter correctly can have some strange results. The {{FULLPAGENAME}} variable can not actually be passed to ClueBot III. The fully qualified page name must be hard coded. The easiest way to do this is to use immediate substitution as follows:
For archives organized by date enter:
|archiveprefix={{subst:#titleparts:{{subst:FULLPAGENAME}}}}/Archives/
For numbered archives enter (note /Archive instead of /Archives/):
|archiveprefix={{subst:#titleparts:{{subst:FULLPAGENAME}}}}/Archive

Warning: system variables such as {{SUBST:FULLPAGENAME}} are replaced by the page name to be archived when the system variable is saved to the page to be archived. However some punctuation characters that can appear in a page name ("&') are replaced by HTML character codes that are not recognised by the bot (see PAGENAMEE encoding for details about these and other characters). For example ' is replaced with &#39; (so if the bot is to work then &#39; must be replaced with '. This can be circumvented by using {{SUBST:#titleparts:{{SUBST:FULLPAGENAME}}}} to automatically sort the encoding.


format
Type: string
Default: ""
Description: This parameter must be set to a valid argument to PHP's date() function. You may also include an %%i value. %%i is for numbered archives instead of dated archives, and is replaced with the archive number. Once variable substitution has occurred it will be concatenated onto the end of the value of archiveprefix. The result of the concatenation will be the name of the archive page(s). See examples. Most commonly, for archives organized by date use:
|format=Y/F. This gives "Archives/2016/January". In order to obtain "Archives/2016/01 (January)", use |format=Y/m (F).
For numbered archives use (note the single space after the equals sign):
|format= %%i
Note for date-based archives: Cluebot III stores files into a single archive page each time it runs. With date-based archives, the page name is whatever archiveprefix concatenated with format is for the date that is NOW-age (where age is in hours). For example, if you are starting up YYYY/Month archiving from scratch with many old threads in the page being archived, ClueBot III will put all of the threads into a single file, not multiple files. If you want a single archiving run to be split into multiple files based on the last date in each thread you will need to use lowercase sigmabot III.
Note: format= %%i is better in most cases. format=Y/F can end up as many tiny archives that can take forever to look through manually when a user is not sure what search term to look for with the archive search tool.

Optional parameters

These parameters control the behavior of the archiver.

archivenow
Type: comma delimited array of strings
Default: ""
Description: This optional parameter should contain a comma separated list of strings for which ClueBot III will search within the threads on the page. If any of these strings are found in a thread, the bot will archive the thread immediately. The bot will also convert {{templates}} in this list to {{tl|escaped templates}} upon archival. This could be useful for pages where {{resolved}} or such is used. The {{User:ClueBot III/ArchiveNow}} blank template is available for this use. However, it has no special properties. It is only just another string that happens to be a template for which ClueBot III can be told to search. In addition to the following typical usage, an example of its use is shown below.
Typical usage: |archivenow=<nowiki>{{User:ClueBot III/ArchiveNow}}</nowiki>


header
Type: string
Default: "{{Archive}}"
Description: When creating a new archive page, the bot will put this at the top of the new page.


headerlevel
Type: unsigned integer, between 1 and 7 inclusive
Default: 2
Description: This is the header level for the threads the bot will archive. Anything on the page before the first header of this level will not be archived. A level 1 header is = Header =, a default thread (level 2) header is == Header ==, and the highest level header is a level 7: ======= Header =======.


key
Type: string
Default: ""
Description: The value of this parameter must match an internally generated key in order for the archives to be stored anywhere other than as subpages of the page being archived.


maxarchsize
Type: unsigned integer, greater than 10000
Default: 0
Description: The target maximum size of the archive in bytes before %%i (see format) is incremented. If 0, this is disabled. In general, this parameter is used for numbered archives, but not for archives organized by date. This is not a hard limit. Resulting archive page sizes will almost always exceed this number, perhaps by a great amount. Each time ClueBot III runs on a page it archives all threads that are old enough to qualify for archiving into a single file. If you have maxarchsize=100000 with a current archive file size of 90k and it ends up that there are 60 threads to archive with a total size of 250k, then the current archive will be extended to 340k despite the 100k limit.


maxkeepbytes
Type: unsigned integer
Default: 0
Description: If greater than 0, this is the maximum number of thread content bytes to keep on the talk page. Older threads are forcibly archived if there are more than this number of thread content bytes on the page. If 0, this option is disabled.


maxkeepthreads
Type: unsigned integer
Default: 0
Description: If greater than 0, this is the maximum number of threads to keep on the talk page. Older threads are forcibly archived if there are more than this number of threads on the page. If 0, this option is disabled.


minarchthreads
Type: unsigned integer
Default: 0
Description: The bot will not archive unless this many or more sections need archival.


minkeepthreads
Type: unsigned integer
Default: 0
Description: The bot will not archive if there will be this many or less sections left on the page.


nogenerateindex
Type: unsigned integer (boolean)
Default: 0
Description: If this is set to 1, the bot will not generate an index under User:ClueBot III/Indices/. There are very few times this option should be used. If this option is used, the index option will no longer work right.


numberstart
Type: unsigned integer
Default: 1
Description: Default value for %%i in format.


transformheader Warning! An invalid option here can screw up your archives!
Type: string, search===replace pairs delimited by &&&
Default: ""
Description: Convert archived thread headers. For each pair, search must be a valid regular expression and replace is a replacement string. See this for more information, search corresponds to $pattern, replace corresponds to $replacement, and the thread header corresponds to $subject. If you do not understand what this does, don't try to use it. Instead, ask for help from Cobi.

Cosmetic parameters

These parameters are shaping the archive box displayed on the page where archiving is active.


Archives


No archives yet.

This page is archived by ClueBot III.

archivebox
Type: string ("yes" or "no")
Default: "no"
Description: Causes an archive box to be displayed similar to {{archives}}
The example archive box is with non-default value of archivebox=yes.


box-width Type: string
Default: "238px"
Description: The width of the archive box. This parameter is only valid if archivebox=yes.


Archives


No archives yet.

This page is archived by ClueBot III.

box-advert
Type: string ("yes" or "no")
Default: "no"
Description: Displays the string "This page is archived by ClueBot III." at the bottom of the archive box. This parameter is only valid if archivebox=yes.
The example archive box is with non-default value of box-advert=yes. Compare this example to the example next to the archivebox parameter.


Archives


No archives yet.

This page is archived by ClueBot III.

box-separator Type: string ("yes" or "no")
Default: "yes"
Description: Display separator lines in the archive box. This parameter is only valid if archivebox=yes.
The example archive box is with non-default value of box-separator=no. Compare this example to the example next to the archivebox parameter.



Archives


No archives yet.

This page is archived by ClueBot III.

image
Type: string
Default: "]"
Description: If set this is an alternate image file to use as the archive icon in the archive box. This parameter is only valid if archivebox=yes.
The example archive box is with non-default value of image=]. Note that the image size must be specified as part of the argument to this parameter, not with the image-width parameter. Compare this example to the example next to the archivebox parameter.


image-width Type: string
Default: "40px"
Description: The width of the image in the archive box. This parameter is only valid if archivebox=yes and you are using the default image.


Archives


No archives yet.

This page is archived by ClueBot III.

search Type: string ("yes" or "no")
Default: "yes"
Description: Display a search field in the archive box. This parameter is only valid if archivebox=yes.The example archive box is with non-default value of search=no. Compare this example to the example next to the archivebox parameter.


talkcolor / talkcolour Type: string
Default: ""
Description: This parameter is only valid if archivebox=yes and the page on which the archive box is displayed is in the User talk namespace. If not set, or set to anything other than yes, the color scheme of the archive box on a User talk page will not be the standard talk page color scheme. In such a case, the archive box will use the same color scheme as is used for archive boxes on non-talk pages. If this parameter is set to yes and the page on which the archive box is displayed is in the User talk namespace, the archive box will use the standard talk page color scheme.
The two parameters are equivalent, and are only provided to avoid an attrition war in the MOS-style.


index
Type: string
Default: ""
Description: All values of this parameter are equivalent except yes. This parameter should not be set to yes unless you have wrapped the ClueBot III template with {{archives}}. Using index=yes results in the ClueBot III automatically generated index contained on the page User:ClueBot III/Indices/Talk:YourPage being transcluded onto Talk:YourPage in place of the {{User:ClueBot III/ArchiveThis}} template on Talk:YourPage.
This parameter is only valid if archivebox=no. If archivebox=yes this parameter has no effect on the index being included in the archive box and does not cause a copy of User:ClueBot III/Indices/Talk:YourPage to be transcluded onto Talk:YourPage.

like in {{archives|{{User:ClueBot III/ArchiveThis}}}}

Archiving icon
Archives

User:ClueBot III/Indices/User:ClueBot III/Documentation



Examples

The following examples can be cut and pasted into the top portion of the page you desire to archive. {{subst:FULLPAGENAME}} will be substituted by the name of the page you are editing when you save the page.
The text explaining the following examples assumes that {{subst:FULLPAGENAME}} evaluates to Talk:YourPage. In other words, that Talk:YourPage is the page you are archiving.
The age in all of these examples is set to 2160 hours, which is 90 days. If you want a different amount of time, then change the age argument.

Example: Archives by date (without archive box)

{{User:ClueBot III/ArchiveThis
|archiveprefix={{subst:#titleparts:{{subst:FULLPAGENAME}}}}/Archives/
|format=Y/F
|age=2160
}}

The archive subpages produced by this example will be in the format of:
Talk:YourPage/Archives/2013/June
Talk:YourPage/Archives/2013/July
...

Example: Archives by date (with archive box)

{{User:ClueBot III/ArchiveThis
|archiveprefix={{subst:#titleparts:{{subst:FULLPAGENAME}}}}/Archives/
|format=Y/F
|age=2160
|archivebox=yes
|box-advert=yes
}}

The subpages created, as needed, for your archives by this example will be named similar to:
Talk:YourPage/Archives/2013/June
Talk:YourPage/Archives/2013/July
...

Example: Numbered archives (without archive box)

{{User:ClueBot III/ArchiveThis
|archiveprefix={{subst:#titleparts:{{subst:FULLPAGENAME}}}}/Archive
|format= %%i
|age=2160
|maxarchsize=150000
|numberstart=1
}}

The subpages created, as needed, for your archives by this example will be named similar to:
Talk:YourPage/Archive 1
Talk:YourPage/Archive 2
...

Example: Numbered archives (with archive box)

{{User:ClueBot III/ArchiveThis
|archiveprefix={{subst:#titleparts:{{subst:FULLPAGENAME}}}}/Archive
|format= %%i
|age=2160
|maxarchsize=150000
|numberstart=1
|archivebox=yes
|box-advert=yes
}}

The subpages created, as needed, for your archives by this example will be named similar to:
Talk:YourPage/Archive 1
Talk:YourPage/Archive 2
...

Example: By year and numbered (with archive box)

{{User:ClueBot III/ArchiveThis
|archiveprefix={{subst:#titleparts:{{subst:FULLPAGENAME}}}}/Archives/
|format=Y %%i
|age=2160
|minarchthreads=0
|minkeepthreads=0
|archivenow=<nowiki>{{User:ClueBot III/ArchiveNow}},{{resolved|,{{Resolved|,{{done}},{{Done}}</nowiki>
|header=<nowiki>{{Automatic archive navigator}}</nowiki>
|headerlevel=2
|nogenerateindex=0
|maxkeepthreads=0
|maxkeepbytes=0
|maxarchsize=150000
|numberstart=1
|archivebox=yes
|box-advert=yes
}}

The subpages created, as needed, for your archives by this example will be named similar to:
Talk:YourPage/Archives/2012 1
Talk:YourPage/Archives/2012 2
...
Talk:YourPage/Archives/2013 1
Talk:YourPage/Archives/2013 2
...

Example: Changing from MiszaBot to ClueBot III

MiszaBot ClueBot III
{{User:MiszaBot/config 
|archive = {{subst:#titleparts:{{subst:FULLPAGENAME}}}}/Archive %(counter)d
|algo = old(90d)
|archiveheader = {{aan}}
|maxarchivesize = 100K
|minthreadsleft = 2
|counter = 20
}}
{{User:ClueBot III/ArchiveThis
|archiveprefix={{subst:#titleparts:{{subst:FULLPAGENAME}}}}/Archive
|age=2160
|header={{aan}}
|maxarchsize=100000
|minkeepthreads=2
|numberstart=21
|format= %%i
}}

The subpages created, as needed, for your archives by this example will be named similar to:
Talk:YourPage/Archive 21
Talk:YourPage/Archive 22
...

The numberstart is one more than the last used by MiszaBot because the first time ClueBot III is run it may be archiving a large number of sections. Increasing this by one will prevent the current archive from being appended. In the case from which this example is taken a 90k archive page was appended by an additional 100k leaving a 190k page for which the max was supposed to be 100k. This has been reported as a bug.

Age is in hours, not days. 90 days is 2,160 hours.

If you are using an {{Archives}} template, or other template that shows which archiving bot you are using, don't forget to change:
{{Archives |auto= short |index= /Archive index |search= yes |bot= MiszaBot I |age= 90}}
to:
{{Archives |auto= short |index= /Archive index |search= yes |bot= ClueBot III |age= 90}}


Categories: