2016-05-01 00:19:00 +00:00
|
|
|
#!/usr/bin/python
|
|
|
|
|
|
|
|
import random
|
|
|
|
import json
|
|
|
|
import os
|
|
|
|
|
|
|
|
SOURCE = os.path.join("/home", "endorphant", "projects", "ttbp")
|
|
|
|
langfile = open(os.path.join(SOURCE, "lib", "lang.json"), 'r')
|
|
|
|
LANG = json.load(langfile)
|
|
|
|
langfile.close()
|
|
|
|
|
|
|
|
def say(keyword):
|
|
|
|
|
|
|
|
return random.choice(LANG.get(keyword))
|
2016-05-15 06:04:02 +00:00
|
|
|
|
|
|
|
def month(num):
|
|
|
|
return LANG["months"].get(num)
|