[F] Fix version incompat
This commit is contained in:
+2
-4
@@ -1,5 +1,3 @@
|
|||||||
version: '3.8'
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
postgres:
|
postgres:
|
||||||
image: postgres:latest
|
image: postgres:latest
|
||||||
@@ -10,9 +8,9 @@ services:
|
|||||||
POSTGRES_PASSWORD: meow
|
POSTGRES_PASSWORD: meow
|
||||||
POSTGRES_DB: tgtree
|
POSTGRES_DB: tgtree
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:5432:5432"
|
- "127.0.0.1:5444:5432"
|
||||||
volumes:
|
volumes:
|
||||||
- tgtree-db:/var/lib/postgresql/data
|
- tgtree-db:/var/lib/postgresql
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
tgtree-db:
|
tgtree-db:
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ dependencies = [
|
|||||||
"hypy-utils>=1.0.29",
|
"hypy-utils>=1.0.29",
|
||||||
"peewee>=4.0.1",
|
"peewee>=4.0.1",
|
||||||
"playhouse>=0.1.0",
|
"playhouse>=0.1.0",
|
||||||
|
"psycopg2>=2.9.11",
|
||||||
"python-telegram-bot>=22.6",
|
"python-telegram-bot>=22.6",
|
||||||
"requests>=2.32.5",
|
"requests>=2.32.5",
|
||||||
"starlette>=0.52.1",
|
"starlette>=0.52.1",
|
||||||
|
|||||||
+3
-3
@@ -69,9 +69,9 @@ async def start(update: Update, context: ContextTypes.DEFAULT_TYPE):
|
|||||||
def channel_html(channel: str):
|
def channel_html(channel: str):
|
||||||
ouf = (channels_dir / f"{channel}.html")
|
ouf = (channels_dir / f"{channel}.html")
|
||||||
if ouf.exists():
|
if ouf.exists():
|
||||||
return ouf.read_text()
|
return ouf.read_text('utf-8')
|
||||||
t = requests.get(f"https://t.me/{channel}").text
|
t = requests.get(f"https://t.me/{channel}").text
|
||||||
ouf.write_text(t)
|
ouf.write_text(t, 'utf-8')
|
||||||
return t
|
return t
|
||||||
|
|
||||||
|
|
||||||
@@ -431,7 +431,7 @@ async def shutdown_event():
|
|||||||
await bot.shutdown()
|
await bot.shutdown()
|
||||||
|
|
||||||
|
|
||||||
layout_html = (Path(__file__).parent / "public" / "layout.html").read_text()
|
layout_html = (Path(__file__).parent.parent / "public" / "layout.html").read_text('utf-8')
|
||||||
fmt_html = lambda x: layout_html.replace("{{CONTENT}}", x).replace("\n", "")
|
fmt_html = lambda x: layout_html.replace("{{CONTENT}}", x).replace("\n", "")
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -29,7 +29,7 @@ def dfs(channel: str):
|
|||||||
|
|
||||||
def gen_tree(d: Path = src / "public"):
|
def gen_tree(d: Path = src / "public"):
|
||||||
of = dfs("hykilp")
|
of = dfs("hykilp")
|
||||||
write(d / "index.html", (src / "public/layout-full-tree.html").read_text()
|
write(d / "index.html", (src / "public/layout-full-tree.html").read_text('utf-8')
|
||||||
.replace("{{CONTENT}}", of))
|
.replace("{{CONTENT}}", of))
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -5,7 +5,7 @@ from pathlib import Path
|
|||||||
from typing import NamedTuple
|
from typing import NamedTuple
|
||||||
|
|
||||||
|
|
||||||
CONFIG = tomllib.loads((Path(__file__).parent.parent / "config.toml").read_text())
|
CONFIG = tomllib.loads((Path(__file__).parent.parent / "config.toml").read_text('utf-8'))
|
||||||
|
|
||||||
|
|
||||||
def gen_sha(channel: str, uid: int, parent: str):
|
def gen_sha(channel: str, uid: int, parent: str):
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ dependencies = [
|
|||||||
{ name = "hypy-utils" },
|
{ name = "hypy-utils" },
|
||||||
{ name = "peewee" },
|
{ name = "peewee" },
|
||||||
{ name = "playhouse" },
|
{ name = "playhouse" },
|
||||||
|
{ name = "psycopg2" },
|
||||||
{ name = "python-telegram-bot" },
|
{ name = "python-telegram-bot" },
|
||||||
{ name = "requests" },
|
{ name = "requests" },
|
||||||
{ name = "starlette" },
|
{ name = "starlette" },
|
||||||
@@ -66,6 +67,7 @@ requires-dist = [
|
|||||||
{ name = "hypy-utils", specifier = ">=1.0.29" },
|
{ name = "hypy-utils", specifier = ">=1.0.29" },
|
||||||
{ name = "peewee", specifier = ">=4.0.1" },
|
{ name = "peewee", specifier = ">=4.0.1" },
|
||||||
{ name = "playhouse", specifier = ">=0.1.0" },
|
{ name = "playhouse", specifier = ">=0.1.0" },
|
||||||
|
{ name = "psycopg2", specifier = ">=2.9.11" },
|
||||||
{ name = "python-telegram-bot", specifier = ">=22.6" },
|
{ name = "python-telegram-bot", specifier = ">=22.6" },
|
||||||
{ name = "requests", specifier = ">=2.32.5" },
|
{ name = "requests", specifier = ">=2.32.5" },
|
||||||
{ name = "starlette", specifier = ">=0.52.1" },
|
{ name = "starlette", specifier = ">=0.52.1" },
|
||||||
@@ -223,6 +225,16 @@ wheels = [
|
|||||||
{ url = "https://files.pythonhosted.org/packages/13/22/2a61be98f9dace4604aec97eb6cae085354f04babb91de3e5b0fc3b6cc5a/playhouse-0.1.0-py3-none-any.whl", hash = "sha256:ba6b851f8bba7cf083b0289f64729b717f4e8bd552d2ba3dfc6fc1f76fdd40a1", size = 1080, upload-time = "2024-11-10T13:02:37.999Z" },
|
{ url = "https://files.pythonhosted.org/packages/13/22/2a61be98f9dace4604aec97eb6cae085354f04babb91de3e5b0fc3b6cc5a/playhouse-0.1.0-py3-none-any.whl", hash = "sha256:ba6b851f8bba7cf083b0289f64729b717f4e8bd552d2ba3dfc6fc1f76fdd40a1", size = 1080, upload-time = "2024-11-10T13:02:37.999Z" },
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "psycopg2"
|
||||||
|
version = "2.9.11"
|
||||||
|
source = { registry = "https://pypi.org/simple" }
|
||||||
|
sdist = { url = "https://files.pythonhosted.org/packages/89/8d/9d12bc8677c24dad342ec777529bce705b3e785fa05d85122b5502b9ab55/psycopg2-2.9.11.tar.gz", hash = "sha256:964d31caf728e217c697ff77ea69c2ba0865fa41ec20bb00f0977e62fdcc52e3", size = 379598, upload-time = "2025-10-10T11:14:46.075Z" }
|
||||||
|
wheels = [
|
||||||
|
{ url = "https://files.pythonhosted.org/packages/88/5a/18c8cb13fc6908dc41a483d2c14d927a7a3f29883748747e8cb625da6587/psycopg2-2.9.11-cp313-cp313-win_amd64.whl", hash = "sha256:8dc379166b5b7d5ea66dcebf433011dfc51a7bb8a5fc12367fa05668e5fc53c8", size = 2714048, upload-time = "2025-10-10T11:10:19.816Z" },
|
||||||
|
{ url = "https://files.pythonhosted.org/packages/47/08/737aa39c78d705a7ce58248d00eeba0e9fc36be488f9b672b88736fbb1f7/psycopg2-2.9.11-cp314-cp314-win_amd64.whl", hash = "sha256:f10a48acba5fe6e312b891f290b4d2ca595fc9a06850fe53320beac353575578", size = 2803738, upload-time = "2025-10-10T11:10:23.196Z" },
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pydantic"
|
name = "pydantic"
|
||||||
version = "2.12.5"
|
version = "2.12.5"
|
||||||
|
|||||||
Reference in New Issue
Block a user