Portable-Notes

Capture Everywhere (3.4)

Everything below is local. Nothing is uploaded, no account is needed, and notes stay as plain Markdown in your vault.

1 · Capture from the command line or a URL handler

python app.py --capture "Remember: milk"
python app.py --capture "peanote://new?text=Remember%3A%20milk&title=Shopping&tags=personal"

--capture writes one note into Inbox/, tags it capture, and exits. If PeaNote is already running, the CLI discovers its actual URL from data/server.json and asks that instance to write the note — no fixed port, no second server, and no locked database.

Optional URL fields: text, title, folder, tags (comma-separated). Plain text becomes the title’s first line.

Windows registration (optional, per-user)

Run start.bat register once. It adds peanote:// plus legacy pn:// and portable-notes:// to the current user’s registry — no admin rights, installer, or background service. Undo with start.bat unregister.

Then use links like:

peanote://new?text=Idea%20from%20the%20browser&tags=idea

Legacy pn:// and portable-notes:// links still work.

start.bat capture is the registered handler. It uses the running server when present, or writes the note locally and exits; the protocol schemes stay unchanged.

Bookmarklet

Drag this link to your bookmarks bar, then click it on any page to capture the selected text (or the page title if nothing is selected):

<a href="javascript:(function(){var t=String(window.getSelection()||'').trim()||document.title;location.href='peanote://new?text='+encodeURIComponent(t)+'&tags=web';})()">Capture to PeaNote</a>

The peanote:// bookmarklet works from any page because the registered handler writes the note locally. A direct fetch() from an arbitrary web page is deliberately blocked by the app’s same-origin guard, so do not use cross-origin bookmarklets; they would weaken the localhost CSRF protection.

2 · Clipboard and images in the app

3 · Email / text drop folder

PeaNote can import loose files from a local folder — no mailbox account and no polling service:

  1. Put .eml, .txt, or .md files in data/drop/ (override with "drop_dir" in data/config.json).
  2. In the app, run Import local drop folder from the command palette.
  3. Each file becomes a note in Inbox/; .eml subjects become titles and plain-text parts become bodies. Processed files are moved to data/drop/.processed/ so they are not imported twice. Anything over 5 MB is skipped with a reported error.

This is deliberately manual: the app never watches your filesystem or reads email without you asking.

4 · Import formats

Drag files onto the app, or run Import files (Markdown / HTML / CSV / ENEX)…:

Format What happens
.md, .markdown, .txt One note per file. Notion’s Title <32-hex-id>.md suffix is removed from the title.
.html, .htm Scripts and styles are stripped; <title>/<h1> becomes the title and visible text becomes the body.
.csv Columns title, content, folder, tags (quoted fields and commas inside quotes supported). With no header, the first and second columns are title and content.
.enex Evernote export: one note per <note>; tags and HTML bodies are preserved as Markdown text.

All parsing happens in your browser. The app only writes the resulting Markdown files to the vault.

5 · Export

None of these exports contact a server; the Markdown bundle and ZIP come from the local app, and the HTML file is built in the browser.