Refactor with its own entry point and startup script cista, instead of running via sanic. Config file handling and Droppy updates. HTTP redirection/acme server added.

This commit is contained in:
Leo Vasanko
2023-10-19 02:06:14 +03:00
committed by LeoVasanko
parent 429a7dfb16
commit 05c6f03d20
18 changed files with 247 additions and 51 deletions
Regular → Executable
+1 -3
View File
@@ -9,8 +9,6 @@ from . import config
from .asynclink import AsyncLink
from .lrucache import LRUCache
ROOT = config.config.path
print("Serving", ROOT)
def fuid(stat) -> str:
"""Unique file ID. Stays the same on renames and modification."""
@@ -26,7 +24,7 @@ def sanitize_filename(filename: str) -> str:
class File:
def __init__(self, filename):
self.path = ROOT / filename
self.path = config.config.path / filename
self.fd = None
self.writable = False