A Python robot that edits Wikipedia and interacts with people over IRC https://en.wikipedia.org/wiki/User:EarwigBot
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

12345678910111213141516171819202122232425262728
  1. # -*- coding: utf-8 -*-
  2. # EarwigBot Configuration File
  3. # This file tells the bot when to run certain wiki-editing tasks.
  4. def check(minute, hour, month_day, month, week_day):
  5. tasks = [] # tasks to run this turn, each as a tuple of (task_name, kwargs) or just task_name
  6. if minute == 0: # run every hour on the hour
  7. tasks.append(("afc_statistics", {"action": "save"})) # save statistics to [[Template:AFC_statistics]]
  8. if hour == 0: # run every day at midnight
  9. tasks.append("afc_dailycats") # create daily categories for WP:AFC
  10. tasks.append("feed_dailycats") # create daily categories for WP:FEED
  11. if week_day == 0: # run every Sunday at midnight (that is, the start of Sunday, not the end)
  12. tasks.append("afc_undated") # clear [[Category:Undated AfC submissions]]
  13. if week_day == 1: # run every Monday at midnight
  14. tasks.append("afc_catdelink") # delink mainspace categories in declined AfC submissions
  15. if week_day == 2: # run every Tuesday at midnight
  16. tasks.append("wrongmime") # tag files whose extensions do not agree with their MIME type
  17. if week_day == 3: # run every Wednesday at midnight
  18. tasks.append("blptag") # add |blp=yes to {{WPB}} or {{WPBS}} when it is used along with {{WP Biography}}
  19. return tasks