Manual:Pywikibot/archivebot.py/setup/hsb

archivebot.py je skript, kotryž je so k archiwowanju diskusijnych stron wuwił. Tutón dokument wujasni, kak so diskusijne strony w Wikach za awtomatiske archiwowanje přez tutón posoł konfiguruje. Dokumentaciju k posłužowanju posoła namakaće pod Manual:Pywikibot/archivebot.py.

Kak so na diskusijnu stronu přihotuje

Tutón poskićowar předźěła jenož strony, kotrež su z markěrowanskej předłohu jasnje woznamjenjene, a archiwuje wotrězki, kotrež běchu za wěstu dobu inaktiwne. Často wužiwana markěrowanska předłoha je {{User:MiszaBot/config|...}}. Předłoha móhła parametr wobsahować, kotrež so deleka rozłožuja. (Wjetšina z nich je opcionalna.)

{{TEMPLATE_PAGE
|archive             =
|algo                =
|counter             =
|maxarchivesize      =
|minthreadsleft      =
|minthreadstoarchive =
|archiveheader       =
|key                 =
}}

Zo by so wotrězk archiwować móhł, dyrbi so wo wotrězk runiny 2 jednać, kotryž je přez = woznamjenjeny. Někotre wotrězki móža wot archiwowanja wuzamknjene być: hlej wozjewjenje deleka. It is possible to opt-out some sections: see the explanation below.

Parametry předłohi

Parametry předłohi maja slědowacy wuznam:

Předłohi-parametr Wopisowanje
archive mjeno strony, na kotrejž so archiwowane treada składuja. Dyrbi so wo spódnju stronu aktualneje strony jednać. Wariady so podpěruja.
algo to podawa maksimalnu starobu treada. Dyrbi w formaće old(delay) być, při čimž delay starobu w hodźinach abo dnjach podawa, na př. $v 1 za 24 hodźin abo $v 2 za 5 dnjow. Standardne nastajenje je old(24h).
counter Aktualna hódnota indikatora, kotryž móže so jako wariable připokazać, so wot poskićenja aktualizuje. Spočatna hódnota je 1.
maxarchivesize Najwjetša wulkosć archiwa, prjedy hač ličak přiběra. Hódnota móže so ze sufiksom kaž K abo M podać, zo bychu so kilobyty abo megabyty podali. Standardna hódnota je 1000M (1000 megabytow).
minthreadsleft Minimalna ličba treadow, kotrež maja na jednym boku wostać, so na standardnu hódnotu $defmin 1 postaji.
minthreadstoarchive Minimalna ličba treadow, kotrež maja so runočasnje archiwować. Standardna hódnota je $defmin 2.
archiveheader Wobsahi, kotrež so horjeka na nowych archiwnych stronach puknu. Tutón parametr zmóžnja wužiwanje wariablow. Standardna hódnota je {{talkarchive}}.
key Tajny kluč, kotryž, hdyž je płaćiwy, zmóžnja, zo archiwy njewotwisnje a nic jako podstrony archiwowaceje strony eksistuja.

Variables for page name patterns

In the archive parameter in the template, following variables can be used.

Variable Expands to...
%(counter)d the current value of the counter
%(year)d year of the thread being archived
%(quarter)d quarter of the year (1-4) of the thread being archived
%(month)d numeric month (1-12) of the thread being archived
%(month)02d two-digit numeric month (01-12)
%(monthname)s English name of the month
%(monthnameshort)s first three letters of the name of month

How to prevent archiving

To prevent a section (thread) from being archived for a finite time, you can edit the section and insert a signature with a future timestamp. The bot will not archive the thread until that time. Make sure that the signature is well-formatted; it must include a user name and a date exactly in the same format as a proper signature, otherwise it will not be recognized by the bot.

You can block a thread from being archived effectively indefinitely, using a very distant future timestamp, such as "15:07, 14 julij 2045 (UTC)".

To not confuse readers, the dummy signature may be written as a comment only with the dummy user name "DoNotArchiveUntil". Other comments will be ignored by the bot.

You might want to have on your wiki a substitutable template for this particular purpose. See English Wikipedia's template for an example: w:Template:DNAU.

Hlej tež

Category:Pywikibot scripts/hsb#archivebot
Category:Pywikibot scripts/hsb