예제 #1
0
def get_settings():
    extensions_data = load_extensions.load_file_extensions()
    bindings_data = load_bindings.load_key_bindings()

    return render_template('settings.html',
                           bindings_data=bindings_data,
                           extensions_data=extensions_data)
예제 #2
0
def index():

    # Creates defaults if they don't exist
    load_extensions.load_file_extensions()
    load_bindings.load_key_bindings()

    try:
        json_data = open("channel_data.json", "r").read()
    except:
        channel_data = "[]"
    else:
        json_data = json_data.replace("//", "/")
        json_data = json_data.splitlines()
        channel_data = ""
        for line in json_data:
            channel_data += line

    channel_data = base64.b64encode(channel_data)
    return render_template('channels.html', channel_data=channel_data)