Commit graph

98 commits

Author SHA1 Message Date
blankie
cc71d9c577 unified add form, remove page view endpoint, drop mesh nav/section 2026-06-18 20:34:58 +00:00
blankie
d0b27b4c61 page view endpoint, standalone site server, RNS-aware SPA nav 2026-06-18 18:14:12 +00:00
blankie
0c83db7a17 add /rns mesh link to navigation bar 2026-06-18 17:26:59 +00:00
blankie
8a4857490f rns browser: browse remote tinyweb sites over reticulum from local ui
- new /rns page lists saved mesh sites, add/delete by hash
- GET /rns/<hash>/<path> proxies pages over encrypted RNS
  with link rewriting so navigation stays within /rns/<hash>/...
- new fetch_remote_page() in rns_client.py for generic
  RNS page fetching (refactored from old _fetch)
- mesh_sites table for persisting saved hashes
- POST /rns/add and /rns/delete for managing sites
2026-06-18 17:26:35 +00:00
blankie
1eb0760a55 expand RNS whitelist: allow GET /, /about, /pages, /tags, /share via gateway 2026-06-18 17:15:15 +00:00
blankie
4468ba89ad forum trust circle: trust-gated content exchange via subscription graph 2026-06-17 20:16:30 +00:00
blankie
31c53b9a8e fix: app.py gateway import alias (broken since src layout migration) 2026-06-17 20:16:06 +00:00
blankie
f418ce7c75 forum trust circle: trust-gated content exchange via subscription graph 2026-06-17 20:15:50 +00:00
blankie
b07ca37663 readme: update project structure to reflect src layout 2026-06-17 05:16:34 +00:00
blankie
76672aa838 src layout: move core code into src/tinyweb/ package
- Moved app.py, db.py, gateway.py, templates.py, embeddings.py,
  rns_client.py, and handlers/ into src/tinyweb/
- Created root app.py shim (adds src/ to sys.path, imports main)
- Created pyproject.toml with setuptools config (where = ["src"])
- Added src/tinyweb/__init__.py
- Updated all internal imports to use tinyweb. prefix (73 occurrences)
- Removed sys.path.insert hack from conftest.py
- Updated Dockerfile: pip install -e /app before running
- Updated gateway.py usage message: python -m tinyweb.gateway
- Updated README.md gateway usage instructions
2026-06-17 05:03:23 +00:00
blankie
fc4e0c0b1d junimo theme: use {{site_name}} and {{forum_link}} placeholders 2026-06-16 05:23:24 +00:00
blankie
7a81b519bb remove demo pages, rename themes, add Content-Length header 2026-06-16 05:11:37 +00:00
blankie
a72de2bb10 auto-save: settings save on change via /style/field, noscript fallback button 2026-06-14 08:46:21 +00:00
blankie
076390cbee customize: split into separate settings and template forms 2026-06-14 08:14:43 +00:00
blankie
117fc1312c customize: move save button above html textarea, add unsaved changes indicator 2026-06-14 08:12:10 +00:00
blankie
d97ba6d489 template: remove forum css from DEFAULT_TEMPLATE (injected at render time) 2026-06-14 08:05:20 +00:00
blankie
501d9e1838 template: add {{nav}} placeholder, separate from {{content}} 2026-06-14 08:00:57 +00:00
blankie
1461c62c91 docker: fix data persistence with TINYWEB_DATA_DIR env var 2026-06-14 07:48:34 +00:00
blankie
27147bd3f9 bookmarklet: use dynamic host and scheme from request headers 2026-06-14 07:43:26 +00:00
blankie
4a45700067 simplify: move subscribe form to GET /subscriptions/add 2026-06-14 07:36:37 +00:00
blankie
0da46d29fc Revert "simplify: move subscribe form to GET /subscriptions/add"
This reverts commit 25e24efbfa.
2026-06-14 07:33:38 +00:00
blankie
25e24efbfa simplify: move subscribe form to GET /subscriptions/add 2026-06-14 07:32:58 +00:00
blankie
e0a5d44d94 readme: remove duplicate forum section 2026-06-09 05:58:55 +00:00
blankie
8e68d02413 search: match by tag; add: handle ssl errors with manual entry 2026-06-09 05:35:54 +00:00
blankie
6c4b26781d restructure README: expand getting started, demote Docker 2026-06-09 03:18:23 +00:00
blankie
7fd46ad6a7 add CONTRIBUTING.md and issue template 2026-06-09 03:15:55 +00:00
blankie
571a8fe406 add SECURITY.md 2026-06-09 03:11:43 +00:00
blankie
bddfb70fc0 README: add transparency sections, TOC, update project structure 2026-06-09 03:06:38 +00:00
blankie
dce16e313e split handlers.py into handlers/ package
- _helpers.py: CSRF, FTS sanitizer, pagination, response helpers, tag helpers
- search.py: BM25 + hybrid search, trusted/remote result rendering
- pages.py: add/edit/delete/bulk/bookmark handlers
- subscriptions.py: sync, share preview, API sites, subscription CRUD
- customize.py: settings form, about page
- tags.py: tag list and tag browse handlers
- data.py: export, import, semantic reindex handlers
- __init__.py: dispatch, re-exports, forum_plugin, _request_local

