Difference between revisions of "Table:The bot"

From The Infosphere, the Futurama Wiki
Jump to navigation Jump to search
Line 19: Line 19:
##* Or if it is available, but no new changes have been made, check 5 random articles
##* Or if it is available, but no new changes have been made, check 5 random articles
# Run through the pages obtained
# Run through the pages obtained
## Arrange their categories
## Run through its tasks
### Arrange their categories
### Fix their quotes
## Nothing else right now
## Nothing else right now
## If there is a change to its content, commit the edit
## If there is a change to its content, commit the edit
Line 32: Line 34:
:Maybe something to fix quotes?  That will be a bit more complicated, but I am sure could be automatic. --'''[[User:Svip|Svip]]'''<sup>[[User talk:Svip|talk]]</sup> 21:57, 5 April 2010 (CEST)
:Maybe something to fix quotes?  That will be a bit more complicated, but I am sure could be automatic. --'''[[User:Svip|Svip]]'''<sup>[[User talk:Svip|talk]]</sup> 21:57, 5 April 2010 (CEST)
::Everything seems okay so far. Can't think of anything else to sick the bot on. - [[User:Quolnok|Quolnok]] 12:07, 6 April 2010 (CEST)
::Everything seems okay so far. Can't think of anything else to sick the bot on. - [[User:Quolnok|Quolnok]] 12:07, 6 April 2010 (CEST)
Updated the algorithm with a new feature, it now also attempts to fix quotes, [http://theinfosphere.org/index.php?title=Morgan_Proctor&diff=prev&oldid=56925 see here].  It will also conform existing quotes in this manner to our standard. --'''[[User:Svip|Svip]]'''<sup>[[User talk:Svip|talk]]</sup> 17:32, 7 April 2010 (CEST)

Revision as of 17:32, 7 April 2010

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. Run through its tasks
      1. Arrange their categories
      2. Fix their quotes
    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)
Everything seems okay so far. Can't think of anything else to sick the bot on. - Quolnok 12:07, 6 April 2010 (CEST)

Updated the algorithm with a new feature, it now also attempts to fix quotes, see here. It will also conform existing quotes in this manner to our standard. --Sviptalk 17:32, 7 April 2010 (CEST)