supernote 0.24.0__tar.gz → 0.26.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {supernote-0.24.0 → supernote-0.26.0}/LICENSE +1 -1
- supernote-0.26.0/NOTICE +7 -0
- supernote-0.26.0/PKG-INFO +414 -0
- supernote-0.26.0/README.md +360 -0
- {supernote-0.24.0 → supernote-0.26.0}/pyproject.toml +30 -9
- {supernote-0.24.0 → supernote-0.26.0}/supernote/__init__.py +3 -0
- supernote-0.26.0/supernote/alembic/versions/d5e6f7a8b9c0_reset_legacy_default_user_quota.py +41 -0
- supernote-0.26.0/supernote/alembic/versions/e6f7a8b9c0d1_add_note_and_page_metadata_tables.py +99 -0
- supernote-0.26.0/supernote/alembic/versions/e8f9a0b1c2d3_add_api_keys_table.py +45 -0
- supernote-0.26.0/supernote/alembic/versions/f2a3b4c5d6e7_add_user_event_log_table.py +53 -0
- supernote-0.26.0/supernote/alembic/versions/f3b4c5d6e7f8_migrate_generated_summaries_to_ai_category.py +365 -0
- supernote-0.26.0/supernote/cli/__init__.py +18 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/cli/admin.py +130 -52
- {supernote-0.24.0 → supernote-0.26.0}/supernote/cli/client.py +299 -36
- {supernote-0.24.0 → supernote-0.26.0}/supernote/cli/main.py +8 -1
- {supernote-0.24.0 → supernote-0.26.0}/supernote/cli/notebook.py +198 -4
- {supernote-0.24.0 → supernote-0.26.0}/supernote/cli/server.py +20 -7
- supernote-0.26.0/supernote/client/__init__.py +336 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/client/admin.py +21 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/client/api.py +20 -6
- {supernote-0.24.0 → supernote-0.26.0}/supernote/client/auth.py +18 -4
- {supernote-0.24.0 → supernote-0.26.0}/supernote/client/client.py +63 -12
- {supernote-0.24.0 → supernote-0.26.0}/supernote/client/device.py +10 -0
- supernote-0.26.0/supernote/client/events.py +96 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/client/exceptions.py +9 -1
- {supernote-0.24.0 → supernote-0.26.0}/supernote/client/extended.py +54 -1
- {supernote-0.24.0 → supernote-0.26.0}/supernote/client/hashing.py +0 -3
- {supernote-0.24.0 → supernote-0.26.0}/supernote/client/login_client.py +8 -5
- {supernote-0.24.0 → supernote-0.26.0}/supernote/client/schedule.py +9 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/client/socket.py +8 -1
- {supernote-0.24.0 → supernote-0.26.0}/supernote/client/summary.py +8 -1
- {supernote-0.24.0 → supernote-0.26.0}/supernote/client/web.py +10 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/models/__init__.py +5 -1
- {supernote-0.24.0 → supernote-0.26.0}/supernote/models/base.py +8 -1
- supernote-0.26.0/supernote/models/events.py +174 -0
- supernote-0.26.0/supernote/models/extended.py +429 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/models/file_common.py +8 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/models/file_device.py +10 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/models/file_web.py +10 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/models/socket.py +8 -1
- {supernote-0.24.0 → supernote-0.26.0}/supernote/models/user.py +18 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/models/webhook.py +5 -3
- {supernote-0.24.0 → supernote-0.26.0}/supernote/notebook/__init__.py +4 -1
- supernote-0.26.0/supernote/notebook/author.py +1189 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/notebook/color.py +7 -1
- {supernote-0.24.0 → supernote-0.26.0}/supernote/notebook/converter.py +96 -123
- {supernote-0.24.0 → supernote-0.26.0}/supernote/notebook/decoder.py +56 -34
- supernote-0.26.0/supernote/notebook/encoder.py +301 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/notebook/exceptions.py +7 -1
- supernote-0.26.0/supernote/notebook/fileformat.py +1061 -0
- supernote-0.26.0/supernote/notebook/manipulator.py +464 -0
- supernote-0.26.0/supernote/notebook/parser.py +450 -0
- supernote-0.26.0/supernote/notebook/renderer.py +2538 -0
- supernote-0.26.0/supernote/notebook/resources/fonts/ArchitectsDaughter-Regular.ttf +0 -0
- supernote-0.26.0/supernote/notebook/resources/fonts/Caveat-Variable.ttf +0 -0
- supernote-0.26.0/supernote/notebook/resources/fonts/InstrumentSerif-Italic.ttf +0 -0
- supernote-0.26.0/supernote/notebook/resources/fonts/InstrumentSerif-Regular.ttf +0 -0
- supernote-0.26.0/supernote/notebook/resources/fonts/Karla-Variable.ttf +0 -0
- supernote-0.26.0/supernote/notebook/resources/fonts/OFL-ArchitectsDaughter.txt +93 -0
- supernote-0.26.0/supernote/notebook/resources/fonts/OFL-Caveat.txt +93 -0
- supernote-0.26.0/supernote/notebook/resources/fonts/OFL-InstrumentSerif.txt +93 -0
- supernote-0.26.0/supernote/notebook/resources/fonts/OFL-Karla.txt +93 -0
- supernote-0.26.0/supernote/notebook/resources/fonts/OFL-SpaceMono.txt +93 -0
- supernote-0.26.0/supernote/notebook/resources/fonts/SpaceMono-Bold.ttf +0 -0
- supernote-0.26.0/supernote/notebook/resources/fonts/SpaceMono-Regular.ttf +0 -0
- supernote-0.26.0/supernote/notebook/schema.py +2080 -0
- supernote-0.26.0/supernote/notebook/utils.py +66 -0
- supernote-0.26.0/supernote/server/__init__.py +21 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/ai/__init__.py +1 -0
- supernote-0.26.0/supernote/server/ai/eval.py +1200 -0
- supernote-0.26.0/supernote/server/ai/models/__init__.py +28 -0
- supernote-0.26.0/supernote/server/ai/models/apple/__init__.py +11 -0
- supernote-0.26.0/supernote/server/ai/models/apple/backend.py +165 -0
- supernote-0.26.0/supernote/server/ai/models/apple/ocr.py +75 -0
- supernote-0.26.0/supernote/server/ai/models/embedding.py +209 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/ai/models/fake/embedding.py +18 -4
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/ai/models/fake/ocr.py +14 -2
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/ai/models/fake/summary.py +10 -1
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/ai/models/gemini/backend.py +72 -28
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/ai/models/gemini/embedding.py +17 -5
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/ai/models/gemini/ocr.py +8 -2
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/ai/models/gemini/summary.py +8 -2
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/ai/models/ocr.py +61 -7
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/ai/models/openai/backend.py +65 -17
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/ai/models/openai/embedding.py +16 -5
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/ai/models/openai/ocr.py +8 -2
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/ai/models/openai/summary.py +8 -2
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/ai/models/summary.py +52 -7
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/ai/prompts.py +24 -4
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/app.py +207 -76
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/config.py +137 -8
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/constants.py +7 -1
- supernote-0.26.0/supernote/server/db/__init__.py +16 -0
- supernote-0.26.0/supernote/server/db/base.py +11 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/db/migrations.py +7 -0
- supernote-0.26.0/supernote/server/db/models/__init__.py +43 -0
- supernote-0.26.0/supernote/server/db/models/api_key.py +38 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/db/models/device.py +7 -0
- supernote-0.26.0/supernote/server/db/models/event_log.py +61 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/db/models/file.py +9 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/db/models/kv.py +7 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/db/models/login_record.py +6 -0
- supernote-0.26.0/supernote/server/db/models/note_processing.py +286 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/db/models/schedule.py +9 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/db/models/summary.py +9 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/db/models/user.py +14 -3
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/db/session.py +44 -23
- supernote-0.26.0/supernote/server/events.py +492 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/exceptions.py +25 -1
- supernote-0.26.0/supernote/server/keys.py +72 -0
- supernote-0.26.0/supernote/server/mcp/__init__.py +10 -0
- supernote-0.26.0/supernote/server/mcp/auth.py +472 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/mcp/models.py +59 -3
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/mcp/server.py +91 -15
- supernote-0.26.0/supernote/server/metrics.py +615 -0
- supernote-0.26.0/supernote/server/resources/__init__.py +1 -0
- supernote-0.26.0/supernote/server/resources/prompts/__init__.py +1 -0
- supernote-0.26.0/supernote/server/routes/__init__.py +26 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/routes/admin.py +70 -16
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/routes/auth.py +58 -32
- supernote-0.26.0/supernote/server/routes/decorators.py +27 -0
- supernote-0.26.0/supernote/server/routes/events.py +73 -0
- supernote-0.26.0/supernote/server/routes/extended.py +475 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/routes/file_device.py +85 -43
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/routes/file_web.py +59 -54
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/routes/oss.py +63 -18
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/routes/schedule.py +56 -43
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/routes/summary.py +49 -35
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/routes/system.py +10 -1
- supernote-0.26.0/supernote/server/services/__init__.py +45 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/services/blob.py +105 -15
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/services/conversion.py +30 -6
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/services/coordination.py +10 -3
- supernote-0.26.0/supernote/server/services/event_log.py +327 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/services/file.py +318 -120
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/services/ical_export.py +11 -1
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/services/integrity.py +15 -1
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/services/processor.py +437 -88
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/services/processor_modules/__init__.py +39 -3
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/services/processor_modules/embedding.py +17 -1
- supernote-0.26.0/supernote/server/services/processor_modules/ocr.py +218 -0
- supernote-0.26.0/supernote/server/services/processor_modules/page_hashing.py +507 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/services/processor_modules/png_conversion.py +35 -0
- supernote-0.26.0/supernote/server/services/processor_modules/summary.py +492 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/services/schedule.py +115 -4
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/services/search.py +100 -23
- supernote-0.26.0/supernote/server/services/storage_metrics.py +108 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/services/summary.py +54 -18
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/services/user.py +212 -3
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/services/vfs.py +126 -38
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/services/webhook.py +7 -6
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/socket.py +36 -2
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/socket_auth.py +8 -2
- supernote-0.26.0/supernote/server/static/favicon.ico +0 -0
- supernote-0.26.0/supernote/server/static/index.html +230 -0
- supernote-0.26.0/supernote/server/static/js/api/client.js +732 -0
- supernote-0.26.0/supernote/server/static/js/api/http.js +161 -0
- supernote-0.26.0/supernote/server/static/js/api/schedule.js +194 -0
- supernote-0.26.0/supernote/server/static/js/components/FileBrowserPanel.js +808 -0
- supernote-0.26.0/supernote/server/static/js/components/FileCard.js +373 -0
- supernote-0.26.0/supernote/server/static/js/components/FileViewer.js +652 -0
- supernote-0.26.0/supernote/server/static/js/components/LoginCard.js +83 -0
- supernote-0.26.0/supernote/server/static/js/components/MoveModal.js +281 -0
- supernote-0.26.0/supernote/server/static/js/components/OAuthConsentCard.js +193 -0
- supernote-0.26.0/supernote/server/static/js/components/RenameModal.js +75 -0
- supernote-0.26.0/supernote/server/static/js/components/SearchModal.js +266 -0
- supernote-0.26.0/supernote/server/static/js/components/SystemPanel.js +308 -0
- supernote-0.26.0/supernote/server/static/js/components/TaskPanel.js +500 -0
- supernote-0.26.0/supernote/server/static/js/components/tasks/TaskEditorModal.js +211 -0
- supernote-0.26.0/supernote/server/static/js/components/tasks/TaskIcsModal.js +192 -0
- supernote-0.26.0/supernote/server/static/js/components/tasks/TaskRow.js +168 -0
- supernote-0.26.0/supernote/server/static/js/components/tasks/TaskSidebar.js +168 -0
- supernote-0.26.0/supernote/server/static/js/components/viewer/ViewerMediaPreview.js +94 -0
- supernote-0.26.0/supernote/server/static/js/components/viewer/ViewerSidePanel.js +359 -0
- supernote-0.26.0/supernote/server/static/js/components/viewer/ViewerToolbar.js +171 -0
- supernote-0.26.0/supernote/server/static/js/components/viewer/noteMeta.js +164 -0
- supernote-0.26.0/supernote/server/static/js/composables/useCanvasScrollSync.js +307 -0
- supernote-0.26.0/supernote/server/static/js/composables/useFileSystem.js +178 -0
- supernote-0.26.0/supernote/server/static/js/composables/useModalEscape.js +101 -0
- supernote-0.26.0/supernote/server/static/js/composables/useProcessingStatus.js +168 -0
- supernote-0.26.0/supernote/server/static/js/composables/useRouter.js +671 -0
- supernote-0.26.0/supernote/server/static/js/composables/useSchedule.js +285 -0
- supernote-0.26.0/supernote/server/static/js/composables/useToast.js +59 -0
- supernote-0.26.0/supernote/server/static/js/main.js +360 -0
- supernote-0.26.0/supernote/server/static/js/types.d.ts +384 -0
- supernote-0.26.0/supernote/server/static/js/utils/clipboard.js +51 -0
- supernote-0.26.0/supernote/server/static/js/utils/format.js +119 -0
- supernote-0.26.0/supernote/server/static/js/utils/markdown.js +61 -0
- supernote-0.26.0/supernote/server/static/js/utils/oauth.js +143 -0
- supernote-0.26.0/supernote/server/static/style.css +297 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/trace.py +107 -24
- supernote-0.26.0/supernote/server/utils/__init__.py +24 -0
- supernote-0.26.0/supernote/server/utils/auth_utils.py +41 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/utils/hashing.py +6 -1
- supernote-0.26.0/supernote/server/utils/note_content.py +144 -0
- supernote-0.26.0/supernote/server/utils/paths.py +133 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/utils/prompt_loader.py +19 -0
- supernote-0.26.0/supernote/server/utils/rapid_log.py +306 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/utils/rate_limit.py +7 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/utils/tasks.py +7 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/utils/unique_id.py +6 -1
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/utils/url_signer.py +25 -36
- supernote-0.26.0/supernote/testing/notebook_fixtures.py +224 -0
- supernote-0.26.0/supernote.egg-info/PKG-INFO +414 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote.egg-info/SOURCES.txt +60 -3
- {supernote-0.24.0 → supernote-0.26.0}/supernote.egg-info/requires.txt +8 -2
- {supernote-0.24.0 → supernote-0.26.0}/tests/test_init.py +28 -3
- supernote-0.24.0/PKG-INFO +0 -348
- supernote-0.24.0/README.md +0 -305
- supernote-0.24.0/supernote/cli/__init__.py +0 -1
- supernote-0.24.0/supernote/client/__init__.py +0 -44
- supernote-0.24.0/supernote/models/extended.py +0 -202
- supernote-0.24.0/supernote/notebook/fileformat.py +0 -478
- supernote-0.24.0/supernote/notebook/manipulator.py +0 -420
- supernote-0.24.0/supernote/notebook/parser.py +0 -769
- supernote-0.24.0/supernote/notebook/utils.py +0 -49
- supernote-0.24.0/supernote/server/__init__.py +0 -12
- supernote-0.24.0/supernote/server/ai/models/__init__.py +0 -27
- supernote-0.24.0/supernote/server/ai/models/embedding.py +0 -126
- supernote-0.24.0/supernote/server/db/__init__.py +0 -9
- supernote-0.24.0/supernote/server/db/base.py +0 -8
- supernote-0.24.0/supernote/server/db/models/__init__.py +0 -23
- supernote-0.24.0/supernote/server/db/models/note_processing.py +0 -102
- supernote-0.24.0/supernote/server/events.py +0 -210
- supernote-0.24.0/supernote/server/mcp/__init__.py +0 -1
- supernote-0.24.0/supernote/server/mcp/auth.py +0 -328
- supernote-0.24.0/supernote/server/metrics.py +0 -86
- supernote-0.24.0/supernote/server/routes/decorators.py +0 -13
- supernote-0.24.0/supernote/server/routes/extended.py +0 -287
- supernote-0.24.0/supernote/server/services/__init__.py +0 -16
- supernote-0.24.0/supernote/server/services/processor_modules/ocr.py +0 -122
- supernote-0.24.0/supernote/server/services/processor_modules/page_hashing.py +0 -221
- supernote-0.24.0/supernote/server/services/processor_modules/summary.py +0 -292
- supernote-0.24.0/supernote/server/static/favicon.ico +0 -0
- supernote-0.24.0/supernote/server/static/index.html +0 -248
- supernote-0.24.0/supernote/server/static/js/api/client.js +0 -787
- supernote-0.24.0/supernote/server/static/js/api/schedule.js +0 -232
- supernote-0.24.0/supernote/server/static/js/components/DashboardView.js +0 -51
- supernote-0.24.0/supernote/server/static/js/components/FileCard.js +0 -163
- supernote-0.24.0/supernote/server/static/js/components/FileViewer.js +0 -461
- supernote-0.24.0/supernote/server/static/js/components/LoginCard.js +0 -64
- supernote-0.24.0/supernote/server/static/js/components/MoveModal.js +0 -213
- supernote-0.24.0/supernote/server/static/js/components/RenameModal.js +0 -39
- supernote-0.24.0/supernote/server/static/js/components/SearchModal.js +0 -170
- supernote-0.24.0/supernote/server/static/js/components/Sidebar.js +0 -114
- supernote-0.24.0/supernote/server/static/js/components/SummaryPanel.js +0 -101
- supernote-0.24.0/supernote/server/static/js/components/SystemPanel.js +0 -158
- supernote-0.24.0/supernote/server/static/js/components/TaskPanel.js +0 -667
- supernote-0.24.0/supernote/server/static/js/composables/useFileSystem.js +0 -124
- supernote-0.24.0/supernote/server/static/js/composables/useSchedule.js +0 -218
- supernote-0.24.0/supernote/server/static/js/composables/useToast.js +0 -31
- supernote-0.24.0/supernote/server/static/js/main.js +0 -708
- supernote-0.24.0/supernote/server/static/style.css +0 -80
- supernote-0.24.0/supernote/server/utils/auth_utils.py +0 -23
- supernote-0.24.0/supernote/server/utils/note_content.py +0 -75
- supernote-0.24.0/supernote/server/utils/paths.py +0 -86
- supernote-0.24.0/supernote.egg-info/PKG-INFO +0 -348
- {supernote-0.24.0 → supernote-0.26.0}/setup.cfg +0 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/alembic/__init__.py +0 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/alembic/env.py +0 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/alembic/script.py.mako +0 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/alembic/versions/0543a383957b_initial_schema.py +0 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/alembic/versions/68964804740d_prevent_user_id_reuse.py +0 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/alembic/versions/7a8291f043bc_add_links_and_sort_fields_to_schedule_task.py +0 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/alembic/versions/a2b3c4d5e6f7_scope_summary_unique_identifier_by_user.py +0 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/alembic/versions/b7397248a96b_merge_mixed_case_system_roots.py +0 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/alembic/versions/b8e9c0d1e2f3_backfill_summary_md5_and_timestamps.py +0 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/alembic/versions/c1d2e3f4a5b6_add_embedding_model_to_note_page_content.py +0 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/alembic/versions/c3d4e5f6a7b8_seed_sync_initialized_for_existing_users.py +0 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/alembic/versions/d1e2f3a4b5c6_add_client_task_ids.py +0 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/alembic/versions/d4e5f6a7b8c9_unify_schedule_ids_as_string.py +0 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/alembic/versions/e7f8a9b0c1d2_add_update_time_to_schedule_task_group.py +0 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/alembic/versions/f1a2b3c4d5e6_make_schedule_task_list_id_nullable.py +0 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/alembic.ini +0 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/models/auth.py +0 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/models/equipment.py +0 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/models/schedule.py +0 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/models/summary.py +0 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/models/system.py +0 -0
- {supernote-0.24.0/supernote/server → supernote-0.26.0/supernote/notebook}/resources/__init__.py +0 -0
- {supernote-0.24.0/supernote/server/resources/prompts → supernote-0.26.0/supernote/notebook/resources/fonts}/__init__.py +0 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/py.typed +0 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/ai/base.py +0 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/ai/models/fake/__init__.py +0 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/ai/models/gemini/__init__.py +0 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/ai/models/openai/__init__.py +0 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/resources/prompts/ocr/common/context.md +0 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/resources/prompts/ocr/common/legend.md +0 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/resources/prompts/ocr/daily/prompt.md +0 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/resources/prompts/ocr/default/system.md +0 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/resources/prompts/ocr/monthly/prompt.md +0 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/resources/prompts/ocr/weekly/prompt.md +0 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/resources/prompts/summary/common/instruction.md +0 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/resources/prompts/summary/daily/prompt.md +0 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/resources/prompts/summary/default/prompt.md +0 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/resources/prompts/summary/monthly/prompt.md +0 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/server/resources/prompts/summary/weekly/prompt.md +0 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/testing/__init__.py +0 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote/testing/server_runner.py +0 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote.egg-info/dependency_links.txt +0 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote.egg-info/entry_points.txt +0 -0
- {supernote-0.24.0 → supernote-0.26.0}/supernote.egg-info/top_level.txt +0 -0
|
@@ -186,7 +186,7 @@
|
|
|
186
186
|
same "printed page" as the copyright notice for easier
|
|
187
187
|
identification within third-party archives.
|
|
188
188
|
|
|
189
|
-
Copyright
|
|
189
|
+
Copyright 2026 Allen Porter
|
|
190
190
|
|
|
191
191
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
192
|
you may not use this file except in compliance with the License.
|
supernote-0.26.0/NOTICE
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Open Private Cloud for Supernote
|
|
2
|
+
Copyright 2026 Allen Porter
|
|
3
|
+
|
|
4
|
+
This product includes software originally developed as part of supernote-tool
|
|
5
|
+
(https://github.com/jya-dev/supernote-tool):
|
|
6
|
+
Copyright (c) 2020-2021 jya
|
|
7
|
+
Licensed under the Apache License, Version 2.0.
|
|
@@ -0,0 +1,414 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: supernote
|
|
3
|
+
Version: 0.26.0
|
|
4
|
+
Summary: Unofficial Python toolkit for Ratta Supernote: parse and author .note files, self-host a lightweight SQLite private cloud, and run optional AI synthesis
|
|
5
|
+
Author-email: Allen Porter <allen.porter@gmail.com>
|
|
6
|
+
License-Expression: Apache-2.0
|
|
7
|
+
Project-URL: Source, https://github.com/allenporter/supernote
|
|
8
|
+
Classifier: Development Status :: 4 - Beta
|
|
9
|
+
Classifier: Intended Audience :: Developers
|
|
10
|
+
Classifier: Intended Audience :: System Administrators
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
13
|
+
Classifier: Topic :: Office/Business
|
|
14
|
+
Classifier: Topic :: System :: Archiving :: Mirroring
|
|
15
|
+
Requires-Python: >=3.13
|
|
16
|
+
Description-Content-Type: text/markdown
|
|
17
|
+
License-File: LICENSE
|
|
18
|
+
License-File: NOTICE
|
|
19
|
+
Requires-Dist: colour>=0.1.5
|
|
20
|
+
Requires-Dist: numpy>=1.19.0
|
|
21
|
+
Requires-Dist: Pillow>=7.2.0
|
|
22
|
+
Requires-Dist: potracer>=0.0.1
|
|
23
|
+
Requires-Dist: reportlab>=3.6.1
|
|
24
|
+
Requires-Dist: svgwrite>=1.4
|
|
25
|
+
Provides-Extra: client
|
|
26
|
+
Requires-Dist: aiohttp; extra == "client"
|
|
27
|
+
Requires-Dist: mashumaro>=3.17; extra == "client"
|
|
28
|
+
Requires-Dist: python-socketio>=5.11.0; extra == "client"
|
|
29
|
+
Requires-Dist: requests; extra == "client"
|
|
30
|
+
Requires-Dist: tqdm; extra == "client"
|
|
31
|
+
Provides-Extra: server
|
|
32
|
+
Requires-Dist: aiohttp>=3.14.0; extra == "server"
|
|
33
|
+
Requires-Dist: mashumaro>=3.17; extra == "server"
|
|
34
|
+
Requires-Dist: pyyaml>=6.0; extra == "server"
|
|
35
|
+
Requires-Dist: PyJWT>=2.10.1; extra == "server"
|
|
36
|
+
Requires-Dist: SQLAlchemy[asyncio]>=2.0.0; extra == "server"
|
|
37
|
+
Requires-Dist: alembic>=1.13.0; extra == "server"
|
|
38
|
+
Requires-Dist: aiosqlite>=0.19.0; extra == "server"
|
|
39
|
+
Requires-Dist: aiofiles>=25.1.0; extra == "server"
|
|
40
|
+
Requires-Dist: aiohttp-remotes>=1.3.0; extra == "server"
|
|
41
|
+
Requires-Dist: google-genai>=1.57.0; extra == "server"
|
|
42
|
+
Requires-Dist: httpx2>=2.0.0; extra == "server"
|
|
43
|
+
Requires-Dist: mcp>=2.2.0; extra == "server"
|
|
44
|
+
Requires-Dist: aiohttp-asgi>=0.6.1; extra == "server"
|
|
45
|
+
Requires-Dist: starlette>=0.35.0; extra == "server"
|
|
46
|
+
Requires-Dist: prometheus-client>=0.20.0; extra == "server"
|
|
47
|
+
Requires-Dist: python-socketio>=5.11.0; extra == "server"
|
|
48
|
+
Requires-Dist: ical>=8.0.0; extra == "server"
|
|
49
|
+
Provides-Extra: apple
|
|
50
|
+
Requires-Dist: pyobjc-framework-Vision>=10.0; sys_platform == "darwin" and extra == "apple"
|
|
51
|
+
Provides-Extra: all
|
|
52
|
+
Requires-Dist: supernote[client,server]; extra == "all"
|
|
53
|
+
Dynamic: license-file
|
|
54
|
+
|
|
55
|
+
# Open Private Cloud for Supernote
|
|
56
|
+
|
|
57
|
+
**A lightweight, self-hosted Python private cloud server, binary `.note` parser & authoring library, and optional AI intelligence layer for your Ratta Supernote.**
|
|
58
|
+
|
|
59
|
+
<p align="center">
|
|
60
|
+
<img src="docs/static-assets/hero-overview.jpg" alt="Supernote Overview" width="800">
|
|
61
|
+
</p>
|
|
62
|
+
|
|
63
|
+
[](https://github.com/allenporter/supernote)
|
|
64
|
+
[](https://allenporter.github.io/supernote/)
|
|
65
|
+
[](https://github.com/allenporter/supernote/blob/main/LICENSE)
|
|
66
|
+
|
|
67
|
+
> **Unofficial Community Project:** We love [Ratta](https://supernote.com/)'s products and built this toolkit to support the Supernote community. It is an independent, open-source project and is not affiliated with, endorsed by, or sponsored by Shanghai Ratta Smart Technology Co., Ltd. *Supernote* and *Ratta* are trademarks of Shanghai Ratta Smart Technology Co., Ltd.
|
|
68
|
+
|
|
69
|
+
`supernote` is an open-source Python toolkit for Supernote hardware (Nomad, A5 X2 Manta, A5 X, A6 X) built around three core components:
|
|
70
|
+
1. **A Lightweight Private Cloud Server (`supernote.server`)**: A single-process `asyncio` + SQLite server that implements **100% of the community [Supernote OpenAPI Specification](api-spec/openapi.yaml)** in ~135 MB of RAM (bare sync mode) or ~160 MB idle / ~310 MB peak when rendering and processing notebooks with the Web UI, [Model Context Protocol (MCP)](docs/mcp.md) server, and optional AI synthesis engine.
|
|
71
|
+
2. **A Standalone `.note` Parser, Converter & Authoring Library (`supernote.notebook`)**: Read binary `.note` and `.mark` files, export pages to PDF (with clickable links), PNG, vector SVG, or plain text, or author and append Bullet Journal spreads directly into `.note` files from Markdown.
|
|
72
|
+
3. **An Async Python Client SDK & CLI (`supernote.client`, `supernote.cli`)**: Automate file sync, task lists, semantic search, static Bearer API keys (`sn_...`), and real-time Socket.IO sync notifications from Python or the terminal.
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## Why Open Private Cloud for Supernote?
|
|
77
|
+
|
|
78
|
+
### Native Tablet Sync in ~135 MB of RAM (No Java, MariaDB, or Redis)
|
|
79
|
+
While the official Supernote Private Cloud stack orchestrates multi-container Java/Spring Boot, MariaDB, and Redis services (~2 GB+ RAM), Open Private Cloud runs in a single Python `asyncio` process backed by a single SQLite file and content-addressable blob storage. Point your tablet's native **Settings → Sync → Private Cloud** to your server and tap **Sync**—it runs effortlessly on a Raspberry Pi, NAS, or low-memory home lab server with two-tier volume and per-user storage quotas.
|
|
80
|
+
|
|
81
|
+
### Incremental Handwriting OCR, Summaries & Semantic Search
|
|
82
|
+
Handwriting recognition on e-ink hardware drains battery and struggles with dense cursive, diagrams, and Bullet Journal signifiers. When a notebook syncs to Open Private Cloud, a background pipeline hashes every page (`PageHashingModule`), skips unchanged and blank pages automatically, and processes only modified pages using Vision LLMs (**Google Gemini** `gemini-3.5-flash-lite` by default, or **local models via Ollama / vLLM / llama.cpp**):
|
|
83
|
+
- **High-Fidelity Transcripts**: Converts handwritten pages, tables, diagrams, and Bullet Journal Rapid Logging symbols (`•`, `X`, `>`, `<`, `-`, `*`, `~~strikethroughs~~`) into structured Markdown.
|
|
84
|
+
- **Executive Summaries**: Synthesizes multi-page notebooks into scannable summaries with key takeaways.
|
|
85
|
+
- **Concept Search**: Vectorizes content so you can search across years of handwritten notebooks by meaning (`"Where did I sketch the backyard drainage plan?"`), not just filenames.
|
|
86
|
+
|
|
87
|
+
### Built-In MCP Server & Static Bearer API Keys (`sn_...`)
|
|
88
|
+
Out of the box, the server hosts a spec-compliant **[Model Context Protocol (MCP)](docs/mcp.md)** server (`list_notebooks`, `search_notebook_chunks`, `get_notebook_transcript`) supporting both **Dynamic OAuth 2.1 (IndieAuth)** for interactive desktop agents (Claude Desktop, Cursor) and revocable **Static Bearer API Keys (`sn_...`)** for headless scripts and CLI automation.
|
|
89
|
+
|
|
90
|
+
### Filename & Page-Style Driven Custom AI Prompts
|
|
91
|
+
Drop custom Markdown prompt templates into your `prompts_dir` (`ocr/daily/prompt.md`, `summary/meeting_notes/prompt.md`, or `ocr/style_cornell/prompt.md`), and the server automatically routes matching notebooks (by filename stem or page stationery style) through your custom instructions while injecting native device page keywords (`PAGE_KEYWORDS`). See **[AI Pipeline, Custom Prompts & MCP Server](docs/mcp.md)** for full prompt routing details.
|
|
92
|
+
|
|
93
|
+
### Live Calendar Feeds (`.ics`), Webhooks & Prometheus/Grafana Observability
|
|
94
|
+
- **iCalendar (`VTODO`) Feeds**: Tasks created on your Supernote tablet are automatically exposed as an RFC 5545 `.ics` feed (`/api/schedule/feed.ics`) for Apple Reminders/Calendar, Google Calendar, Outlook, and **Home Assistant**.
|
|
95
|
+
- **Signed Outbound Webhooks**: Receive HMAC-SHA256 signed HTTP callbacks (`note.sync_completed`) the instant a notebook finishes syncing.
|
|
96
|
+
- **Production Monitoring**: Built-in `/metrics` endpoint with reference [Prometheus recording/alerting rules and a 13-panel Grafana dashboard](docs/monitoring.md).
|
|
97
|
+
|
|
98
|
+
### Offline Binary `.note` Parser, Converter & Cooperative Markdown Authoring
|
|
99
|
+
You don't need to run a server to use `supernote`. Use the CLI (`supernote analyze`, `supernote convert`, `supernote create`, `supernote merge`, `supernote reconstruct`) or `supernote.notebook` to export `.note` files to PDF/PNG/SVG, or programmatically generate and append stylized stationery templates, simulated handwriting, and hidden flashcard layers (`LAYER1`–`LAYER3`) onto `.note` files.
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## Documentation Map
|
|
104
|
+
|
|
105
|
+
| Guide / Reference | What You'll Learn |
|
|
106
|
+
| :--- | :--- |
|
|
107
|
+
| **[Self-Hosting & Quickstart Guide](docs/bootstrap_guide.md)** | Deploying via Python or Docker Compose, bootstrapping your Admin account, pairing your Supernote tablet, reverse proxies (Caddy/Nginx), and SQLite/blob backups. |
|
|
108
|
+
| **[Configuration Reference](docs/configuration.md)** | Complete reference for `config.yaml` and `SUPERNOTE_*` environment variables, storage quotas, Gemini, named local OpenAI-compatible servers (Ollama/vLLM), and macOS Vision. |
|
|
109
|
+
| **[AI Pipeline, Custom Prompts & MCP Server](docs/mcp.md)** | How the 5-stage OCR/Embedding/Summary pipeline works, routing custom prompts by filename or `page_style`, static API keys (`sn_...`), and connecting Claude or Cursor via MCP. |
|
|
110
|
+
| **[OCR Provider Benchmarks](evals/ocr/RESULTS.md)** | 30-page Supernote handwriting & Bullet Journal benchmark comparing Gemini 3.5 Flash-Lite, Gemini 3.6/3.8 Flash, Supernote On-Device (`MyScript iink`), and Apple Vision. |
|
|
111
|
+
| **[Prometheus & Grafana Monitoring](docs/monitoring.md)** | Scraping `/metrics`, importing the reference Grafana dashboard, and configuring Prometheus recording and alerting rules. |
|
|
112
|
+
| **[Webhooks, iCal (`.ics`) & Integrations](docs/webhooks_and_integrations.md)** | Subscribing to RFC 5545 `VTODO` task feeds in Apple/Google/Outlook calendars and Home Assistant, plus HMAC-signed outbound webhooks. |
|
|
113
|
+
| **[CLI Reference (`supernote`)](docs/cli_reference.md)** | Every command and flag for local `.note` conversion and authoring (`create`), server hosting (`serve`), cloud operations, API keys (`cloud keys`), search, and admin management. |
|
|
114
|
+
| **[Server & Sync Protocol Architecture](supernote/server/ARCHITECTURE.md)** | Deep dive into the Supernote Private Cloud wire protocol (challenge-response auth, 3-step CAS sync, Socket.IO) and our Python/SQLite implementation. |
|
|
115
|
+
| **[Binary `.note` Format Specification](docs/notebook_spec.md)** | Byte-level layout of Supernote `.note` and `.mark` headers, footers, metadata blocks (`schema.py`), layers, and `RATTA_RLE` / `RATTA_RLE_X2` bitmap compression. |
|
|
116
|
+
|
|
117
|
+
### Python Package & API Reference
|
|
118
|
+
|
|
119
|
+
- **`supernote.server`**: [Open Private Cloud Server, Services & Routes](supernote/server/README.md) (`supernote.server.config.ServerConfig`, `supernote.server.app.create_app`)
|
|
120
|
+
- **`supernote.client`**: [Async Cloud Client SDK](supernote/client/__init__.py) (`supernote.client.Supernote`, `supernote.client.device.DeviceClient`, `supernote.client.schedule.ScheduleClient`, `supernote.client.extended.ExtendedClient`)
|
|
121
|
+
- **`supernote.notebook`**: [Notebook Parser, Converter & Authoring Library](supernote/notebook/README.md) (`supernote.notebook.load_notebook`, `supernote.notebook.PdfConverter`, `supernote.notebook.author.NotebookAuthor`, `supernote.notebook.renderer.MarkdownRenderer`)
|
|
122
|
+
- **`supernote.models`**: [Protocol DTOs & VOs](supernote/models/README.md) (`supernote.models.file_device`, `supernote.models.schedule`, `supernote.models.summary`, `supernote.models.extended`, `supernote.models.webhook`)
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## Choosing Your Private Cloud Experience
|
|
127
|
+
|
|
128
|
+
While the official Supernote Private Cloud by Ratta provides a production-grade managed sync experience, Open Private Cloud offers a lightweight self-hosted alternative with opt-in AI enhancement:
|
|
129
|
+
|
|
130
|
+
| Capability | Official Private Cloud (Ratta) | Open Private Cloud (Bare Sync Mode) | Open Private Cloud (Full Knowledge Hub) |
|
|
131
|
+
| :--- | :--- | :--- | :--- |
|
|
132
|
+
| **Core Sync** | Robust & Validated | 100% OpenAPI Compliant | 100% OpenAPI Compliant |
|
|
133
|
+
| **Memory Footprint** | High (~2 GB+ RAM required) | **Low (~135 MB flat RAM)** | **Low (~160 MB idle / ~310 MB active peak)** |
|
|
134
|
+
| **Stack & Database** | Multi-container (Java + Redis + MariaDB) | Python / `asyncio` + single SQLite file | Python / `asyncio` + single SQLite file |
|
|
135
|
+
| **Web UI & Tasks** | Built-in Web UI | Disabled (`web_enabled: false`) | Editorial Web UI + `.ics` Calendar Feeds |
|
|
136
|
+
| **AI Analysis** | Basic OCR (Device-side) | None | Optional: AI Transcriptions & Synthesis (Gemini or Local Models) |
|
|
137
|
+
| **Search** | Path / Filename | Path / Filename | Optional: Cross-Notebook Semantic Concept Search |
|
|
138
|
+
| **AI Agent Access (MCP)** | None | Disabled (`mcp_enabled: false`) | Built-in OAuth 2.1 & Static API Key MCP Server |
|
|
139
|
+
|
|
140
|
+
<p align="center">
|
|
141
|
+
<img src="docs/static-assets/note-synthesis-1.jpg" alt="Note Synthesis View" width="400">
|
|
142
|
+
<img src="docs/static-assets/note-synthesis-2.jpg" alt="Notebook Explorer" width="400">
|
|
143
|
+
</p>
|
|
144
|
+
|
|
145
|
+
<p align="center">
|
|
146
|
+
<img src="docs/static-assets/tasks-dashboard.png" alt="Tasks & Schedule Dashboard" width="800">
|
|
147
|
+
</p>
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
## Quick Start
|
|
152
|
+
|
|
153
|
+
For full deployment instructions (including `docker-compose.yml`, Caddy/Nginx reverse proxies, and backups), see the **[Self-Hosting & Quickstart Guide](docs/bootstrap_guide.md)**.
|
|
154
|
+
|
|
155
|
+
### Launch the Server
|
|
156
|
+
|
|
157
|
+
#### Option A: Lite Sync Server (Zero-Config)
|
|
158
|
+
No API keys or external services required. Runs locally with SQLite (~160 MB idle, ~310 MB peak when rendering notebook previews).
|
|
159
|
+
|
|
160
|
+
* **Using Python**:
|
|
161
|
+
```bash
|
|
162
|
+
pip install "supernote[server]"
|
|
163
|
+
supernote serve
|
|
164
|
+
```
|
|
165
|
+
* **Using Docker**:
|
|
166
|
+
```bash
|
|
167
|
+
docker build -t supernote .
|
|
168
|
+
docker run -d \
|
|
169
|
+
-p 8080:8080 \
|
|
170
|
+
-v $(pwd)/storage:/data \
|
|
171
|
+
--name supernote-server \
|
|
172
|
+
supernote
|
|
173
|
+
```
|
|
174
|
+
* **Bare Sync Mode (~135 MB flat RAM)**: To run a minimal headless sync server without the Web UI, background PNG rasterization, or MCP server, disable `web_enabled` and `mcp_enabled` via environment variables or `config.yaml`:
|
|
175
|
+
```bash
|
|
176
|
+
SUPERNOTE_MCP_ENABLED=false SUPERNOTE_WEB_ENABLED=false supernote serve
|
|
177
|
+
```
|
|
178
|
+
```yaml
|
|
179
|
+
# config/config.yaml
|
|
180
|
+
mcp_enabled: false
|
|
181
|
+
web_enabled: false
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
#### Option B: AI & Knowledge Hub (With Gemini, Recommended)
|
|
185
|
+
Enables handwriting transcription, summarization, and semantic search using `gemini-3.5-flash-lite` by default. Requires a Google Gemini API Key (available on both a `$0` Free tier that trains on API data and a Paid tier that does not; see [Choosing an AI Provider](#choosing-an-ai-provider)).
|
|
186
|
+
|
|
187
|
+
* **Using Python**:
|
|
188
|
+
```bash
|
|
189
|
+
export SUPERNOTE_GEMINI_API_KEY="your-gemini-api-key"
|
|
190
|
+
pip install "supernote[all]"
|
|
191
|
+
supernote serve
|
|
192
|
+
```
|
|
193
|
+
* **Using Docker**:
|
|
194
|
+
```bash
|
|
195
|
+
docker build -t supernote .
|
|
196
|
+
docker run -d \
|
|
197
|
+
-p 8080:8080 \
|
|
198
|
+
-v $(pwd)/storage:/data \
|
|
199
|
+
-e SUPERNOTE_GEMINI_API_KEY="your-gemini-api-key" \
|
|
200
|
+
--name supernote-server \
|
|
201
|
+
supernote
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
#### Option C: AI & Knowledge Hub (With a Local Model)
|
|
205
|
+
Runs the same features against a model server on your own hardware, such as [Ollama](https://ollama.com/), llama.cpp, vLLM, or LM Studio, so your notes never leave your network. You need a vision-capable chat model for OCR and summaries, and an embedding model for search. Configure the `openai` provider in `config/config.yaml` (`/data/config/config.yaml` in Docker) as described in the [Configuration Reference](docs/configuration.md). On macOS, Apple's native Vision framework (`provider: apple` with `vision-accurate`) is also supported as an offline fallback for basic prose search, though it is not recommended for structured notes, diagrams, or Bullet Journal Rapid Logging (see [Choosing an AI Provider](#choosing-an-ai-provider)).
|
|
206
|
+
|
|
207
|
+
When the server runs in Docker and Ollama runs on the host, use `http://host.docker.internal:11434/v1` as the `base_url` (on Linux, also pass `--add-host=host.docker.internal:host-gateway`).
|
|
208
|
+
|
|
209
|
+
### Bootstrap Your User
|
|
210
|
+
|
|
211
|
+
Once the server is running, register your administrator account (the first user registered automatically receives Admin privileges and closes public registration):
|
|
212
|
+
|
|
213
|
+
* **Using Python CLI**:
|
|
214
|
+
```bash
|
|
215
|
+
# Create the initial admin account
|
|
216
|
+
supernote admin --url http://localhost:8080 user add you@example.com
|
|
217
|
+
|
|
218
|
+
# Authenticate your CLI
|
|
219
|
+
supernote cloud login you@example.com --url http://localhost:8080
|
|
220
|
+
```
|
|
221
|
+
* **Using Docker CLI**:
|
|
222
|
+
```bash
|
|
223
|
+
docker exec -it supernote-server supernote admin --url http://localhost:8080 user add you@example.com
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
### Connect Your Device
|
|
227
|
+
|
|
228
|
+
1. On your Supernote, go to **Settings > Sync > Supernote Cloud** and select **Private Cloud**.
|
|
229
|
+
2. Enter your server URL (e.g., `http://192.168.1.5:8080`).
|
|
230
|
+
3. Log in with the email and password you created in Step 2.
|
|
231
|
+
4. Tap **Sync** to begin syncing your notes.
|
|
232
|
+
|
|
233
|
+
### Explore Your Insights
|
|
234
|
+
|
|
235
|
+
Once your notes sync and process, you can view the AI synthesis from the terminal, browser, or MCP server (`http://<your-ip>:8081/mcp`):
|
|
236
|
+
|
|
237
|
+
```bash
|
|
238
|
+
# Get a high-level summary and transcription
|
|
239
|
+
supernote cloud insights /NOTE/Note/Journal.note
|
|
240
|
+
|
|
241
|
+
# Semantic search across all notebooks
|
|
242
|
+
supernote cloud search "What were my project goals for February?"
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
<p align="center">
|
|
246
|
+
<img src="docs/static-assets/cli-insights.jpg" alt="CLI AI Insights" width="700">
|
|
247
|
+
</p>
|
|
248
|
+
|
|
249
|
+
<p align="center">
|
|
250
|
+
<img src="docs/static-assets/admin-processing-status.jpg" alt="Admin Task Monitor" width="450">
|
|
251
|
+
<img src="docs/static-assets/mobile-friendly.jpg" alt="Mobile View" width="250">
|
|
252
|
+
</p>
|
|
253
|
+
|
|
254
|
+
---
|
|
255
|
+
|
|
256
|
+
## Choosing an AI Provider
|
|
257
|
+
|
|
258
|
+
We recommend Google Gemini (`gemini-3.5-flash-lite` by default, or `gemini-3.6-flash`) for OCR, summarization, and embeddings based on our [30-page Supernote OCR benchmark](evals/ocr/RESULTS.md) and public multimodal evaluations. Quality for summaries and handwriting OCR extraction may be lower when using smaller local or other OpenAI-compatible models.
|
|
259
|
+
|
|
260
|
+
<p align="center">
|
|
261
|
+
<img src="evals/ocr/pareto_frontier.svg" alt="OCR Quality vs. Latency Pareto Frontier" width="840">
|
|
262
|
+
</p>
|
|
263
|
+
|
|
264
|
+
### Supernote OCR Benchmark ([`evals/ocr/`](evals/ocr/))
|
|
265
|
+
|
|
266
|
+
Results across 30 `.note` pages (25 real handwritten pages covering Bullet Journal Rapid Logging, two-column diagrams and guitar tablature, French/Spanish/Turkish notes, and overlapping strokes, plus 5 synthetic Bullet Journal fixtures; full breakdown in [`evals/ocr/RESULTS.md`](evals/ocr/RESULTS.md)):
|
|
267
|
+
|
|
268
|
+
| Provider / Model | Pages | Word F1 | Mean CER | Content CER | Handwritten BuJo Symbols | All BuJo Symbols | Median Latency |
|
|
269
|
+
| :--- | ---: | ---: | ---: | ---: | ---: | ---: | ---: |
|
|
270
|
+
| `Gemini 3.5 Flash-Lite` | 30 | 99.0% | 2.3% | 1.4% | 85.5% | 95.8% | 1.18 s |
|
|
271
|
+
| `Gemini 3.6 Flash` | 30 | 99.7% | 4.2% | 3.6% | 90.5% | 97.3% | 6.63 s |
|
|
272
|
+
| `Gemini 3.8 Flash` | 30 | 96.5% | 5.6% | 5.4% | 90.5% | 97.3% | 9.93 s |
|
|
273
|
+
| `Supernote On-Device` (`MyScript iink 4.1.0`) | 25 | 75.5% | 17.2% | 16.7% | 18.6% | 18.6% | 0.91 s |
|
|
274
|
+
| `Apple Vision Accurate` | 30 | 73.7% | 21.7% | 20.7% | 4.5% | 49.7% | 0.41 s |
|
|
275
|
+
| `Apple Vision Fast` | 30 | 17.8% | 72.8% | 70.7% | 0.0% | 8.7% | 0.13 s |
|
|
276
|
+
|
|
277
|
+
- **Gemini**: `gemini-3.5-flash-lite` (the default) reads nearly every word accurately (99.0% Word F1, 0.0% Median CER) in ~1.2 s per page for under `$0.001` per page, while preserving Bullet Journal signifiers (`•`, `X`, `>`, `<`, `o`, `-`, `*`), nested indentation (100%), and `~~strikethroughs~~` (100%). `gemini-3.6-flash` reaches 99.7% Word F1 and 2.3% multilingual CER; its higher diagram CER comes from adding ASCII `|` fret dividers on guitar tablature (99.3% Word F1 on those pages).
|
|
278
|
+
- **Apple Vision**: Supported on macOS (`vision-accurate`) as an offline fallback for plain English prose (93.0% Word F1 on `english_prose`), **not** as a recommended provider. Overall accuracy matches the tablet's built-in recognizer (73.7% vs 75.5% Word F1), multi-column layouts are read out of order (30.2% diagram CER), and because Vision cannot take a prompt it drops almost all handwritten Bullet Journal task symbols (4.5% recall) and strikethroughs (0%). Avoid `vision-fast`, which only detects machine-printed text.
|
|
279
|
+
|
|
280
|
+
### Multimodal Benchmarks: Gemini vs. Claude
|
|
281
|
+
|
|
282
|
+
Recent results (Jun–Nov 2026) from [Artificial Analysis](https://artificialanalysis.ai/) (`MMMU-Pro`), [Vals AI](https://www.vals.ai/benchmarks) (`MMMU-Pro` and `MortgageTax` scanned-form extraction), and [LMArena Vision](https://lmarena.ai/) across model tiers:
|
|
283
|
+
|
|
284
|
+
| Model | Release | API Price (In / Out per 1M) | LMArena Vision (Elo) | MMMU-Pro (AA) | MMMU-Pro (Vals) | MortgageTax (Vals) |
|
|
285
|
+
| :--- | :--- | :--- | ---: | ---: | ---: | ---: |
|
|
286
|
+
| `Gemini 3.5 Flash-Lite` | Jul 2026 | `$0.30 / $2.50` | 1268 | 79.0% | 83.6% | 68.7% |
|
|
287
|
+
| `Claude Haiku 5.5` | Oct 2026 | `$0.10 / $0.50` (≤100k) | — | — | — | — |
|
|
288
|
+
| `Gemini 3.6 Flash` | Jul 2026 | `$0.75 / $3.75`\* | 1297 | 83.2% | 88.4% | 67.6% |
|
|
289
|
+
| `Gemini 3.8 Flash` | Sep 2026 | `$0.75 / $3.75`\* | 1316 | 85.6% | 89.1% | 65.3% |
|
|
290
|
+
| `Claude Sonnet 5` | Jun 2026 | `$2.00 / $10.00` | 1272 | 77.3% | 83.0% | 70.0% |
|
|
291
|
+
| `Claude Sonnet 5.5` | Sep 2026 | `$2.00 / $10.00` | 1283 | — | — | — |
|
|
292
|
+
| `Gemini 4 Carbon` | Oct 2026 | `$4.00 / $20.00` | — | 89.3% | — | — |
|
|
293
|
+
| `Claude Opus 5` | Jul 2026 | `$5.00 / $25.00` | 1317 | 84.7% | 89.9% | 72.1% |
|
|
294
|
+
| `Claude Opus 5.5` | Sep 2026 | `$4.00 / $20.00` | 1324 | 87.7% | — | — |
|
|
295
|
+
|
|
296
|
+
*\*Promotional rate through Dec 31, 2026 (`$1.50 / $7.50` standard; 50% lower via Batch API).*
|
|
297
|
+
|
|
298
|
+
`Gemini 3.5 Flash-Lite` matches `Claude Sonnet 5` on `MMMU-Pro` at roughly one-sixth the price, while `Gemini 3.6 Flash` and `Gemini 3.8 Flash` score ahead of `Claude Sonnet 5` and `5.5` on `LMArena Vision` and close to `Claude Opus 5` at a fraction of the cost.
|
|
299
|
+
|
|
300
|
+
### API Privacy, Training & Data Retention
|
|
301
|
+
|
|
302
|
+
Google Gemini offers both a **Free tier** that trains on API data and a **Paid tier** (enabled by linking a [Cloud Billing account](https://aistudio.google.com/docs/terms#paid-services) to your Google AI Studio project) that does not. Commercial API traffic on OpenAI and Anthropic is excluded from training by default:
|
|
303
|
+
|
|
304
|
+
| Provider & Tier | Used to Train Models? | Default API Log Retention | Policy Citations |
|
|
305
|
+
| :--- | :--- | :--- | :--- |
|
|
306
|
+
| **Gemini API (Paid tier)** | **No** (Google acts as Data Processor) | Abuse monitoring; optional AI Studio project logs default to 55 days (configurable to 7 days or off; [ZDR](https://docs.cloud.google.com/gemini-enterprise-agent-platform/resources/zero-data-retention) on Enterprise/Vertex AI) | [Paid Services Terms](https://aistudio.google.com/docs/terms#data-use-paid), [Logs Policy](https://aistudio.google.com/docs/logs-policy), [Google DPA](https://business.safety.google/processorterms/) |
|
|
307
|
+
| **Gemini API (Free tier)** | **Yes** (outside EEA, UK, and Switzerland; includes human review) | Retained for product improvement (avoid for private or sensitive notes) | [Unpaid Services Terms](https://aistudio.google.com/docs/terms#data-use-unpaid) |
|
|
308
|
+
| **OpenAI API** (`api.openai.com`) | **No** (unless opted in) | Up to 30 days for abuse monitoring; ZDR available for eligible orgs | [OpenAI Data Controls](https://developers.openai.com/api/docs/guides/your-data) |
|
|
309
|
+
| **Anthropic Claude API** (`api.anthropic.com`) | **No** under Commercial Terms | Not retained by default on standard endpoints, or up to 30 days on covered models; ZDR available | [Commercial Terms](https://www.anthropic.com/legal/commercial-terms), [Training Policy](https://privacy.claude.com/en/articles/7996868-is-my-data-used-for-model-training), [Data Retention](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention) |
|
|
310
|
+
| **Local models** (`Ollama`, `llama.cpp`, `vLLM`, `apple`) | **No** | Local only; notes never leave your server | — |
|
|
311
|
+
|
|
312
|
+
---
|
|
313
|
+
|
|
314
|
+
## Installation
|
|
315
|
+
|
|
316
|
+
```bash
|
|
317
|
+
# Install specific components
|
|
318
|
+
pip install supernote # Standalone .note parser, converter & authoring only
|
|
319
|
+
pip install "supernote[server]" # + Open Private Cloud server, Web UI, AI & MCP
|
|
320
|
+
pip install "supernote[client]" # + Async Cloud API client & cloud/admin CLI
|
|
321
|
+
pip install "supernote[server,apple]" # + macOS Vision OCR fallback
|
|
322
|
+
|
|
323
|
+
# Full installation (recommended for server users)
|
|
324
|
+
pip install "supernote[all]"
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
---
|
|
328
|
+
|
|
329
|
+
## CLI Usage
|
|
330
|
+
|
|
331
|
+
See the **[CLI Reference](docs/cli_reference.md)** for all commands and flags.
|
|
332
|
+
|
|
333
|
+
```bash
|
|
334
|
+
# Server & Admin
|
|
335
|
+
supernote serve # Start Open Private Cloud
|
|
336
|
+
supernote admin user list # Manage users
|
|
337
|
+
supernote admin user set-quota you@example.com 5G # Set per-user storage quota
|
|
338
|
+
|
|
339
|
+
# Offline Notebook Parsing, Conversion & Authoring
|
|
340
|
+
supernote convert journal.note journal.pdf -a # Export .note to PDF
|
|
341
|
+
supernote create daily.note --markdown "# Daily Log\n\n* - [ ] Ship release"
|
|
342
|
+
|
|
343
|
+
# Cloud File Operations & AI Synthesis
|
|
344
|
+
supernote cloud ls / # List remote files
|
|
345
|
+
supernote cloud download /NOTE/Note/Journal.note # Download to local machine
|
|
346
|
+
supernote cloud insights /NOTE/Note/Journal.note # View AI summary & OCR transcript
|
|
347
|
+
supernote cloud search "Q1 roadmap" # Semantic vector search
|
|
348
|
+
|
|
349
|
+
# Static API Keys & Headless Automation
|
|
350
|
+
supernote cloud keys create "Automation" --expires-days 90
|
|
351
|
+
supernote cloud keys list
|
|
352
|
+
supernote cloud keys revoke <key-id>
|
|
353
|
+
supernote cloud --url http://localhost:8080 --api-key sn_... ls /
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
Headless scripts can also set `SUPERNOTE_URL` and `SUPERNOTE_API_KEY` in the environment instead of running `supernote cloud login`.
|
|
357
|
+
|
|
358
|
+
---
|
|
359
|
+
|
|
360
|
+
## Notebook Operations & Developer API
|
|
361
|
+
|
|
362
|
+
### Parse, Convert & Author `.note` Files (`supernote.notebook`)
|
|
363
|
+
See the **[Notebook Parser, Converter & Authoring Guide](supernote/notebook/README.md)** for full details:
|
|
364
|
+
|
|
365
|
+
```python
|
|
366
|
+
from pathlib import Path
|
|
367
|
+
from supernote.notebook import PdfConverter, load_notebook
|
|
368
|
+
from supernote.notebook.author import create_notebook
|
|
369
|
+
|
|
370
|
+
# Convert an existing .note file to a multi-page PDF with clickable links
|
|
371
|
+
note = load_notebook("journal.note")
|
|
372
|
+
pdf_bytes = PdfConverter(note).convert(-1, enable_link=True)
|
|
373
|
+
Path("journal.pdf").write_bytes(pdf_bytes)
|
|
374
|
+
|
|
375
|
+
# Author a new .note file directly from Bullet Journal Markdown
|
|
376
|
+
note_bytes = create_notebook(
|
|
377
|
+
"# Daily Log\n\n* - [ ] Review ==architecture spec== #engineering",
|
|
378
|
+
style="stylized",
|
|
379
|
+
background="dots",
|
|
380
|
+
auto_toc=True,
|
|
381
|
+
)
|
|
382
|
+
Path("daily.note").write_bytes(note_bytes)
|
|
383
|
+
```
|
|
384
|
+
|
|
385
|
+
### Automate Cloud Sync, Tasks & Search (`supernote.client`)
|
|
386
|
+
See the **[Python Client SDK Guide](supernote/client/__init__.py)** for the complete async API:
|
|
387
|
+
|
|
388
|
+
```python
|
|
389
|
+
from supernote.client import Supernote
|
|
390
|
+
from supernote.client.extended import ExtendedClient
|
|
391
|
+
|
|
392
|
+
# Authenticate with email/password (`Supernote.login`) or a static API key (`sn_...`)
|
|
393
|
+
async with Supernote.from_token("sn_...", host="http://localhost:8080") as sn:
|
|
394
|
+
files = await sn.device.list_folder("/")
|
|
395
|
+
|
|
396
|
+
ext = ExtendedClient(sn.client)
|
|
397
|
+
hits = await ext.search("architecture trade-offs", top_n=5)
|
|
398
|
+
for hit in hits.results:
|
|
399
|
+
print(f"{hit.file_name} (p.{hit.page_index + 1}): {hit.score:.0%}")
|
|
400
|
+
```
|
|
401
|
+
|
|
402
|
+
The notebook parser originally started as a fork of [supernote-tool](https://github.com/jya-dev/supernote-tool) with lighter dependencies and modern type hints. All credit goes to the original authors for providing the foundational parser utility.
|
|
403
|
+
|
|
404
|
+
---
|
|
405
|
+
|
|
406
|
+
## Contributing & Community
|
|
407
|
+
|
|
408
|
+
We welcome issues, feature requests, and pull requests on **[GitHub (`allenporter/supernote`)](https://github.com/allenporter/supernote)**! Please see our **[Contributing Guide](docs/CONTRIBUTING.md)** and **[Database Migration Guide](docs/schema_migration_guide.md)** for details on local development (`./script/bootstrap`, `./script/test`, `./script/lint`, `./script/docs`), Ephemeral Mode (`supernote serve --ephemeral`), and AI Skills.
|
|
409
|
+
|
|
410
|
+
### Community Projects
|
|
411
|
+
|
|
412
|
+
- [jya-dev/supernote-tool](https://github.com/jya-dev/supernote-tool) — Original parser foundation.
|
|
413
|
+
- [awesome-supernote](https://github.com/fharper/awesome-supernote) — Curated resource list.
|
|
414
|
+
- [sn2md](https://github.com/dsummersl/sn2md) — Supernote to text/image converter.
|