User:ClueBot III/Documentation: Difference between revisions

Content deleted Content added
m Required parameters: rm doubled "the"
Implement #titleparts: substitutions to get around {{FULLPAGENAME}} encoding issues (see mw:Help:Extension:ParserFunctions#.23titleparts)
 
(9 intermediate revisions by 4 users not shown)
Line 1:
{{High-use|8700demo=User:ClueBot III/ArchiveThis}}
 
==Quick start==
Line 46:
{{anchor|archiveprefix}}'''archiveprefix'''<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|[[WP:VAR|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 [[WP:SUBST|substitution such]] as follows:<br />
For archives organized by date enter:<br />
{{para|archiveprefix|{{tlf|subst:#titleparts:{{tlf|subst:FULLPAGENAME}}}}/Archives/}}<br />
For numbered archives enter (note <samp>/Archive</samp> instead of <samp>/Archives/</samp>):<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 archivearchived when the system variable is saved to athe 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 [[mediawikiwikimw:Manual:PAGENAMEE encoding|PAGENAMEE encoding]] 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 61:
<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 />
For numbered archives use (note the single space after the equals sign):<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 <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 IIIII 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 [[User:lowercase sigmabot III|lowercase sigmabot III]].<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===
 
These parameters are shapingcontrol the behavior of the archiver.
 
{{anchor|archivenow}}'''archivenow'''<br />
Line 142:
''Default'': ""<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 [http://us3.php.net/preg_replace this] 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 [[User talk:Cobi|Cobi]].<br />
 
 
 
===Cosmetic parameters===
Line 247 ⟶ 245:
<pre>
<nowiki>{{</nowiki><nowiki>User:ClueBot III/ArchiveThis
|archiveprefix={{subst:#titleparts:{{subst:FULLPAGENAME}}}}/Archives/
|format=Y/F
|age=2160
Line 260 ⟶ 258:
<pre>
<nowiki>{{</nowiki><nowiki>User:ClueBot III/ArchiveThis
|archiveprefix={{subst:#titleparts:{{subst:FULLPAGENAME}}}}/Archives/
|format=Y/F
|age=2160
Line 275 ⟶ 273:
<pre>
<nowiki>{{</nowiki><nowiki>User:ClueBot III/ArchiveThis
|archiveprefix={{subst:#titleparts:{{subst:FULLPAGENAME}}}}/Archive
|format= %%i
|age=2160
Line 290 ⟶ 288:
<pre>
<nowiki>{{</nowiki><nowiki>User:ClueBot III/ArchiveThis
|archiveprefix={{subst:#titleparts:{{subst:FULLPAGENAME}}}}/Archive
|format= %%i
|age=2160
Line 307 ⟶ 305:
<pre>
<nowiki>{{</nowiki><nowiki></nowiki>User:ClueBot III/ArchiveThis
|archiveprefix={{subst:#titleparts:{{subst:FULLPAGENAME}}}}/Archives/
|format=Y %%i
|age=2160
Line 339 ⟶ 337:
| <pre>
<nowiki>{{User:MiszaBot/config
|archive = {{subst:#titleparts:{{subst:FULLPAGENAME}}}}/Archive %(counter)d
|algo = old(90d)
|archiveheader = {{aan}}
Line 349 ⟶ 347:
|| <pre>
<nowiki>{{</nowiki><nowiki>User:ClueBot III/ArchiveThis
|archiveprefix={{subst:#titleparts:{{subst:FULLPAGENAME}}}}/Archive
|age=2160
|header={{aan}}