Menyiapkan pengarsipan

Letakkan templat berikut di bagian paling atas halaman yang ingin Anda arsipkan secara otomatis:

{{User:HsfBot/config
| algo    = old(...)
| archive = Nama halaman arsip: Untuk menghasilkan beberapa halaman dari waktu ke waktu, gunakan variabel, yang dijelaskan di bawah ini.
[parameter lain - ***baca di bawah ini***]
}}

Bot hanya mengenali satu parameter per baris. Penutupan }} harus berada pada baris tersendiri. Tidak boleh ada spasi sebelum pipa ( | ). Jika Anda mengeluarkan data baru yang digunakan pada contoh di atas, mis. Dengan meringkas pemanggilan templat ke satu baris, bot mungkin tidak melakukan apa yang Anda harapkan.

Selain itu, templat harus ditempatkan:

  1. sebelum header == tingkat kedua == pertama di halaman
  2. pada halaman sebenarnya, dan tidak ditransklusikan dari subhalaman, seperti header halaman, templat, dll.

Contoh cepat

Untuk mengatasinya - konfigurasi mungkin tidak intuitif, tapi fleksibel dan berpotensi memberikan kemungkinan besar.

Silahkan ganti "Pembicaraan pengguna:Contoh" ke nama tepatnya dari halaman Anda sendiri!
Jika masih tidak berfungsi, baca tentang parameter minthreadsleft dan' 'minthreadstoarchive di bawah ini.

Contoh 1: arsip statis

{{User:HsfBot/config
| algo    = old(7d)
| archive = Pembicaraan pengguna:Example/Archive
}}

Pengaturan ini mengarsipkan untai/thread dari Pembicaraan pengguna:Contoh ke Pembicaraan pengguna:Cobtoh/Arsip setelah berumur 7 hari (terhitung dari cap waktu terbaru). Arsip akan membeku saat ukuran halaman mencapai 2000 KB . Mungkin bukan konfigurasi yang sangat berguna (kecuali untuk mengirim benang ke tempat sampah [halaman yang dibersihkan secara berkala] atau untuk menentukan secara manual kapan Anda harus beralih ke halaman arsip berikutnya).

Contoh 2: Arsip berkesinambungan

{{User:HsfBot/config
| algo                = old(30d)
| archive             = Pembicaraan pengguna:Con/Archive %(counter)d
| counter             = 1
| maxarchivesize      = 150K
| archiveheader       = {{Automatic archive navigator}}
| minthreadstoarchive = 1
| minthreadsleft      = 4
}}
salin dan tempel agar mudah digunakan
{{User:HsfBot/config
| algo                = old(30d)
| archive             = {{SUBST:FULLPAGENAME}}/Arsip %(counter)d
| counter             = 1
| maxarchivesize      = 150K
| archiveheader       = {{Automatic archive navigator}}
| minthreadstoarchive = 1
| minthreadsleft      = 4
}}

Ini memberitahu bot untuk mengarsipkan benang lebih dari tiga puluh hari (meninggalkan yang keempat terakhir) dari Pembicaraan pengguna: Contoh ke Pembicaraan pengguna: Contoh/Arsip 1 (lebih lanjut tentang variabel lihat dibawah) mengisi sampai 150 kilobita, lalu bot akan berpindah ke subhalaman /Arsip 2 (memperbarui meja saat menyimpan halaman). Ingatlah untuk menentukan ukuran maksimum arsip, atau arsip akan menumpuk (ukuran halaman arsip tidak terdistribusi secara merata) seperti pada contoh pertama. Selain itu, setiap halaman arsip diberi banner {{Aan}}, yang memudahkan untuk berpindah di antara halaman arsip yang berbeda.

Contoh 3: arsip berbasis tanggal

{{User:HsfBot/config
| algo          = old(5d)
| archive       = Pembicaraan pengguna:Contoh/Arsip/%(year)d/%(monthname)s
| archiveheader = {{MonthlyArchive}}
}}
salin dan tempel untuk memudahkan
{{User:HsfBot/config
| algo          = old(5d)
| archive       = {{SUBST:FULLPAGENAME}}/%(year)d/%(monthname)s
| archiveheader = {{MonthlyArchive}}
}}

Dalam konfigurasi ini, topik yang lebih tua dari 5 hari akan dimasukan di arsip tergantung tanggalnya (yaitu cap waktu terbaru). Anda bisa membaca tentang variabel lain dibawah ini.

Penjelasan parameter

{{User:HsfBot/config 
| archive             = 
| algo                = 
| counter             = 
| maxarchivesize      = 
| minthreadsleft      = 
| minthreadstoarchive = 
| archiveheader       = 
| key                 = 
}}
Parameter Default Description
archive N/A; required 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 old(24h) 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 1 The current number of the last archive. If the %(counter)d variable is not used, it is ignored. Lowercase sigmabot III will update this parameter as necessary.
maxarchivesize 1954K The maximum archive size in either raw text size (eg 256M for megabytes, 256K for kilobytes, or 256B for bytes) or threads (eg 10T) before incrementing the counter. A bare integer will be interpreted as bytes. Ignored if counter is not used.
minthreadsleft 5 The minimum number of threads that should be left on a page (to prevent pages from getting completely harvested).
minthreadstoarchive 2 The minimum number of threads to archive at one time, which is used to lower edit frequency. lowercase sigmabot III will not archive threads when fewer than the value of this parameter would be archived.
archiveheader {{Talk archive}} Content that will be put on new archive pages as the header. This parameter supports the use of variables.
key A top-secret key that (if valid) allows archives to not be subpages of the page being archived. To obtain such a key, request it from this editor, and you better have a very good justification for doing so.

Variables

Variable parameter 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:

  • make sure you don't mess up the last letter after the brackets (it's "d" for integers and "s" for strings)
  • integer variables may be left-padded with zeros:
    %(counter)03d evaluates to 013 if the counter's value equals 13,
    %(month)02d becomes 05 for May etc.

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:

Delaying or preventing archiving 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.