moved month printing to chatter
really, time.strftime should probably be used for this, but i got stuck on lowercase month names for consistency and would rather use my internal dict than lowercase the strftime return.master
parent
1842901ce6
commit
4aa185a9cf
|
@ -12,3 +12,6 @@ langfile.close()
|
||||||
def say(keyword):
|
def say(keyword):
|
||||||
|
|
||||||
return random.choice(LANG.get(keyword))
|
return random.choice(LANG.get(keyword))
|
||||||
|
|
||||||
|
def month(num):
|
||||||
|
return LANG["months"].get(num)
|
||||||
|
|
17
bin/core.py
17
bin/core.py
|
@ -21,21 +21,6 @@ HEADER = ""
|
||||||
FOOTER = ""
|
FOOTER = ""
|
||||||
FILES = []
|
FILES = []
|
||||||
|
|
||||||
MONTHS = {
|
|
||||||
"01":"january",
|
|
||||||
"02":"february",
|
|
||||||
"03":"march",
|
|
||||||
"04":"april",
|
|
||||||
"05":"may",
|
|
||||||
"06":"june",
|
|
||||||
"07":"july",
|
|
||||||
"08":"august",
|
|
||||||
"09":"september",
|
|
||||||
"10":"october",
|
|
||||||
"11":"november",
|
|
||||||
"12":"december"
|
|
||||||
}
|
|
||||||
|
|
||||||
def load():
|
def load():
|
||||||
global HEADER
|
global HEADER
|
||||||
global FOOTER
|
global FOOTER
|
||||||
|
@ -114,7 +99,7 @@ def write_entry(filename):
|
||||||
entry = [
|
entry = [
|
||||||
"\t\t<p><a name=\""+date[0]+date[1]+date[2]+"\"></a><br /><br /></p>\n",
|
"\t\t<p><a name=\""+date[0]+date[1]+date[2]+"\"></a><br /><br /></p>\n",
|
||||||
"\t\t<div class=\"entry\">\n",
|
"\t\t<div class=\"entry\">\n",
|
||||||
"\t\t\t<h5><a href=\"#"+date[0]+date[1]+date[2]+"\">"+date[2]+"</a> "+MONTHS[date[1]]+" "+date[0]+"</h5>\n"
|
"\t\t\t<h5><a href=\"#"+date[0]+date[1]+date[2]+"\">"+date[2]+"</a> "+chatter.month(date[1])+" "+date[0]+"</h5>\n"
|
||||||
#"\t\t\t<P>"
|
#"\t\t\t<P>"
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue