Esempio n. 1
0
    def __api(self, opt):
        print opt
        if not opt.has_key("mdn") or \
            not opt.has_key("stime") or \
            not opt.has_key("etime"):
            return None

        html = gen_html.gen_html(opt["mdn"], opt["stime"], opt["etime"])
        return ("text/html", html)
Esempio n. 2
0
def bracket_display():
    """
    Generate html pages for all groups.  Group names are extracted from the
    section names in ../gen_data/groups.ini and are updated using the data
    in ../figure_future/result.json
    """
    with open('abbrevs.txt', 'r') as afile:
        team_nms = afile.readlines()
    team_nms = [x.strip() for x in team_nms]
    rem_json = '..%sfigure_future%sresult.json' % (os.sep, os.sep)
    with open(rem_json, 'r', encoding='utf8') as json_file:
        jdata = json.load(json_file, encoding='utf-8')
    ginfo = ConfigParser()
    ginfo.read("..%sgen_data%sgroups.ini" % (os.sep, os.sep))
    for name in ginfo.sections():
        nname = '_'.join(name.strip().split(' '))
        rec_list = gen_records(jdata[nname])
        gen_html(name, rec_list, team_nms)
Esempio n. 3
0
 def gen_html(*args):
     """Call gen_html with TEST_DATA."""
     return gen_html.gen_html(TEST_DATA, *args)[0]
Esempio n. 4
0
from deploy import deploy

version = "0.5.0"

if __name__ == "__main__":
    if len(sys.argv) > 1:
        if sys.argv[1] == "--version":
            print("mandyczewski {}".format(version))
            sys.exit()
        elif sys.argv[1] == "--help":
            print("mandyczewski {}\n".format(version))
            import helpdoc
            helpdoc.println()
            sys.exit()

    sys.stderr.write("mandyczewski {}\n".format(version))

    if len(sys.argv) == 1:
        from gen_html import gen_html
        gen_html()
    elif sys.argv[1] == "gen":
        from gen_html import gen_html
        gen_html()
    elif sys.argv[1] == "new":
        new_note()
    elif sys.argv[1] == "deploy":
        deploy()
    else:
        sys.stderr.write(
            "\nInvalid arguments or options. Use '--help' to get help.\n")
Esempio n. 5
0
 def gen_html(*args):
     """Call gen_html with TEST_DATA."""
     return gen_html.gen_html(gen_html.transpose(TEST_DATA), *args)[0]
Esempio n. 6
0
 def gen_html(self, *args):
     return gen_html.gen_html(TEST_DATA, *args)[0]
Esempio n. 7
0
 def gen_html(self, *args):
     return gen_html.gen_html(TEST_DATA, *args)[0]
Esempio n. 8
0
 def gen_html(*args):
     """Call gen_html with TEST_DATA."""
     return gen_html.gen_html(TEST_DATA, *args)[0]