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, )
def gr_index(): return template( "templates/gr", genius=m.declaregenius(m.readgenius()), to_print=m.displaymessage(), status=m.get_status(), apptitle=m.apptitle, )
def action_dc(): return template( "templates/gr", genius=m.declaregenius(m.readgenius()), to_print=m.calib.remove(), status=m.get_status(), apptitle=m.apptitle, )
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, )
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, )
def action_d(): return template( "templates/gr", genius=m.declaregenius(m.readgenius()), to_print=m.display.add(), status=m.get_status(), apptitle=m.apptitle, )
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, )
def undeclared_index(): return template("templates/launch", genius=m.declaregenius(m.readgenius()), apptitle=m.apptitle)
def submit(): m.sendfeedback(request.forms.get("feedbacktext")) return template("templates/launch", genius=m.declaregenius(m.readgenius()), apptitle=m.apptitle)
# 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",