All 58 external symbols re-exported. No changes to app.py, conftest.py,
or any test file.
2026-06-09 02:34:04 +00:00
blankie
503ad787ae add .env.example for environment configuration 2026-06-09 02:14:17 +00:00
blankie
9707079deb point repo URLs to Codeberg instead of self-hosted Gitea 2026-06-09 01:41:41 +00:00
blankie
6b24c34056 clean up: remove unused start.sh/pyinstaller.spec, deduplicate constants, update .gitignore 2026-06-09 01:16:54 +00:00
blankie
8ccd8a5fd3 remove forgejo CI workflow (no releases) 2026-06-09 01:08:39 +00:00
blankie
dc484f1d60 threaded HTTP server, rate limiting, remove slow-web rhetoric 2026-06-09 01:07:36 +00:00
blankie
fa1f6ccc9e rewrite README — descriptive tone, remove releases/philosophy sections 2026-06-09 01:07:09 +00:00
blankie
86dbb6ac28 move forum layout CSS to main site template system
- Remove FORUM_CSS_DEFAULT/KODAMA2 and _forum_css() from forum handlers
- Add FORUM_CSS constant to templates.py with layout-only forum CSS
- Inject forum CSS into any template's <head> via wrap_page()
- Add forum layout styles to kodama2.html theme
- Update database custom template
2026-06-06 01:41:41 +00:00
blankie
ee20cc32d7 added tinyweb-site theme 2026-06-05 05:29:36 +00:00
blankie
c54c6c344e added site_name placeholder to templates 2026-06-05 05:29:36 +00:00
blankie
822fa6e055 hid forum link when disabled 2026-06-05 05:29:36 +00:00
blankie
086ea2eb0b updated forum README with auto-discovery 2026-06-05 05:29:36 +00:00
blankie
083ce6a11f integrated the forum plugin 2026-06-05 05:29:36 +00:00
blankie
6f3c79887c reworked to distribute via clone, not registry 2026-06-05 05:29:36 +00:00
blankie
c81f5a52b9 fixed Docker socket mount 2026-06-05 05:29:36 +00:00
blankie
b7c9a69c2d switched to host-mode Docker 2026-06-05 05:29:36 +00:00
blankie
24a4cadc70 fixed CI: Docker in container 2026-06-05 05:29:36 +00:00
blankie
ce24ff5f3c fixed CI: install jq for release 2026-06-05 05:29:36 +00:00
blankie
7942d537e3 fixed CI: --break-system-packages 2026-06-05 05:29:36 +00:00
blankie
57aa8b7b24 fixed CI: use apt-get for Python 2026-06-05 05:29:36 +00:00
blankie
feac42c5ad added pytest test suite (174 tests)
174 tests covering URL normalization, FTS5 query sanitization, SSRF/CSRF
guards, sharing-mode logic, DB schema and upsert paths, handler
end-to-end flows, and gateway body-size / mesh-whitelist guards. Each
recent bug-fix commit (6ffd38d, 1bc695f, 8dffd8c) has an explicit
regression test in test_regressions.py. One xfail documents a minor
latent bug in clean_url where port 80 is not stripped from upgraded
https URLs.
2026-06-05 05:29:36 +00:00
blankie
972d79ae5c added data-loss guards + first-run state
- Bulk delete now routes through a server-rendered confirmation page
  listing the selected titles; a `confirmed=1` form field is required
  before pages are actually deleted. Mirrors the single-delete flow.
- Reset-template button gains a JS confirm() so stray clicks don't wipe
  the custom template.
- Homepage shows a short, neutral empty-state block when the index has
  zero pages and no query — just names what tinyweb is and links to
  /add, /style, and /subscriptions as equal options.
- /about gains a "your data" section explaining what lives in
  ~/.tinyweb/ (identity file, index.db), what losing each costs, and
  how /export differs from a full backup.
- README gains a "Backups" subsection mirroring the /about copy.
2026-06-05 05:29:36 +00:00