clean up: remove unused start.sh/pyinstaller.spec, deduplicate constants, update .gitignore

This commit is contained in:
blankie 2026-06-09 01:16:54 +00:00
parent 8504aa0d72
commit 1aaa88b06a
4 changed files with 7 additions and 87 deletions

5
.gitignore vendored
View file

@ -1,7 +1,12 @@
__pycache__/
*.pyc
.env
tinyweb_identity
index.db
index.db-shm
index.db-wal
models/
index.hnsw
*.db
*.db-shm
*.db-wal

6
app.py
View file

@ -13,8 +13,6 @@ import templates as templates_mod
import gateway
from gateway import GatewayState, GatewayHandler
APP_NAME = "tinyweb"
ASPECTS = ["server"]
IDENTITY_FILE = "tinyweb_identity"
DEFAULT_TRANSPORT_HOST = "rnode.bre.land"
DEFAULT_TRANSPORT_PORT = 4242
@ -265,8 +263,8 @@ def main():
identity,
RNS.Destination.IN,
RNS.Destination.SINGLE,
APP_NAME,
*ASPECTS,
gateway.APP_NAME,
*gateway.ASPECTS,
)
destination.register_request_handler(

View file

@ -1,81 +0,0 @@
# -*- mode: python ; coding: utf-8 -*-
import os
import sys
block_cipher = None
# Hidden imports that PyInstaller can't detect automatically
hiddenimports = [
"RNS",
"RNS.Destination",
"RNS.Identity",
"RNS.Reticulum",
"onnxruntime",
"onnxruntime.capi.onnxruntime_pybind11_state",
"tokenizers",
"huggingface_hub",
"hnswlib",
"bs4",
"beautifulsoup4",
"numpy",
"requests",
]
# Data files to include
datas = [
("themes", "themes"),
]
# Exclude unnecessary modules
excludes = [
"test",
"tests",
"tkinter",
"matplotlib",
"scipy",
"pandas",
"IPython",
"jupyter",
"notebook",
]
a = Analysis(
["app.py"],
pathex=[],
binaries=[],
datas=datas,
hiddenimports=hiddenimports,
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=excludes,
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False,
)
pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)
exe = EXE(
pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
[],
name="TinyWeb",
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=True,
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
)

View file

@ -1,2 +0,0 @@
#!/bin/sh
exec /nix/store/vhgmnrmvvfdiw0kc2xz8px7rvg60lszc-python3-3.13.12-env/bin/python /home/user/apps/tinyweb/app.py --bind 0.0.0.0