added PyInstaller builds, AGPLv3, transport config
- Add pyinstaller.spec and GitHub/Forgejo CI workflows for cross-platform builds - Add AGPLv3 license - Move data storage to ~/.tinyweb/ - Add --version and --port CLI flags - Add transport node selection in /style (smart regeneration preserves Reticulum config) - Add discover more nodes link to rmap.world
This commit is contained in:
parent
e6f77f0a55
commit
5b32d69863
9 changed files with 924 additions and 20 deletions
5
db.py
5
db.py
|
|
@ -2,10 +2,12 @@ import socket
|
|||
import ipaddress
|
||||
import sqlite3
|
||||
import requests
|
||||
import os
|
||||
from urllib.parse import urlparse, urljoin, parse_qs, urlencode, urlunparse, quote
|
||||
from bs4 import BeautifulSoup
|
||||
|
||||
DATABASE = "index.db"
|
||||
DATA_DIR = os.path.expanduser("~/.tinyweb")
|
||||
DATABASE = os.path.join(DATA_DIR, "index.db")
|
||||
|
||||
BLOCKED_NETWORKS = [
|
||||
ipaddress.ip_network("127.0.0.0/8"),
|
||||
|
|
@ -123,6 +125,7 @@ def return_db(db):
|
|||
|
||||
|
||||
def init_db():
|
||||
os.makedirs(DATA_DIR, exist_ok=True)
|
||||
db = sqlite3.connect(DATABASE)
|
||||
db.execute(
|
||||
"CREATE TABLE IF NOT EXISTS pages ("
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue