import os from page import Page from random import choice import colours from colours import colour_print from printer import instance as printer page_number = os.path.splitext(os.path.basename(__file__))[0] sub_page = Page(page_number) sub_page.title = "Annawards" sub_page.index_num = "456-457" content = colour_print( printer.text_to_ascii("Annawards", padding={"left": 6})) awards = [ ["Boo Cow Annawards",{"Pietro Servini":1,"Stephen Muirhead":1,"Belgin Seymenoglu":2}], # Tea Wrecks was formerly known as Tea Breaker ["Tea Wrecks Annawards",{"Anna Lambert":1,"Rafael Prieto Curiel":1,"Belgin Seymenoglu":1}], ["Towel Flood Annawards",{"Jigsaw":1,"Belgin Seymenoglu":2}], ["Worst Sorting Hat",{"Anna Lambert":20}], ["Boo Key",{"Anna Lambert":1,"Sam Brown":1,"Rafael Prieto Curiel":1,"Mart Wright":1}], ["Stolen Pen",{"Anna Lambert":1}] ] pages = ["457","457","458","458","458","458"] content += "\nWho has the most Annawards?\n\n" for i,award in enumerate(awards): content += "\n"+sub_page.colours.Foreground.GREEN+award[0]+sub_page.colours.Foreground.DEFAULT+" (see page "+pages[i]+")\n" max_ = 0 max_p = None
import os from os.path import join,expanduser from page import Page from printer import instance as printer page_number = os.path.splitext(os.path.basename(__file__))[0] p_page = Page(page_number) p_page.title = "House Points" p_page.index_num = "402-403" content = p_page.colours.colour_print(printer.text_to_ascii("house points")) content += "\n\n" R = p_page.colours.Foreground.RED G = p_page.colours.Foreground.GREEN D = p_page.colours.Foreground.DEFAULT content += G+"Year " + " Gryffindor Slytherin Hufflepuff" + " Ravenclaw Durmstrang Squib Peeves"+D+"\n" content += G+"2015a"+D+" 692 535 "+R+"1155"+D+" 702 440 513 0\n" content += G+"2015b"+D+" 3382 408 "+R+"4614"+D+" 3591 606 2174 38\n" p_page.content = content