commit - 7b7448427bf4aaf98c1b971912ee90f68f793cef
commit + da7270e14b4f810371885c511c8759b8de007235
blob - f921a5993b14bb81a42f353e22e0ec66cd1d724d
blob + edaab424439a0b9fa01c3353b276d9006bc1c348
--- lonk.py
+++ lonk.py
return "\n".join(gmi_text for gmi_text in self.gmi_text if gmi_text)
def handle_starttag(self, tag, attrs):
- # print(f" > {tag=}")
-
- # https://humungus.tedunangst.com/r/webs/v/tip/f/htfilter/html.go
-
def _push(elem):
if self.stack:
self.gmi_text.append(self.stack[-1].flush())
self.gmi_text.append(self.stack[-1].flush())
def handle_data(self, data):
- # print(f" . {data=}")
if not self.stack:
self.stack.append(ParagraphTag("p", []))
self.stack[-1].on_data(data)
def handle_endtag(self, tag):
- # print(f" < {tag=}")
if self.stack and tag == self.stack[-1].tag:
self.gmi_text.append(self.stack.pop().flush())
db_con.execute(
"""
CREATE TABLE
+ client_settings (
+ client_id INTEGER,
+ media_gemini_proxy INTEGER,
+ FOREIGN KEY (client_id) REFERENCES client (client_id)
+ )
+ """
+ )
+ db_con.execute(
+ """
+ CREATE TABLE
convoy (
convoy_id INTEGER PRIMARY KEY,
convoy TEXT,
mime TEXT,
alt_text TEXT,
FOREIGN KEY (convoy_id) REFERENCES convoy (convoy_id)
+ )
+ """
+ )
+ db_con.execute(
+ """
+ CREATE TABLE
+ meta (
+ db_schema_version INTEGER
)
"""
)
+ db_con.execute("INSERT INTO meta(db_schema_version) VALUES (?)", (1, ))
def db_connect():