بەکارھێنەر:Dexbot/Archivebot

Permanently protected پەڕە
لە ئینسایکڵۆپیدیای ئازادی ویکیپیدیاوە

ڕێکخستنی ئەرشیڤکردن

ئەم داڕێژەی خوارەوە لەسەرەوەی ئەو پەڕەیە دانێ کە دەتەوێت خۆگەڕانە ئەرشیڤ بکرێت:

{{بەکارھێنەر:Dexbot/Archivebot
| algo    = old(...)
| archive = ناوی پەڕەی ئەرشیڤ
[پارامەترەکانی تر - ***خوارەوە بخوێنەوە***]
}}

باشە، لەوانە نییە بەتەواوەتی بێت (لەخوارەوە دەربارەی بژاردە زۆرەکییەکان بخوێنەوە)، بەڵام ئەوە چۆنیەتیی کردنەکەیەتی. بەم بۆنەیەوە، داڕێژەکە ھیچ ناوەڕۆکێکی نییە و بۆ بەڕێوەبەران پارێزراوە، کەواتە دەربارەی ڕواڵەت نیگەران مەبە. :)

بۆتەکە وای بۆ دەچێت کە تەنیا یەک پارامەتر لەسەر ھەر ھێڵێک دەبینێت. دەبێت داخستنی }} لەسەر ھێڵەکەی خۆی بێت. نابێت ھیچ بۆشایییەک لەپێشی ھێماکانی | ھەبێت. ئەگەر لە نموونەکەی سەرەوەدا ھێڵە نوێیەکانت نەھێشت، نموونە: بە لێکاڵاندنی داڕێژەکە بۆسەر تاکە ھێڵێک، ئەوا لەوانە نییە بۆتەکە ئەوە بکات کە تۆ چاوەڕێی دەکەیت.

ھەروەھا، دەبێت داڕێژەکە دانرێت:

  1. لەپێش یەکەم == بەشی ئاستی دوو == لەسەر پەڕەکە
  2. لەسەر خوودی پەڕەکە نەک لە ژێرپەڕەیەکەوە ترانسکلوود کرابێت، بۆ نموونە سەپەڕەی پەڕەیەک، ھتد.

نموونە خێراکان

بۆ ھەڵواسینی - لەوانە نییە ڕێکخستن ژیرانە بێت، بەڵام گونجاوە و بۆی ھەیە ئەگەری زەبەلاح ڕوو بدات.

تکایە «لێدوانی بەکارھێنەر:نموونە» بۆ خوودی ناوی پەڕەکەی خۆت بگۆڕە!
ئەگەر ھێشتا کار ناکات، لەخوارەوە دەربارەی پارامەترەکانی «minthreadsleft» و «minthreadstoarchive» بخوێنەوە.

نموونەی ١ - ئەرشیڤی نەجووڵاو

{{بەکارھێنەر:Dexbot/Archivebot
| algo    = old(7d)
| archive = لێدوانی بەکارھێنەر:نموونە/ئەرشیڤی
}}

ئەم ڕێکخستنە ئەرشیڤی بەشەکان دوای ئەوەی ٧ ڕۆژیان بەسەردا تێپەڕیوە (ژماردن لە نوێترین کاتەوە دەست پێ دەکات) لە لێدوانی بەکارھێنەر:نموونەوە بۆ لێدوانی بەکارھێنەر:نموونە/ئەرشیڤی دەکات. ئەرشیڤەکە تا کاتێکی دیاری نەکراو گەورە دەبێت. لەوانە نییە ڕێکخستنێکی زۆر بەسوود بێت (مەگەر بۆ ناردنی بابەتەکان بەشێوەیەکی خولی بۆ تەنەکەی خۆڵەکە یان خۆت بڕیاری ئەوە بدەیت کە کەی بچێتە ناو پەڕەی ئەرشیڤی دواتر)، بەڵام ئاسانترینە، بۆیە من سەرەتا پێشنیاری ئەمە دەکەم.

نموونەی ٢ - ئەرشیڤە زۆربوونییەکان

{{بەکارھێنەر:Dexbot/Archivebot
| algo                = old(31d)
| archive             = لێدوانی بەکارھێنەر:نموونە/ئەرشیڤی %(counter)s
| counter             = 1
| maxarchivesize      = 70K
| archiveheader       = {{ڕێدۆزیی ئەرشیڤی وتووێژ}}
| minthreadstoarchive = 1
| minthreadsleft      = 4
}}

