Esempio n. 1
0
def quoteb():
    current_status = m.getcurrentstatus()
    to_print = m.quote_battery(current_status[0], current_status[1], m.readgenius())
    return template(
        "templates/confirmb",
        genius=m.declaregenius(m.readgenius()),
        to_print=to_print,
        status=m.get_status(),
        apptitle=m.apptitle,
    )
Esempio n. 2
0
def gr_index():
    return template(
        "templates/gr",
        genius=m.declaregenius(m.readgenius()),
        to_print=m.displaymessage(),
        status=m.get_status(),
        apptitle=m.apptitle,
    )
Esempio n. 3
0
def action_dc():
    return template(
        "templates/gr",
        genius=m.declaregenius(m.readgenius()),
        to_print=m.calib.remove(),
        status=m.get_status(),
        apptitle=m.apptitle,
    )
Esempio n. 4
0
def action_df():
    if m.getcurrentstatus()[2] > 0:
        return template(
            "templates/gr",
            genius=m.declaregenius(m.readgenius()),
            to_print=m.fail.add(),
            status=m.get_status(),
            apptitle=m.apptitle,
        )
    else:
        return template(
            "templates/gr",
            genius=m.declaregenius(m.readgenius()),
            to_print="Error!",
            status=m.get_status(),
            apptitle=m.apptitle,
        )
Esempio n. 5
0
def action_b():
    m.battery.add()
    return template(
        "templates/bar",
        genius=m.declaregenius(m.readgenius()),
        to_print=m.displaymessage(),
        status=m.get_status(),
        apptitle=m.apptitle,
    )
Esempio n. 6
0
def action_d():

    return template(
        "templates/gr",
        genius=m.declaregenius(m.readgenius()),
        to_print=m.display.add(),
        status=m.get_status(),
        apptitle=m.apptitle,
    )
Esempio n. 7
0
def action_dc():
    if m.getcurrentstatus()[1] > 0:
        m.calib.add()
    return template(
        "templates/gr",
        genius=m.declaregenius(m.readgenius()),
        to_print=m.display.remove(),
        status=m.get_status(),
        apptitle=m.apptitle,
    )
Esempio n. 8
0
def undeclared_index():
    return template("templates/launch", genius=m.declaregenius(m.readgenius()), apptitle=m.apptitle)
Esempio n. 9
0
def submit():
    m.sendfeedback(request.forms.get("feedbacktext"))
    return template("templates/launch", genius=m.declaregenius(m.readgenius()), apptitle=m.apptitle)
Esempio n. 10
0
# WebApp using Bottle

import os
import bottle as bt
from bottle import route, run, template, request, get, post
import modularui as m

app = bt.Bottle()

genius = m.declaregenius(m.readgenius())


@app.route("/static/css/<filename>")
def stylesheets(filename):
    return bt.static_file(filename, root="./static/css")


@app.route("/static/img/<filename>")
def stylesheets2(filename):
    return bt.static_file(filename, root="./static/img")


@app.route("/static/fonts/<filename>")
def stylesheets3(filename):
    return bt.static_file(filename, root="./static/fonts")


@app.route("/bar")
def bar_index():
    return template(
        "templates/bar",