mirror of
https://github.com/bnchiang96/xiaohongshu-importer.git
synced 2026-07-22 05:42:21 +00:00
No description
|
|
||
|---|---|---|
| .editorconfig | ||
| .eslintignore | ||
| .eslintrc | ||
| .gitignore | ||
| .npmrc | ||
| esbuild.config.mjs | ||
| LICENSE | ||
| main.ts | ||
| manifest.json | ||
| package.json | ||
| README.md | ||
| styles.css | ||
| tsconfig.json | ||
| version-bump.mjs | ||
| versions.json | ||
| yarn.lock | ||
Xiaohongshu Importer for Obsidian
Import notes from Xiaohongshu (小红书) into your Obsidian vault with ease. This plugin extracts titles, content, images, videos, and tags from Xiaohongshu share links, organizing them into neatly formatted Markdown files.
Highlighted Features
- Import Notes Without Media Downloads: Save storage by importing Xiaohongshu notes with online links to pictures and videos, avoiding local downloads.
- Import Notes With Offline Media: Download pictures and videos locally for full note access without an internet connection.
- Enhanced Organization: Organize notes in Obsidian with a structured folder system and categories, surpassing Xiaohongshu's native saving capabilities.
- Preserve Source Links: Retain the original Xiaohongshu URL in each note for easy access to the source and commenting anytime.
- Category-Based Organization: Assign notes to customizable categories (e.g., 美食, 旅行, Others) for efficient note management.
Installation
Option 1: Download from GitHub Release
- Visit the latest release on GitHub.
- Download the
Xiaohongshu-Importer-for-Obsidian-v1.0.1.zipfile, which containsmain.jsandmanifest.json. - Extract the ZIP file to your Obsidian plugins folder:
unzip Xiaohongshu-Importer-for-Obsidian-v1.0.1.zip -d /path/to/your-vault/.obsidian/plugins/Xiaohongshu-Importer-for-Obsidian/- Ensure the folder name matches the plugin ID:
Xiaohongshu-Importer-for-Obsidian.
- Ensure the folder name matches the plugin ID:
- Enable the plugin in Obsidian:
- Go to
Settings > Community Plugins. - Turn off "Safe Mode" if enabled.
- Find "Xiaohongshu Importer" and toggle it on.
- Go to
Option 2: Build from Source
- Clone the Repository:
git clone https://github.com/bnchiang96/Xiaohongshu-Importer-for-Obsidian.git cd Xiaohongshu-Importer-for-Obsidian - Install Dependencies:
- Ensure Node.js and Yarn are installed.
- Run:
yarn install
- Build the Plugin:
- Compile the TypeScript code:
yarn build - This generates
main.js(not tracked in the repo due to.gitignore).
- Compile the TypeScript code:
- Install in Obsidian:
- Copy the built files to your vault:
mkdir -p /path/to/your-vault/.obsidian/plugins/Xiaohongshu-Importer-for-Obsidian/ cp main.js manifest.json /path/to/your-vault/.obsidian/plugins/Xiaohongshu-Importer-for-Obsidian/ - Enable the plugin as in Option 1.
- Copy the built files to your vault:
Development Setup (Optional)
- For live development with hot reload:
- Install the Obsidian Hot Reload plugin.
- Run:
yarn dev - Changes will auto-reload in Obsidian.
Usage
- Trigger Import:
- Click the ribbon icon (book) or use the command
Import Xiaohongshu Note(Ctrl/Cmd + P).
- Click the ribbon icon (book) or use the command
- Enter Share Text:
- Paste Xiaohongshu share text (e.g., "64 不叫小黄了发布了一篇小红书笔记... http://xhslink.com/a/...").
- Select Options:
- Choose a category (e.g., 搞笑, Others).
- Check "Download media locally" for offline access (optional).
- Import:
- Click "Import" or press Enter to create and open the note.
Configuration
- Open
Settings > Community Plugins > Xiaohongshu Importer:- Default Folder: Set the base folder (e.g.,
XHS Notes). - Download Media: Toggle default media download behavior (overridable per import).
- Categories: Manage categories (default: 美食, 旅行, 娱乐, 知识, 工作, 情感, 个人成长, 优惠, 搞笑, 育儿, Others).
- Default Folder: Set the base folder (e.g.,
Example Output
For a note titled 柔佛人狂喜!新山终于有“地铁”了?:
- File:
XHS Notes/搞笑/柔佛人狂喜!新山终于有“地铁”了?.md - Content (with media downloaded):
#tags here--- title: 柔佛人狂喜!新山终于有“地铁”了? source: http://xhslink.com/a/... date: 2025-03-09 Imported At: 3/9/2025, 2:35:22 PM category: 搞笑 --- # 柔佛人狂喜!新山终于有“地铁”了?  [Note content here] - Media:
XHS Notes/media/柔佛人狂喜-新山终于有地铁了-cover-1741570701965.jpg
Contributing
Submit issues or pull requests on GitHub. To build locally:
- Clone the repo.
- Run
yarn installandyarn build. - Test in your vault.
License
MIT License - see LICENSE for details.
Acknowledgements
Built with ❤️ for the Obsidian community, powered by xAI's Grok.