ئەمە بە بۆتەکە دەڵێت ئەرشیڤی ئەو بەشانەی کە زیاد لە مانگێکە دەستکاری نەکراون/کۆنن (بە بەجێھێشتنی چوار بەشی کۆتا) لە لێدوانی بەکارھێنەر:نموونەەوە بۆ لێدوانی بەکارھێنەر:نموونە/ئەرشیڤی ١ بکە. (بۆ زیاتر دەربارەی گۆڕاوەکان بڕۆ خوارەوە) ھەتا توانای پڕکردنی ٧٠ کیلۆبایتی ھەیە، لەوێدا بۆتەکە ژمێرەرەکە بۆ ٢ دەگۆڕێت (نوێکردنەوەی ژمێرەرەکە لەکاتی پاشەکەوتکردنی پەڕەکەدایە). لەبیرت بێت کە ئەوپەڕی قەبارەی ئەرشیڤێک دیاری بکەیت، یان تاڕاددەیەک وەک نموونەکەی یەکەم ڕەفتار دەکات. سەرباری ئەوەش، ھەر پەڕەیەکی ئەرشیڤ سەردێڕێکی گەورەی {{ڕێدۆزیی ئەرشیڤی وتووێژ}} وەر دەگرێت، کە گواستنەوەی نێوان پەڕە ئەرشیڤە جیاوازەکان ئاسان دەکات.

نموونەی ٣ - ئەرشیڤەکان بەپێی ڕێکەوت


{{بەکارھێنەر:Dexbot/Archivebot
| algo    = old(5d)
| archive = لێدوانی بەکارھێنەر:نموونە/ئەرشیڤەکان/%(year)d/%(monthname)s
}}

لەم ڕێکخستنەدا، ئەو بابەتانەی کە لە ٥ ڕۆژ کۆنترن کە بەندە ڕێکەوتەکانیانەوە (واتە نوێترین کات) دەچنە نێو ئەرشیڤەکان. دەتوانیت لەخوارەوە دەربارەی گۆڕاوەکانی تر بخوێنیتەوە.

ڕوونکردنەوەی پارامەترەکان

{{بەکارھێنەر:Dexbot/Archivebot 
| archive             = 
| algo                = 
| counter             = 
| maxarchivesize      = 
| minthreadsleft      = 
| minthreadstoarchive = 
| archiveheader       = 
| key                 = 
}}
Parameter Description
archive 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 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 The current value of the counter. If the %(counter)d variable is not used, it is ignored. MiszaBot will update this parameter as necessary.
maxarchivesize The maximum archive size before incrementing the counter. Ignored if counter is not used. The values used must be in a #K format, using a capital letter "K". For example: maxarchivesize=256K
minthreadsleft The minimum number of threads that should be left on a page (to prevent pages from getting completely harvested). Default value: 5
minthreadstoarchive The minimum number of threads to archive at one time, which is used to lower edit frequency. MiszaBot will not archive threads when fewer than the value of this parameter would be archived. Default value: 2
archiveheader Content that will be put on new archive pages as the header. This parameter supports the use of variables. The value of this parameter Cannot be multiline! Use a template such as {{archive navigation}} in order to add significant content. The Default value is {{talk archive}}.
key A secret key that (if valid) allows archives to not be subpages of the page being archived. To obtain such a key, ask me and have a good reason for that. :-)

گۆڕاوەکان

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.

دوای ڕێکخستنی ئەرشیڤ

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:

دواخستن یان قەدەغەکردنی ئەرشیڤیی بابەتە تایبەتەکان

دەتواندرێت بە سەبستیووتکردنی داڕێژەی {{ئەرشیڤ مەکە تا}} بۆناو بابەتەکە، ئەرشیڤکردن بۆ بابەتێکی تایبەت دوا بخرێت. {{subst:ئەرشیڤ مەکە تا}} بەکار بھێنە تا بەشەکە بۆ کاتێکی دیاری نەکراو بھێڵێتەوە یان {{subst:ئەرشیڤ مەکە تا|<integer>}} تا بەشەکە بۆ <integer> ڕۆژ بھێڵێتەوە. بۆ وردەکاری دەربارەی فەنکشنەکە و بەکارھێنانی داڕێژەکە، بڕوانە بەڵگەنامەی داڕێژەکە.

ئەمانەش ببینە

داڕێژە:Warchivenav