Commit graph

13 commits

Author SHA1 Message Date
38475eceeb
feat: provenance + QR codes on every export
Every exported document (PDF, EPUB, DOCX, HTML, markdown, plain, ...)
now points back to its living source on Remarkbox so a printed snapshot
remains traceable years later.

What's injected:
  - Top banner: source URI, snapshot ISO timestamp, generator commit hash,
    plus a notice the document is a snapshot of a living source.
  - QR code (PNG, embedded as data URI) linking back to the canonical URI.
    Scannable from print, survives the pandoc image pipeline across
    HTML, PDF (via wkhtmltopdf), DOCX, EPUB, ODT.
  - Per-reply permalinks: each reply heading hyperlinks its date to the
    deep-link permalink (thread-uri#node-id), academic-citation style.
  - Footer repeating the source URI + commit hash.
  - Namespace exports also hyperlink each chapter title to the live
    thread.

Canonical URI = https://{namespace.name}{node.path} — namespace name is
its host on the public web.

New module: remarkbox/lib/provenance.py — header_md, footer_md,
reply_heading_md, qr_png_data_uri, canonical_uri helpers, and a one-shot
build() bundler.

Dep added: segno (pure-Python QR generator, BSD, zero deps).
2026-04-25 06:14:39 -04:00
e1952cb1c4 ci: fix chaostheory requirement name (pip distribution is remarkbox-chaostheory) 2026-04-21 18:31:49 -04:00
ddbcdfa094 ci: install and bundle remarkbox-theme-chaostheory
Adds chaostheory theme to the shared env.tar.gz build so foxhop.net
(which sets app.theme = chaostheory and shares /opt/remarkbox/env with
my.remarkbox.com) has the theme's templates + static assets available
after deploy.
2026-04-21 18:27:49 -04:00
f3815eb0ce fix: CWE-407 content length cap on browser form paths; tighten bleach pin; add tests
- views/__init__.py: add MAX_CONTENT_LENGTH = 500_000 (shared constant with comment
  explaining the CWE-407 / bleach ReDoS rationale)
- reply_node.py: reject oversized content before set_data() / clean_raw_html()
- modify_node.py: same guard on edit path
- new_thread.py: same guard on new thread path
- requirements.py3.txt: tighten bleach>=2.1.4 -> bleach>=6.0.0 with CVE note
- test_render.py: unit tests for bleach version contract, API stability,
  sanitization correctness, and ReDoS resistance timing
- test_views.py: functional tests for content length enforcement on all three
  browser form paths (reply, new thread)
2026-03-30 09:27:59 -04:00
f45c42d343 modified: remarkbox/__init__.py
modified:   requirements.py3.txt
2026-03-09 19:50:36 -04:00
f5c09d873e Pin setuptools<81 — version 82 removed pkg_resources
Pyramid imports pkg_resources which was removed in setuptools 82.
Pin across requirements, Makefile, and CI scripts.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 12:19:33 -05:00
8d64fa11e4 Add setuptools to requirements for Python 3.12+ compatibility
pkg_resources (used for theme entry point loading) lives in
setuptools, which Python 3.12+ no longer bundles in venvs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 11:57:26 -05:00
cc968f6c5f Enable remarkbox-theme-meta dependency for deployment 2026-01-29 09:16:15 -05:00
a83a85a8a9 remarkbox 0.0.11
modified:   requirements.py3.txt
	modified:   setup.py
2025-03-01 09:54:24 -05:00
313f9175c5 sunset miscutils
modified:   remarkbox/__init__.py
	modified:   remarkbox/lib/mail.py
	modified:   remarkbox/lib/render.py
	new file:   remarkbox/lib/sanitize_html.py
	modified:   remarkbox/models/user.py
	modified:   remarkbox/scripts/json_import.py
	modified:   requirements.py3.txt
	modified:   requirements.txt
2022-08-01 11:14:10 -04:00
d7f8039778 switch to gitlab served themes.
modified:   requirements.py3.txt
2022-08-01 10:34:27 -04:00
925d30e7f6 modified: requirements.py3.txt 2022-06-01 19:16:22 -04:00
91a2a77711 time to open sause & place into public domain!
Merry Christmas!

I AM READY

I love you all!

	new file:   .gitignore
	new file:   MANIFEST.in
	new file:   Makefile
	new file:   README.rst
	new file:   development.ini
	new file:   index.html
	new file:   index2.html
	new file:   journal.rst
	new file:   readme-postgres-notes.rst
	new file:   readme-themes.rst
	new file:   remarkbox/__init__.py
	new file:   remarkbox/lib/__init__.py
	new file:   remarkbox/lib/mail.py
	new file:   remarkbox/lib/mail_messages.py
	new file:   remarkbox/lib/notify.py
	new file:   remarkbox/lib/render.py
	new file:   remarkbox/lib/svgtar/__init__.py
	new file:   remarkbox/lib/svgtar/svg.py
	new file:   remarkbox/models/__init__.py
	new file:   remarkbox/models/event.py
	new file:   remarkbox/models/meta.py
	new file:   remarkbox/models/namespace.py
	new file:   remarkbox/models/namespace_request.py
	new file:   remarkbox/models/namespace_user.py
	new file:   remarkbox/models/node.py
	new file:   remarkbox/models/node_cache.py
	new file:   remarkbox/models/notification.py
	new file:   remarkbox/models/oauth.py
	new file:   remarkbox/models/pay_what_you_can.py
	new file:   remarkbox/models/uri.py
	new file:   remarkbox/models/user.py
	new file:   remarkbox/models/vote.py
	new file:   remarkbox/models/watcher.py
	new file:   remarkbox/routes.py
	new file:   remarkbox/scripts/__init__.py
	new file:   remarkbox/scripts/alembic/README
	new file:   remarkbox/scripts/alembic/env.py
	new file:   remarkbox/scripts/alembic/script.py.mako
	new file:   remarkbox/scripts/alembic/versions/00211ed642cc_add_ip_address_column_to_rb_node.py
	new file:   remarkbox/scripts/alembic/versions/0208c10ea67f_create_new_node_cache_table.py
	new file:   remarkbox/scripts/alembic/versions/04e52337756e_autogenerated_indicies.py
	new file:   remarkbox/scripts/alembic/versions/051f8b810f26_namespace_ignore_query_string.py
	new file:   remarkbox/scripts/alembic/versions/1040ee4836af_namespace_description.py
	new file:   remarkbox/scripts/alembic/versions/184a349cd589_uri_accessed_timestamp.py
	new file:   remarkbox/scripts/alembic/versions/256468780798_root_nodes_to_namespace_.py
	new file:   remarkbox/scripts/alembic/versions/2e00b92495e4_node_disabled_timestamp.py
	new file:   remarkbox/scripts/alembic/versions/3ee195d142fb_add_subscription_type_to_namespace.py
	new file:   remarkbox/scripts/alembic/versions/40ded1163f95_add_user_surrogate_columns.py
	new file:   remarkbox/scripts/alembic/versions/43c1e5a99d4e_new_namespace_column_3.py
	new file:   remarkbox/scripts/alembic/versions/4aeda8e797ab_new_namespace_column_for_stylesheet_uris.py
	new file:   remarkbox/scripts/alembic/versions/503a2cef2378_root_stats.py
	new file:   remarkbox/scripts/alembic/versions/591800942adf_node_data_html_column.py
	new file:   remarkbox/scripts/alembic/versions/59592cf325fb_stylesheet_timestamp.py
	new file:   remarkbox/scripts/alembic/versions/5a5d0b68db78_add_root_id_field.py
	new file:   remarkbox/scripts/alembic/versions/6a440d3921d2_added_email_id_column_to_user_table.py
	new file:   remarkbox/scripts/alembic/versions/6bbc92ccc112_add_changed_column_to_node_table.py
	new file:   remarkbox/scripts/alembic/versions/6db39621f46c_namespace_group_conversations.py
	new file:   remarkbox/scripts/alembic/versions/6fc1d0cf350c_notification_columns_to_rb_user_table.py
	new file:   remarkbox/scripts/alembic/versions/76deff88cfd6_create_graph_depth_column_on_node_model.py
	new file:   remarkbox/scripts/alembic/versions/771ef7c868de_added_created_timestamp_column_to_.py
	new file:   remarkbox/scripts/alembic/versions/7a3a4755b4a8_add_hide_unless_approved_column.py
	new file:   remarkbox/scripts/alembic/versions/87fbd2b4e06e_namespace_theme_embed_column.py
	new file:   remarkbox/scripts/alembic/versions/953d42406dbb_namespace_public_column.py
	new file:   remarkbox/scripts/alembic/versions/98a90d2add21_namespace_model.py
	new file:   remarkbox/scripts/alembic/versions/98ced5f6ff36_stripe_id_for_user.py
	new file:   remarkbox/scripts/alembic/versions/a26302bcfa25_add_created_timestamp_column_to_oauth_.py
	new file:   remarkbox/scripts/alembic/versions/a38c12eeff2d_locked_rb_node.py
	new file:   remarkbox/scripts/alembic/versions/a738d6859f18_new_namespace_columns_2.py
	new file:   remarkbox/scripts/alembic/versions/aa2dfb4decda_hide_powered_by_column.py
	new file:   remarkbox/scripts/alembic/versions/b132ec968f0c_pay_what_you_can_table.py
	new file:   remarkbox/scripts/alembic/versions/ba8e83a3b8fd_namespace_stylesheet_embed_column.py
	new file:   remarkbox/scripts/alembic/versions/c9793937e756_make_all_verified_namespace_request_.py
	new file:   remarkbox/scripts/alembic/versions/c97ddfcbc406_approve_column.py
	new file:   remarkbox/scripts/alembic/versions/cbdf3cd4ccba_avatar_size_in_namespace.py
	new file:   remarkbox/scripts/alembic/versions/d1a0ab4f617f_add_has_uri_to_node.py
	new file:   remarkbox/scripts/alembic/versions/f5f88293428a_add_mathjax_column_to_rb_namespace.py
	new file:   remarkbox/scripts/alembic/versions/f7b42b2024fb_namespace_reverse_node_order.py
	new file:   remarkbox/scripts/alembic/versions/fa8402aa1a00_add_link_protection_column_to_namespace.py
	new file:   remarkbox/scripts/dump_sqlite3_to_csv.sh
	new file:   remarkbox/scripts/init_db.py
	new file:   remarkbox/scripts/invalidate_node_cache.py
	new file:   remarkbox/scripts/json_import.py
	new file:   remarkbox/scripts/load_csv_into_postgres.sh
	new file:   remarkbox/scripts/merge_dupes.py
	new file:   remarkbox/scripts/modify_namespace.py
	new file:   remarkbox/scripts/modify_node.py
	new file:   remarkbox/scripts/modify_uris.py
	new file:   remarkbox/scripts/modify_user.py
	new file:   remarkbox/scripts/recompute_node_depths.py
	new file:   remarkbox/scripts/safe_approve_all_nodes.py
	new file:   remarkbox/scripts/send_node_digest_notifications.py
	new file:   remarkbox/static/css/common.css
	new file:   remarkbox/static/css/embed.css
	new file:   remarkbox/static/css/pygments.css
	new file:   remarkbox/static/favicon.ico
	new file:   remarkbox/static/img/remarkbox-logo.png
	new file:   remarkbox/static/img/remarkbox-minified.png
	new file:   remarkbox/static/js/custom.js
	new file:   remarkbox/static/js/iframe-resizer/ie8.polyfils.map
	new file:   remarkbox/static/js/iframe-resizer/ie8.polyfils.min.js
	new file:   remarkbox/static/js/iframe-resizer/iframeResizer.contentWindow.js
	new file:   remarkbox/static/js/iframe-resizer/iframeResizer.contentWindow.map
	new file:   remarkbox/static/js/iframe-resizer/iframeResizer.contentWindow.min.js
	new file:   remarkbox/static/js/iframe-resizer/iframeResizer.js
	new file:   remarkbox/static/js/iframe-resizer/iframeResizer.map
	new file:   remarkbox/static/js/iframe-resizer/iframeResizer.min.js
	new file:   remarkbox/static/js/iframe-resizer/index.js
	new file:   remarkbox/static/js/iframe-resizer/readme.rst
	new file:   remarkbox/static/js/jquery-2.1.3.min.js
	new file:   remarkbox/static/theme/readme.rst
	new file:   remarkbox/templates/base.j2
	new file:   remarkbox/templates/billing.j2
	new file:   remarkbox/templates/dynamic-remarkbox.css.j2
	new file:   remarkbox/templates/edit-node.j2
	new file:   remarkbox/templates/embed-iframe.txt.j2
	new file:   remarkbox/templates/home.j2
	new file:   remarkbox/templates/join-or-log-in.j2
	new file:   remarkbox/templates/list-namespace-owners.j2
	new file:   remarkbox/templates/list-namespace-requests.j2
	new file:   remarkbox/templates/list-nodes.j2
	new file:   remarkbox/templates/list-notifications.j2
	new file:   remarkbox/templates/mail_digest_html.j2
	new file:   remarkbox/templates/mail_digest_text.j2
	new file:   remarkbox/templates/mail_immediate_html.j2
	new file:   remarkbox/templates/mail_immediate_text.j2
	new file:   remarkbox/templates/mail_snippet_html.j2
	new file:   remarkbox/templates/mail_snippet_text.j2
	new file:   remarkbox/templates/namespace-settings.j2
	new file:   remarkbox/templates/new.j2
	new file:   remarkbox/templates/rss.xml.j2
	new file:   remarkbox/templates/setup-namespace.j2
	new file:   remarkbox/templates/show-count.j2
	new file:   remarkbox/templates/show-node.j2
	new file:   remarkbox/templates/show-node2.j2
	new file:   remarkbox/templates/sitemap.xml.j2
	new file:   remarkbox/templates/snippets/add-to-slack.j2
	new file:   remarkbox/templates/snippets/create.j2
	new file:   remarkbox/templates/snippets/csrf.j2
	new file:   remarkbox/templates/snippets/email.j2
	new file:   remarkbox/templates/snippets/flash-alerts.j2
	new file:   remarkbox/templates/snippets/forms.j2
	new file:   remarkbox/templates/snippets/google-analytics.j2
	new file:   remarkbox/templates/snippets/javascript-includes.j2
	new file:   remarkbox/templates/snippets/owner-key-comment.j2
	new file:   remarkbox/templates/snippets/phone-menu.j2
	new file:   remarkbox/templates/snippets/powered-by.j2
	new file:   remarkbox/templates/snippets/search.j2
	new file:   remarkbox/templates/snippets/snippets.j2
	new file:   remarkbox/templates/snippets/stripe.j2
	new file:   remarkbox/templates/snippets/stylesheet-includes.j2
	new file:   remarkbox/templates/snippets/submit.j2
	new file:   remarkbox/templates/update-card.j2
	new file:   remarkbox/templates/user-settings.j2
	new file:   remarkbox/templates/user-watching.j2
	new file:   remarkbox/tests/test_models.py
	new file:   remarkbox/tests/test_render.py
	new file:   remarkbox/tests/test_views.py
	new file:   remarkbox/views/__init__.py
	new file:   remarkbox/views/authenticated/__init__.py
	new file:   remarkbox/views/authenticated/authenticated.py
	new file:   remarkbox/views/authenticated/lock.py
	new file:   remarkbox/views/authenticated/notifications.py
	new file:   remarkbox/views/authenticated/oauth.py
	new file:   remarkbox/views/authenticated/stripe.py
	new file:   remarkbox/views/authenticated/topsecret.py
	new file:   remarkbox/views/authenticated/watch.py
	new file:   remarkbox/views/authentication.py
	new file:   remarkbox/views/list_nodes.py
	new file:   remarkbox/views/misc.py
	new file:   remarkbox/views/modify_node.py
	new file:   remarkbox/views/new_thread.py
	new file:   remarkbox/views/reply_node.py
	new file:   requirements-dev.txt
	new file:   requirements-prod.txt
	new file:   requirements-test.txt
	new file:   requirements.py3.txt
	new file:   requirements.txt
	new file:   setup.py
	new file:   test.ini
2021-12-26 07:44:05 -05:00