Ejemplo n.º 1
0
def get_badge_format():
    return format_spec(
        file(os.path.join(os.path.dirname(__file__), "badge.js")).read(), {
            "weekcolor": filter_weekly("#00ff00", "#ff0000"),
            "weekword": filter_weekly("on", "ei"),
            "daycolor": filter_daily("#00ff00", "#ff0000"),
            "dayword": filter_daily("on", "ei")
        })
Ejemplo n.º 2
0
def get_html_format(template_values):
    template_values.update({
        "weekresult": filter_weekly("on", "ei"),
        "dayresult": filter_daily("on", "ei"),
        "weekclass": filter_weekly("on", "ei"),
        "dayclass": filter_daily("on", "ei")
    })
    return format_spec(
        file(os.path.join(os.path.dirname(__file__), "index.html")).read(),
        template_values)
def get_html_format(template_values):
    template_values.update({"weekresult":filter_weekly("on","ei"), "dayresult":filter_daily("on","ei"),
        "weekclass":filter_weekly("on","ei"), "dayclass":filter_daily("on","ei")})
    return format_spec(file(os.path.join(os.path.dirname(__file__),"index.html")).read(),template_values)
def get_json_format():
    return format_spec('{ "week" : %(weekresult)s, "day" : %(dayresult)s }',
        {"weekresult":filter_weekly("true","false"), 
         "dayresult":filter_daily("true","false") })
def get_badge_format():
    return format_spec(file(os.path.join(os.path.dirname(__file__),"badge.js")).read(),
        {"weekcolor":filter_weekly("#00ff00","#ff0000"),
         "weekword":filter_weekly("on","ei"),
         "daycolor":filter_daily("#00ff00","#ff0000"),
         "dayword":filter_daily("on","ei")})
Ejemplo n.º 6
0
def get_json_format():
    return format_spec(
        '{ "week" : %(weekresult)s, "day" : %(dayresult)s }', {
            "weekresult": filter_weekly("true", "false"),
            "dayresult": filter_daily("true", "false")
        })