README file from
GithubSmart Import
Desktop-only Obsidian plugin for importing external files into your vault and converting them into Markdown.
Current repository status
This repo was reconstructed from the deployed plugin bundle in a local vault. The original TypeScript source was not available, so the maintained source of truth here is:
src/main.jssrc/ocr_pdf.py
The build step copies these sources into release-ready root files.
What the plugin does
- imports files and folders from outside the vault
- supports file picker, drag-and-drop, recent downloads, Finder selection, clipboard, and natural-language lookup flows
- converts supported documents into Markdown notes with import frontmatter
- supports Office, PDF, web, data, notebook, archive, email, Markdown, TXT, and ebook imports
- supports EPUB, MOBI, and AZW3 ebook imports through markitdown, pandoc, or Calibre fallbacks
- preserves original source files inside the vault when enabled
- generates partial stub notes for low-quality PDFs and unsupported files instead of failing silently
- can extract embedded media assets from Office files when available
- optionally applies OpenAI-compatible cleanup and suggestion flows, with local rule-based fallback
Main commands
Smart Import: 导入文件Smart Import: 导入文件夹Smart Import: 导入最近下载Smart Import: 导入 Finder 当前选中Smart Import: 自然语言导入
Platform support
- Supported: desktop Obsidian
- Best-tested: macOS
- Not guaranteed: Windows and Linux
The current codebase contains macOS-specific helpers such as mdfind and osascript.
External dependencies
Required for general conversion:
markitdown
Common converted formats:
doc,docx,docm,rtf,odtxls,xlsx,ods,csvpdfppt,pptx,pptm,odphtml,htm,json,xml,ipynb,zip,eml,msgepub,mobi,azw3
Optional but recommended:
python3tesseractpypdfium2Python packageLibreOfficeorsofficepandocfor EPUB fallback conversionCalibre/ebook-convertfor MOBI and AZW3 fallback conversion
Examples:
pipx install markitdown
python3 -m pip install pypdfium2
brew install tesseract libreoffice pandoc
brew install --cask calibre
Local development
npm install
npm run build
That command:
- validates
src/main.js - validates
src/ocr_pdf.py - copies build outputs to
main.jsandocr_pdf.py
To produce GitHub release assets:
npm run release:prepare
See RELEASING.md for the full release flow.
Install from GitHub
Option 1: BRAT
- Install the BRAT plugin
- Open BRAT and run
Add a beta plugin for testing - In the repository field, enter this repo slug:
0126-hash/obsidian-smart-import
- Choose
Latest version - Keep
Enable after installing the pluginchecked - Click
Add plugin - Confirm that
Smart Importis enabled in Community Plugins
Option 2: GitHub Release assets
Download the latest release and copy these files into:
<your-vault>/.obsidian/plugins/smart-import/
main.jsmanifest.jsonstyles.css
Then enable Smart Import in Community Plugins.
First launch
First launch is non-blocking:
mdandtxtimports work immediately- if you later import converted formats such as
docx,pdf,pptx,xlsx,csv,html,epub,mobi, orazw3without the needed converter, Smart Import will open the dependency install wizard for you - on macOS, the wizard can open Terminal and run the recommended install commands after you confirm
Acceptance evidence
The 0.2.6 acceptance package is tracked in docs/acceptance/0.2.6:
- conversion smoke tests: 16 passed, 0 failed
- Smart Import mock-vault E2E: 16 passed, 0 failed, 16 activity cards
- remaining manual item: real Outlook
.msgsample validation
Manual install into Obsidian
Copy these files into:
<your-vault>/.obsidian/plugins/smart-import/
main.jsmanifest.jsonstyles.cssocr_pdf.py
Operational notes
- The plugin copies original source files into the vault.
- The plugin may read clipboard contents and, on macOS, inspect clipboard file paths and Finder selection.
- Natural-language import searches local folders such as
~/Downloadsand~/Desktop, and may also look at Finder selection or clipboard file candidates when the request implies them. - When AI features are enabled and an OpenAI-compatible provider is configured, note content and import snapshots may be sent to that provider.
- Environment diagnostics now distinguish between required and optional dependencies so users can tell whether only advanced OCR or
.docimport is affected. - The settings page now includes a dependency install wizard that can open Terminal on macOS and run the recommended install commands after user confirmation.
- For community-plugin installs, the OCR helper script is generated on demand by
main.js, so the standard Obsidian release assets remain sufficient.
See PRIVACY.md for data handling notes.