From b3c38eb5afb4e9e2627a5d43e559c62caa555e46 Mon Sep 17 00:00:00 2001 From: lichenblankie Date: Tue, 9 Jun 2026 01:16:54 +0000 Subject: [PATCH] clean up: remove unused start.sh/pyinstaller.spec, deduplicate constants, update .gitignore --- .gitignore | 5 +++ app.py | 6 ++-- pyinstaller.spec | 81 ------------------------------------------------ start.sh | 2 -- 4 files changed, 7 insertions(+), 87 deletions(-) delete mode 100644 pyinstaller.spec delete mode 100755 start.sh diff --git a/.gitignore b/.gitignore index bfefc77..345ff43 100644 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/app.py b/app.py index c550760..0e86e97 100644 --- a/app.py +++ b/app.py @@ -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 = "reticulum.derickphan.com" 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( diff --git a/pyinstaller.spec b/pyinstaller.spec deleted file mode 100644 index 431155f..0000000 --- a/pyinstaller.spec +++ /dev/null @@ -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, -) diff --git a/start.sh b/start.sh deleted file mode 100755 index d8df32c..0000000 --- a/start.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec /nix/store/vhgmnrmvvfdiw0kc2xz8px7rvg60lszc-python3-3.13.12-env/bin/python /home/lichenblankie/apps/tinyweb/app.py --bind 0.0.0.0 \ No newline at end of file