The ScoutWiki Network server was upgraded on November 20th, 2019. The maintenance is now over. Please inform us in Slack or via email if you encounter any unexpected errors – it's possible the upgrade has missed something. Thanks and happy scoutwiki'ng!

Bot configuration/

From ScoutWiki Network
Jump to navigation Jump to search
# -*- coding: utf-8  -*-

__version__='$Id:,v 1.0 2006/04/4 19:26:01 wikipedian Exp $'

import wikipedia
import login

msg = {
         'en':u'Robot: Stub marks',
         'fi':u'Bot: P\u00e4iv\u00e4m\u00e4\u00e4r\u00e4 sivu luotu' #Date page created

comment = wikipedia.translate(wikipedia.getSite(), msg)

#login.LoginManager('KonttiBot', False, s)
#tammikuu is january, helmikuu is february
# every month in Finnish ends with "kuu", which means month. "kuuta" means "of month"
for kk in ['tammi','helmi','maalis','huhti','touko','kesä','heinä','elo','syys','loka','marras','joulu'] :
	for pa in range(31) :
		p=wikipedia.Page(s,'Malline:'+str(pp)+'. '+kk+'kuuta') #Malline: is Template:.. 1. tammikuuta=1st of january
		except wikipedia.NoPage:
			st='\n' #creates default page.
			st+=u'<!-- P\u00e4iv\u00e4sivun formaatti on:\n' #format of date page is:
			st+=u'Valinnainen selvennysrivi, Pyh\u00e4n Yrj\u00F6n p\u00e4iv\u00e4\n' #Optional line, like "day of Holy George"
			st+=u'* [[1989]] – Ensimm\u00e4inen asia tapahtui.\n' #first thing happened
			st+=u'* [[2001]] – Toinen asia tapahtui.\n'  #second
			st+=u'* [[2002]] – Kolmas asia tapahtui.\n'  #third
			st+=u"''T\u00e4lle p\u00e4iv\u00e4lle ei ole merkitty viel\u00e4 yht\u00e4\u00e4n tapahtumaa. ''\n" #There is now events