README file from
GithubDeep Research Formatter
Deep Research Formatter is an Obsidian plugin for cleaning Markdown exported from ChatGPT Deep Research.
Deep Research exports often contain inline marker tokens such as citation, entity, and URL annotations that are readable inside ChatGPT but noisy in plain Markdown. This plugin removes or rewrites those markers so the document is easier to read in Obsidian.
What it does
- Removes
citemarkers entirely. - Replaces
entitymarkers with their readable label. - Replaces
urlmarkers with their readable label. - Falls back safely for unknown marker types when possible.
- Preserves YAML frontmatter, fenced code blocks, and inline code.
- Applies only minimal whitespace cleanup after marker removal.
Requirements
- Node.js 20 or later
- npm 10 or later
- Obsidian 1.5.0 or later
Project layout
src/: plugin source codetests/: automated testsmanifest.json: Obsidian plugin manifestversions.json: Obsidian version compatibility mapmain.js: compiled plugin entry file
Install dependencies
npm install
Build
Create a production build:
npm run build
This compiles the plugin to main.js in the repository root and the CLI to dist/cli.js.
Development
Start esbuild in watch mode:
npm run dev
Run the automated tests:
npm test
If you also want a TypeScript-only check:
npx tsc --noEmit
Install into Obsidian
- Build the plugin with
npm run build. - Open your Obsidian vault folder.
- Create this plugin directory if it does not already exist:
<your-vault>/.obsidian/plugins/deep-research-formatter/
- Copy these files into that directory:
main.js
manifest.json
versions.json
- In Obsidian, open
Settings->Community plugins. - Turn off
Restricted modeif needed. - Enable
Deep Research Formatter.
Usage
Open a Markdown note exported from Deep Research, then use the Command Palette in Obsidian.
Available commands:
清理当前笔记中的 Deep Research 标记清理当前选区中的 Deep Research 标记
Command behavior:
- The first command cleans the entire active Markdown note.
- The second command cleans only the current editor selection.
- If no Deep Research markers are found, the plugin shows a notice and does nothing.
CLI usage
You can also format a vault directory, or any subdirectory inside it, from the command line:
npm run format:vault -- /path/to/your/vault
CLI behavior:
- Recursively processes
.mdfiles under the target directory. - Skips
.obsidian/,.git/, andnode_modules/. - Rewrites only files whose content actually changes.
- Prints a summary of scanned files, updated files, failures, and marker counts.
- Returns exit code
1for invalid arguments and2when one or more files fail to process.
Show the CLI help text:
npm run format:vault -- --help
Current marker handling
The current implementation recognizes the marker wrapper used in Deep Research exports and handles these marker types:
cite: removedentity: replaced with readable texturl: replaced with readable text- unknown tags: best-effort readable fallback, otherwise removed
Notes
- This plugin is intentionally conservative. It does not try to reformat the whole Markdown document.
- It focuses on Deep Research marker cleanup only.