sean@16: sean@16: sean@16: <% sean@21: import math, os, sys, subprocess, html.parser sean@21: from datetime import date sean@16: sean@21: PATH = os.path.abspath(os.path.dirname(sys.argv[0])) sean@21: sys.path.append(PATH + "/modules") sean@21: import web_view sean@16: sean@21: ################# sean@21: # settings # sean@21: ################# sean@16: sean@21: show_top_bar = settings["show_top_bar"] sean@16: sean@21: ################# sean@21: # date and time # sean@21: ################# sean@16: sean@21: today = date.today() sean@21: weekday = ("Montag", "Dienstag", "Mittwoch", "Donnerstag", sean@21: "Freitag", "Samstag", "Sonntag")[today.weekday()] sean@21: month_name = ("Januar", "Februar", "März", "Aprill", "Mai", sean@21: "Juni", "Juli", "August", "September", "Oktober", sean@21: "November", "Dezember")[today.month-1] sean@21: sean@28: number_of_rows = settings["rows"] sean@21: sean@21: ################# sean@21: # viewport size # sean@21: ################# sean@28: vp_size = "4vw" sean@28: sean@21: #if len(tiles) <= 2: sean@21: # vp_size = "6vw" sean@21: #elif len(tiles) >2 and len(tiles) <=4 : sean@21: # vp_size = "5vw" sean@21: #elif len(tiles) >4 and len(tiles) <=6 : sean@21: # vp_size = "4vw" sean@21: #elif len(tiles) >6 and len(tiles) <=8 : sean@21: # vp_size = "3vw" sean@21: #end sean@21: %> sean@21: sean@21: sean@21: sean@21: sean@21: sean@21: sean@21: sean@21: sean@21: sean@16: sean@21: sean@21: sean@21:
sean@21: % if show_top_bar == "True": sean@21:
sean@31:
sean@31: {{weekday}} {{today.day}}. {{month_name}} sean@31:
sean@31: sean@31:
sean@31: Webadresse: sean@31:
sean@31: sean@31:
sean@31: Synced: 0 Minutes Ago sean@31:
sean@31: sean@31: sean@16:
sean@16: % end sean@16: sean@21:
sean@21: <% sean@21: for tile in tiles : sean@21: type = "" sean@21: tile_content = "" sean@21: status = "" sean@21: uid = "" sean@28: add_style = "" sean@21: sean@21: if tile["type"] == "mon" : sean@21: type = "statusmon" sean@21: uid = tile["source"] sean@28: status = "unclear" sean@28: add_style = "display:table" sean@28: sean@28: tile_content = """ sean@28:
sean@28: {} sean@28:
sean@28: """.format(tile["source"]) sean@21: sean@25: elif tile["type"] == "web_view" : sean@25: type = tile["type"] sean@21: uid = tile["div_name"] sean@21: tile_content = web_view.make_chart(tile["script"], tile["div_name"]) sean@21: end sean@21: %> sean@21: gernot@44:
sean@21: {{!tile_content}} sean@21:
sean@21: sean@21: % end sean@21:
sean@16:
sean@21: sean@21: