feat(mubu): add Mubu adapter with 5 commands#964
feat(mubu): add Mubu adapter with 5 commands#964SherlockSalvatore wants to merge 1 commit intojackwener:mainfrom
Conversation
4fdcf8d to
12ec3df
Compare
|
Thanks for putting this together. I like the scope and the command set, but I think there are two merge blockers from my read. The main one is that the new The other point is smaller but still worth fixing: the new commands use bare |
Thanks for the review~ I missed the recent refactor from |
12ec3df to
e73b7c2
Compare
@Astro-Han Thanks again for the review — both points are now addressed. Pushed the updated branch (force-push on 1. 2. Would appreciate another look when you get a chance 🙏 |
|
Thanks for the update. I reread the changes, and from my side the same three issues still look worth fixing:
These are review notes from my side to help tighten the PR, not an attempt to block it. If you update those parts, I’m happy to take another look. |
138e1e2 to
43f1429
Compare
Hi @Astro-Han, Thank you for your very thorough and responsible review! I really appreciate your attention to detail, which has significantly improved the robustness of this PR. I have addressed all your comments in the latest commits. Here is a detailed summary of the improvements based on your feedback: Preserved Fixed the issue where multiline nodes were getting flattened. In htmlToMarkdown(), In nodesToMarkdown(), both text and note fields containing newlines are properly split and mapped with correct indentation. This ensures that multiline list items and blockquotes (>) fully retain their Markdown structure. Strict Date Validation: Added robust date checks using dynamic day-of-month calculations (lastDayOfMonth). It now accurately throws errors for invalid leap years (e.g., 2025-02-29), non-existent days (e.g., 02-31), and out-of-bounds months/years. Special Character Handling: Enhanced decodeHtmlEntities() to properly parse standard HTML entities (&, <, >, ", ', ) and Unicode sequences. This guarantees that symbols and consecutive spaces are correctly rendered without breaking Markdown elements like tables or bold texts. I have verified these changes against 19 test cases covering extreme date inputs and complex string patterns. All tests passed successfully. Please see the screenshots below for the formatting test results and date validation: Looking forward to your further feedback! |
|
Thanks for the update. I took another pass through the latest version, and the earlier issues I raised look addressed. I only noticed one small edge case in Other than that, this looks good to me. Overall LGTM. |
@Astro-Han Hi, the newest update might address your concern, please review. The test is below: |
Commands: doc, docs, notes, recent, search. - Uses COOKIE strategy; API calls via in-page XHR with Jwt-Token from localStorage (matches the web app's own mechanism). - Renders node trees to Markdown (default) or plain text; supports tables, tasks, images, emoji, mentions, strikethrough, underline, and nested structures. - notes supports flexible time ranges: single day, month, year, or custom --from/--to spans, plus a --list overview mode. - search returns full-text matches with hit count and snippets for both folders and documents.
43f1429 to
54138dd
Compare
|
Thanks for checking this and for following up on the edge case. I reviewed the latest update, and the node-mention handling looks good now. The earlier concerns I raised appear resolved. LGTM from my side. Thanks again for the careful follow-through on the fixes and tests. |





Description
Adds a browser-based adapter for 幕布 (Mubu), a Chinese outliner and daily-notes app popular among knowledge workers and Obsidian users.
Type of Change
Commands
opencli mubu doc <id>opencli mubu docsopencli mubu notesopencli mubu recentopencli mubu search <query>Technical Notes
Strategy.COOKIE— readsJwt-TokenfromlocalStorageand sends requests via in-page XHR (same pattern as the zsxq adapter), avoiding CORS issues and extension fetch interception.docandnotessupport--output md(default, indented-list Markdown suitable for Obsidian import) and--output text(plain text for terminal reading).utils.tsimplements recursive renderers (nodesToMarkdown/nodesToText) that handle bold, italic, strikethrough, underline, node-mention links, hyperlinks, inline images, task checkboxes, deadline/reminder metadata (Obsidian Tasks/Reminder plugin format), and HTML tables → Markdown tables.notes): Mubu stores daily notes as a year-doc tree (keyed inlocalStorageasdaily_notes_doc_list). The adapter resolves year-doc IDs, fetches them in parallel for multi-year ranges, and filters day-nodes by date key. Supports--date,--month,--year,--from/--to, and--list(summary mode: date + entry count only)./list/searchAPI for full-text matching. Returnstype,id,name,path(breadcrumb),hits(total matching nodes count), andsnippet(up to 5 matching node previews joined by|).code !== 0with auth-related message) raiseAuthRequiredError; other API errors raiseCommandExecutionError.Files
clis/mubu/doc.tsclis/mubu/docs.ts--starredfor quick-access listclis/mubu/notes.tsclis/mubu/recent.tsclis/mubu/search.tsclis/mubu/utils.tsdocs/adapters/browser/mubu.mddocs/adapters/index.mddocs/.vitepress/config.mtsChecklist
Documentation
docs/adapters/(if new adapter)docs/adapters/index.mdtable (if new adapter)docs/.vitepress/config.mts(if new adapter)README.md/README.zh-CN.mdwhen command discoverability changedCliErrorsubclasses instead of rawErrorScreenshots / Output
opencli mubu --helpopencli mubu docsopencli mubu notes --list --month 2026-04opencli mubu search "AI"