magicbaobao33 downloads把「得到大脑(Get笔记)」搬进本地库:三栏 Markdown 笔记面板,浏览、搜索、编辑、反链、大纲、标签全部离线可用;云端同步与录音卡导入是可选增强.
Bring the Getnote / "得到大脑" (Dedao Brain) note workflow into Obsidian. Local-first: your notes are plain Markdown files inside your own vault, and browsing, searching, editing and deleting all work offline. Cloud sync and voice-recorder import are optional extras you switch on when you want them.
This is the Obsidian port of dsh-getnote (the DeepSeek Harness version). Features are aligned, but the host is different: that one mounts on DSH's web server, this one is a standard Obsidian plugin.
.history/ first, so any version can be restored..trash/, where it can be restored or purged.tag: and path: qualifiers, results with context lines.[[wikilink]] backlinks, a heading outline, and detection plus
resolution of conflicting copies under .conflicts/.Ctrl+P offers search, new note, open today's note, sync
now, scan the recorder card, clip the selection into a note, quick switcher, and "open the
current note in Getnote" — no need to open the panel first. The status bar shows the local
service port and vault size; click it to open the panel.obsidian://getnote?action=search&q=keyword, action=new|today|sync, and
action=open&path=.... Navigation and sync only: a URL any web page can trigger should not be
able to delete notes.Two channels, either one, with automatic fallback:
| Channel | Credentials | Notes |
|---|---|---|
| Open API | API Key + Client ID + Grant ID | Calls openapi.biji.com directly; the simplest path |
| MCP / OAuth | Browser authorization (PKCE) | RFC 7591 dynamic registration, no manual key |
asset/ alongside the note.[mm:ss] timestamp in the transcript and the player
jumps there; the line being spoken is highlighted during playback.Direct card access needs Python 3.10+ and the
bleakpackage. The recorder page checks the environment and tells you what is missing; when something is, it offers a Install dependencies button that runspython -m pip install --upgrade bleakfor you and re-checks with the bridge afterwards — success is judged by the bridge's own report, not by pip's exit code. Without Python nothing else breaks: the vault, cloud sync and the whole panel keep working, only the recorder page stays disconnected. Bluetooth access is read-only: the plugin never sends the "clean transferred files" command on its own, and only deletes by file name when you explicitly tick "delete after import".
得到大脑.base into the note folder with three views (all /
by tag / by date), so you can write your own formulas and layouts in Bases. An existing file is
never overwritten (you may have tuned it), but it is opened for you — writing a file with no
visible effect looks like the command did nothing.得到大脑画布.canvas, creating the canvas
if needed. It only adds a node; it does not rearrange the layout you built, and adding the same
note twice keeps one node.--font-interface, --font-text, --font-monospace,
--font-text-size), so changing fonts, size or zoom in Appearance changes the panel too; the
panel recomputes on the host's css-change event.Modal with focus on Cancel. window.confirm may not appear at all in a mobile WebView, which
would mean no second confirmation.metadataCache); the panel asks it instead of re-reading every note for one backlink list, and
falls back to its own scan when the host cannot answer.panel-error.txt in the plugin folder. A watchdog also checks the
root node two seconds after render and distinguishes "first frame never rendered" from "rendered
but zero height", two states that look the same and have completely different causes.Obsidian → Settings → Community plugins → Browse → search for Getnote Brain.
main.js, manifest.json and styles.css from the
latest release.<your vault>/.obsidian/plugins/getnote-brain/.The Python bridge scripts (
card/*.py) are compiled intomain.jsas strings and unpacked into the plugin's data folder on load, so the three files above really are all you need — recorder import works without a separatecard/download. If unpacking fails (read-only plugin folder), the rest of the plugin still works; only recorder import is unavailable, and the reason is written to the boot trace in the settings page.
npm install
npm run build # produces main.js and copies card/ + locale/ into the plugin root
npm test # 1018 offline tests (needs Node >= 22; jsdom 31 uses Node 22's zstd API)
npm run check:market # community-directory self-check: id/name/description rules, version
# consistency across three files, leaked credentials
npm run dev runs the build in watch mode.
GitHub Actions runs the same suite (.github/workflows/test.yml): npm ci + npm test on
Node 22 / Ubuntu. The last step rebuilds and then checks git status --porcelain main.js card locale — if the committed build output does not match the sources (you edited the source and
forgot to rebuild, or rebuilt and forgot to commit), CI fails, so users never download stale code.
It then runs npm run check:market to catch the directory's hard rules at commit time instead of
during review.
Publishing is by tag (.github/workflows/release.yml): git tag 0.1.3 && git push --tags
re-runs the tests, rebuilds from source, generates a build-provenance attestation, and attaches
main.js, manifest.json and styles.css to the release.
The tag must match version in manifest.json exactly. The community directory and
Obsidian's auto-update both look up a release by that tag name; one character off and they find the
old build or nothing at all.
After enabling, a brain icon appears in the left ribbon; click it to open the panel. It is also in the command palette:
Set the note folder first (Settings → Getnote Brain). The default is 得到大脑/ under the
vault root; you can point it at any folder inside the vault and the plugin creates it.
Images and audio in the panel are loaded as native browser resources (<img> / <audio>), which
need a real HTTP URL to support range requests and seeking. So on load the plugin starts a small
service on 127.0.0.1:
The automated directory review reports a few behaviors; here is what each one is for.
app.vault and app.vault.adapter
(reads, creates, modifies, deletes). Notes are never written behind Obsidian's back.node:fs is used only for the plugin's own data folder
(.obsidian/plugins/getnote-brain/): settings, credentials, sync state, version snapshots,
the boot trace and the error report. That folder is outside the vault API by definition. Vault
content itself never goes through node:fs.node:child_process runs the bundled Python bridge
(card/getcard_bridge.py) for voice-recorder import, and only when you start a scan or an
import. The one exception is the Install dependencies button on the recorder page, which runs
python -m pip install --upgrade bleak — and only when you press it. Nothing else spawns a
process.app.loadLocalStorage / app.saveLocalStorage), not the shared browser localStorage.| DSH version | Obsidian version | |
|---|---|---|
| Host | Mounted on DSH's web server under /getnote |
Its own loopback service on 127.0.0.1 |
| Vault choice | Any absolute path | A subfolder of the current vault (writes go through app.vault.adapter) |
| UI | React three-pane, registered into DSH slots | Same panel (Preact + compat) inside an Obsidian ItemView |
| Theme | --dsw-alias-* variables |
The same variables mapped to Obsidian's --background-primary etc. |
| Recorder | Same | Same, but desktop-only (it needs a child process) |
The core logic (vault / archive / history / cloud-sync / openapi / biji / card and the Python bridge) is one shared code base with one shared test suite; only the host wiring differs.
src/
main.js plugin entry: load settings, start the service, register view and commands
host/server.js loopback HTTP service (CORS + Range)
core/
service.js every /getnote/* route
vfs.js filesystem adapter: absolute paths -> app.vault.adapter
vault.js note algorithms (scan, search, conflicts, history, tags, ...)
settings.js settings I/O (plugin data folder, never the vault)
net.js fetch-compatible layer on node:http (avoids renderer CORS)
openapi.js biji.js mcp-cloud.js cloud-sync.js sync.js
archive.js history.js card.js
view/
panel.js the panel itself (React style, running on Preact)
view.js ItemView shell
card/*.py recorder Python bridge (Bluetooth / Wi-Fi)
locale/*.json interface strings
npm test
Coverage: vault algorithms (196), archive bundles (64), history snapshots (51), sync merging (66),
9 filesystem-adapter checks (app.vault.adapter vs node:fs semantics), 301 HTTP route
checks (a real server, real requests, real files: Range 206/416, path-escape rejection, masked
credentials, sync boundaries, recorder environment probing, attachment upload rules, broken-link
checks, todo lists), 38 startup checks (the built main.js is really required with a fake
obsidian module and an in-memory adapter, then onload is driven), 188 panel render checks
(jsdom renders the real panel, every tab, dark/light themes, keyboard handling, drag and drop,
selection clipping, image zoom, search highlighting, conflict and trash panes), 9 view-layer
checks, 8 markdown render checks, 8 transcript checks and 4 external integration
checks — plus 3 community-directory self-checks. Layout regressions are pinned too: the sidebar row, the sidebar filter and the middle-column search field all resolve to one height and one left edge, and the heatmap cells are at least 8px wide with the lightest level no dimmer than a third opacity. The sidebar never squeezes its rows to fit: when it runs out of room the column scrolls instead, and every row, section heading and card carries flex: none. The note body has its own error boundary, so a note that fails to render shows one inline line with the reason and a retry button while the sidebar and the rest of the panel keep working. The header keeps its title, tabs and action buttons on one line: only the tab strip gives way, scrolling sideways when the panel gets narrow, so nothing overlaps. List cards let their directory and tag line shrink so the title always keeps its room, every pane centres its content in a 760px column — the recorder page included — and the whole subtree resolves to border-box, so a padded button never grows past the width it declares. The writing heatmap starts hidden (it lives in the sidebar's top corner and the sidebar is mostly for folders and tags); a switch on the settings page brings it back. The settings page ends with a version card: it shows the running version (injected from manifest.json through /status), checks the repository's releases/latest, and either says which version is out with a download button or says plainly that the check failed and why — never a fake "up to date".
Everything is offline: no network, and never your real vault.
bleak must support your Bluetooth stack.
When either is missing the recorder page offers an Install dependencies button instead of
sending you off to a terminal; without Python at all, only that page is unavailable — the vault,
cloud sync and the rest of the panel keep working.netsh on Windows and falls back to the system routing table
elsewhere.MIT