Category:Bots/Archival

From Wikisource
Jump to: navigation, search
Symbol comment vote.svg This bot task is not fully performed by an active bot. There is currently none capable of doing it, although a bot may be extended to perform this task regularly sometime in the future.

Pages in this category are tagged for automated archival. They must contain the following configuration tag with the appropriate information on the configuration page. Pages without a correct configuration tag will be skipped.

<!-- <bot type="archival" configuration="{config}/Archival#Wikisource:Scriptorium" /> -->

A bot will regularly go through this category and archive sections that are tagged with the following bot tag, where "section_name" is the name of the section to archive to (and is listed in the configuration).

<!-- <bot action="archival" section="section_name" /> -->

Bot procedure[edit]

This is a detailed outline of the steps a bot may follow when activated. This section exists to aid in the creation of a script to perform this task.

  1. Search and verification
    1. Retrieve the list of pages in Category:Bots/Archival.
    2. Load the first page in the queue.
    3. Check if a valid archival tag is used (regex: (?://|/\*|<!--)?\s*<(bot\s*type="archival"\s*configuration="{config}[^"]*")[^/>]*)/?>\s*(?:\*/|-->)?)).
      • If it isn't, add an appropriate note of this (regex: <!-- bot:error:invalid configuration tag:"$1" -->).
      • If so, proceed.
    4. Check if any sections contain an action tag (regex: (?://|/\*|<!--)?\s*<(bot\s*action="archival"\s*section="([^"]*)"[^/>]*)/?>\s*(?:\*/|-->)?).
      • If not, add an appropriate note of this (regex: <!-- bot:error:invalid archival tag:"$1" -->).
      • If so, proceed.
    5. Check each tag and ensure that the section matches one listed in the configuration.
      • If not, add an appropriate note of this (regex: <!-- bot:error:invalid section parameter:"$2" -->).
      • If so, proceed.
  2. Archival
    1. Remove from the current page
      1. Count the number of sections that are correctly tagged.
      2. Remove the appropriate sections from the page.
      3. Save with the edit summary "[bot] automated archival of n sections", where n is the aforementioned count.
    2. Archive
      1. Place them at the bottom of the appropriate section in the archive.
      2. Remove the bot action tags.
      3. Save with the edit summary "[bot] automated archival of n sections", where n is the aforementioned count.
    3. Update the topic listing.
  3. Proceed to the next page.

Pages in category "Bots/Archival"

The following 4 pages are in this category, out of 4 total.