mirror of
https://github.com/bnchiang96/xiaohongshu-importer.git
synced 2026-07-22 05:42:21 +00:00
Update README with latest changes for v1.0.1 and new repo
This commit is contained in:
parent
4d5940080b
commit
3387fdace0
1 changed files with 40 additions and 106 deletions
146
README.md
146
README.md
|
|
@ -1,120 +1,54 @@
|
|||
# Xiaohongshu Importer for Obsidian
|
||||
# Xiaohongshu Importer
|
||||
|
||||
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.
|
||||
A plugin to import Xiaohongshu (小红书) notes into your workspace with optional media downloads and categorization.
|
||||
|
||||
## Highlighted Features
|
||||
|
||||
1. **Import Notes Without Media Downloads**: Save storage by importing Xiaohongshu notes with online links to pictures and videos, avoiding local downloads.
|
||||
2. **Import Notes With Offline Media**: Download pictures and videos locally for full note access without an internet connection.
|
||||
3. **Enhanced Organization**: Organize notes in Obsidian with a structured folder system and categories, surpassing Xiaohongshu's native saving capabilities.
|
||||
4. **Preserve Source Links**: Retain the original Xiaohongshu URL in each note for easy access to the source and commenting anytime.
|
||||
5. **Category-Based Organization**: Assign notes to customizable categories (e.g., 美食, 旅行, Others) for efficient note management.
|
||||
## Features
|
||||
- Import Xiaohongshu notes with text, images, and videos.
|
||||
- Categorize notes using customizable categories (e.g., "美食", "旅行", "其他").
|
||||
- Option to download media locally (images and videos) to a `media` folder.
|
||||
- Automatic tagging from note content.
|
||||
- Full-width "Import" button and improved modal layout.
|
||||
|
||||
## Installation
|
||||
|
||||
### Option 1: Download from GitHub Release
|
||||
1. Visit the [latest release](https://github.com/bnchiang96/Xiaohongshu-Importer-for-Obsidian/releases/latest) on GitHub.
|
||||
2. Download the `Xiaohongshu-Importer-for-Obsidian-v1.0.1.zip` file, which contains `main.js` and `manifest.json`.
|
||||
3. 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`.
|
||||
4. Enable the plugin in Obsidian:
|
||||
- Go to `Settings > Community Plugins`.
|
||||
- Turn off "Safe Mode" if enabled.
|
||||
- Find "Xiaohongshu Importer" and toggle it on.
|
||||
|
||||
### Option 2: Build from Source
|
||||
1. **Clone the Repository**:
|
||||
```
|
||||
git clone https://github.com/bnchiang96/Xiaohongshu-Importer-for-Obsidian.git
|
||||
cd Xiaohongshu-Importer-for-Obsidian
|
||||
```
|
||||
2. **Install Dependencies**:
|
||||
- Ensure Node.js and Yarn are installed.
|
||||
- Run:
|
||||
```
|
||||
yarn install
|
||||
```
|
||||
3. **Build the Plugin**:
|
||||
- Compile the TypeScript code:
|
||||
```
|
||||
yarn build
|
||||
```
|
||||
- This generates `main.js` (not tracked in the repo due to `.gitignore`).
|
||||
4. **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.
|
||||
|
||||
### Development Setup (Optional)
|
||||
- For live development with hot reload:
|
||||
- Install the [Obsidian Hot Reload plugin](https://github.com/pjeby/hot-reload).
|
||||
- Run:
|
||||
```
|
||||
yarn dev
|
||||
```
|
||||
- Changes will auto-reload in Obsidian.
|
||||
1. Download the latest release: [Xiaohongshu-Importer-v1.0.1.zip](https://github.com/bnchiang96/xiaohongshu-importer/releases/download/1.0.1/Xiaohongshu-Importer-v1.0.1.zip)
|
||||
2. In your workspace, go to **Settings > Community Plugins > Install from ZIP**.
|
||||
3. Select the downloaded ZIP file and install it.
|
||||
4. Enable the plugin in **Settings > Community Plugins**.
|
||||
|
||||
## Usage
|
||||
|
||||
1. **Trigger Import**:
|
||||
- Click the ribbon icon (book) or use the command `Import Xiaohongshu Note` (Ctrl/Cmd + P).
|
||||
2. **Enter Share Text**:
|
||||
- Paste Xiaohongshu share text (e.g., "64 不叫小黄了发布了一篇小红书笔记... http://xhslink.com/a/...").
|
||||
3. **Select Options**:
|
||||
- Choose a category (e.g., 搞笑, Others).
|
||||
- Check "Download media locally" for offline access (optional).
|
||||
4. **Import**:
|
||||
- Click "Import" or press Enter to create and open the note.
|
||||
1. Obtain the share text from a Xiaohongshu note (e.g., copy the text from a shared link).
|
||||
2. Use the ribbon icon (book) or the command **"Import Xiaohongshu Note"** from the command palette.
|
||||
3. Paste the share text into the modal.
|
||||
4. Select a category and toggle the "Download media locally" option if desired.
|
||||
5. Click "Import" to create the note in your workspace.
|
||||
|
||||
## Configuration
|
||||
- **Default Folder**: Set a base folder (e.g., "XHS Notes") in the plugin settings.
|
||||
- **Categories**: Add, edit, or reorder categories in the settings tab.
|
||||
- **Download Media**: Enable/disable default media downloads in the settings.
|
||||
|
||||
- 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).
|
||||
## Changelog
|
||||
### v1.0.1
|
||||
- Added hardcoded '其他' category as the last option.
|
||||
- Removed 'Others' from the default category list.
|
||||
- Made the "Download media" label clickable.
|
||||
- Increased margin-top and margin-bottom for the download row.
|
||||
- Made the "Import" button full width.
|
||||
- Fixed duplicate cover photo downloads.
|
||||
- Updated plugin ID to 'xiaohongshu-importer'.
|
||||
- Removed 'Obsidian' from the description.
|
||||
- Ensured main.js and manifest.json are included in the release.
|
||||
|
||||
## Example Output
|
||||
|
||||
For a note titled `柔佛人狂喜!新山终于有“地铁”了?`:
|
||||
|
||||
- **File**: `XHS Notes/搞笑/柔佛人狂喜!新山终于有“地铁”了?.md`
|
||||
- **Content** (with media downloaded):
|
||||
```
|
||||
---
|
||||
title: 柔佛人狂喜!新山终于有“地铁”了?
|
||||
source: http://xhslink.com/a/...
|
||||
date: 2025-03-09
|
||||
Imported At: 3/9/2025, 2:35:22 PM
|
||||
category: 搞笑
|
||||
---
|
||||
# 柔佛人狂喜!新山终于有“地铁”了?
|
||||
|
||||

|
||||
|
||||
[Note content here]
|
||||
|
||||
```
|
||||
#tags here
|
||||
```
|
||||
- **Media**: `XHS Notes/media/柔佛人狂喜-新山终于有地铁了-cover-1741570701965.jpg`
|
||||
## Development
|
||||
- **Repository**: [https://github.com/bnchiang96/xiaohongshu-importer](https://github.com/bnchiang96/xiaohongshu-importer)
|
||||
- **License**: MIT
|
||||
- **Build**: Run `yarn build` to compile TypeScript to JavaScript.
|
||||
- **Release**: Create a ZIP with `main.js` and `manifest.json` and upload it to the releases page.
|
||||
|
||||
## Contributing
|
||||
Feel free to open issues or pull requests on the GitHub repository. Contributions are welcome!
|
||||
|
||||
Submit issues or pull requests on [GitHub](https://github.com/bnchiang96/Xiaohongshu-Importer-for-Obsidian). To build locally:
|
||||
- Clone the repo.
|
||||
- Run `yarn install` and `yarn build`.
|
||||
- Test in your vault.
|
||||
## Support
|
||||
For questions or help, contact the author at [bnchiang96](https://github.com/bnchiang96).
|
||||
|
||||
## License
|
||||
|
||||
MIT License - see [LICENSE](LICENSE) for details.
|
||||
|
||||
## Acknowledgements
|
||||
|
||||
Built with ❤️ for the Obsidian community, powered by [xAI's Grok](https://xai.com).
|
||||
---
|
||||
|
|
|
|||
Loading…
Reference in a new issue