Table:The bot

From The Infosphere, the Futurama Wiki
Jump to navigation Jump to search

Discussion

It's not so much a discussion as news, but I am currently working on turning the bot into a routine job, that will initially run every 3 hours. It currently only performs the task of cleaning up the category links in articles from the top to bottom or arranging them alphabetically. It will, of course, eventually, do many more tasks to articles.

Algorithm

Here is the basis algorithm of the bot:

  1. Check if the botlock file exists; if it does, don't do anything, it could mean the last run broke or something.
    • A possible future feature here could be to email me when this happens so I can check out if there is a problem.
  2. Initiate data
    1. Create a botlock file. Should the script fail at any point, this file will remain as evidence of failure.
    2. Obtain the previous timestamp of when the script run, as to only get the recent changes since then.
      • If timestamp is not available check the previous 10 changes
      • Or if it is available, but no new changes have been made, check 5 random articles
  3. Run through the pages obtained
    1. Arrange their categories
    2. Nothing else right now
    3. If there is a change to its content, commit the edit
    4. If another pages, repeat these steps
  4. Finishing off
    1. Creating a new timestamp
    2. Removing the botlock
  5. Write the log (each step applies a comment to the log, which is written at this point)
  6. Done.

Suggestions for future features are of course most welcome. Current ideas include changing {{elink}} and {{flink}} to {{e}} and {{f}} respectively and something about making sure episode inline episode links (which does not make use of a template) are correct, e.g. quotations around episode titles and film titles in italic, etc. --Sviptalk 21:52, 5 April 2010 (CEST)

Maybe something to fix quotes? That will be a bit more complicated, but I am sure could be automatic. --Sviptalk 21:57, 5 April 2010 (CEST)