# WeChat Inbox Sync Sync content collected from a WeChat mini program into your local Obsidian vault. This plugin is designed for a "send now, organize later" workflow: save text, links, webpages, audio clips, and files from WeChat, then pull them into Obsidian as Markdown notes and local attachments. ## Features - Sync text snippets and raw links into dated inbox notes. - Convert supported webpage links into Markdown snapshots. - Save Feishu docs, WeChat public account articles, Xiaohongshu notes, and generic webpages when their public page content is available. - Extract spoken/audio transcripts from supported Xiaoyuzhou, Bilibili, Douyin, and Xiaohongshu video links when subtitles or a transcribable media URL is available. - Save audio attachments and optionally transcribe them with a user-configured provider. - Save uploaded files as local attachments and extract Markdown from `txt`, `md`, `docx`, and text-based `pdf` files. - Keep generated files under a daily folder such as `临时收集/2026-05-20/`. - Use readable note names such as `公众号-文章标题.md`, `pdf-源文件名.md`, and `录音-会议录音.md`. ## Requirements - Obsidian desktop app. This plugin is desktop-only because it writes local binary attachments. - A WeChat mini program inbox and its CloudBase sync API. - A bind code generated by the mini program. - Optional: a speech-to-text API key or the bundled local ASR helper if you want audio transcription. ## Installation ### Manual installation 1. Download the release assets: - `main.js` - `manifest.json` - `styles.css` 2. Create this folder in your vault: ```text .obsidian/plugins/wechat-inbox-sync/ ``` 3. Put the downloaded files into that folder. 4. Reload Obsidian. 5. Open Settings -> Community plugins and enable **WeChat Inbox Sync**. ### Beta testing with BRAT Before a Community Plugins submission is approved, you can test this plugin with the BRAT plugin by adding the GitHub repository URL after it is published. ## Configuration Open the plugin settings and fill in: - **Sync API URL**: the plugin request endpoint of the CloudBase `sync` service. The default official endpoint is already filled in. It is not meant to be opened in a browser; opening it directly may trigger CloudBase security verification. - **Mini program bind code**: generate this in the mini program binding screen. - **Inbox directory**: the root folder for generated notes. The default is `临时收集`. - **Auto sync on load**: optionally pull new records after Obsidian starts. - **Speech transcription provider**: optional. Supported providers currently include Tencent Cloud ASR, Alibaba Cloud Bailian/Qwen-Omni, Doubao ASR, and a local transcription command. ### Local ASR helper If you do not want to use a cloud speech API, run the Windows helper in `local-asr/install-local-asr.ps1`. It installs whisper.cpp, ffmpeg, and a small Whisper model into `%USERPROFILE%\.wechat-inbox-local-asr`. Then choose **Local transcription command** in the plugin settings and click **Fill default command**. ## Data Flow 1. The WeChat mini program saves selected content to the user's CloudBase inbox. 2. This plugin requests pending records from the configured sync API using the bind code as a bearer token. 3. The plugin downloads any required attachments through temporary file URLs. 4. Markdown notes and attachments are written locally into the current vault. 5. After successful sync, the plugin marks the cloud record as synced. ## Privacy - The plugin stores the sync API URL, bind code, and optional speech API keys locally in the current Obsidian vault configuration. - Speech API keys are not sent to the mini program by this plugin. They are only used locally by the plugin when it calls the selected speech provider. - The plugin sends network requests to the configured sync API and, only when enabled, to the selected speech-to-text provider. - Cloud inbox content exists in the configured CloudBase environment until the backend marks it synced and applies its cleanup policy. ## Supported Content | Source | Output | | --- | --- | | Text | Markdown note | | Raw link | Markdown note with original URL | | WeChat public account article | Markdown snapshot when public HTML can be fetched | | Feishu doc link | Markdown snapshot when the public page can be rendered or parsed | | Xiaohongshu note | Title, text, tags, and public image URLs when exposed by the page | | Xiaoyuzhou / Bilibili / Douyin / Xiaohongshu video link | Spoken/audio transcript when subtitles or transcribable media is available | | Audio file | Local audio attachment and optional transcription | | PDF / Word / Markdown / text file | Local attachment and Markdown extraction when possible | ## Known Limitations - Private or login-only webpages may only save the original link. - Some platforms change their public page structure frequently, so extraction quality may vary. - Scanned PDFs and highly encoded PDFs may require OCR and may not extract clean text. - WeChat voice bubbles cannot be read directly by a mini program. Audio must be uploaded as a file or recorded inside the mini program. ## Development The release folder contains the files needed by Obsidian: ```text main.js manifest.json styles.css versions.json local-asr/ ``` For an official Community Plugins release, create a GitHub release whose tag matches `manifest.json`'s `version`, and attach `main.js`, `manifest.json`, and `styles.css`. ## License MIT