?
SIYUAN-29
feature
Created: 2026-02-02 Updated: 2026-02-03
Relationships Loading...
Attachments
Loading...
Comments (3)
qa-agent · 2026-02-03
## QA Verification Complete ✅ **Result**: PASSED All acceptance criteria met: - All 4 export commands implemented and working - 393/393 tests passing (100% pass rate) - 36 new unit tests added - 12 integration tests created - Pandoc warnings properly documented - Binary/base64 handling correct - --output flag works correctly - Error handling robust - Help text clear and comprehensive See detailed verification report at /tmp/qa-SIYUAN-29.md **Code Quality**: Excellent - Proper separation of concerns - Comprehensive test coverage - Clear documentation - Follows project conventions **No issues or concerns identified. Ready for production.**
agent · 2026-02-03
## Implementation Complete ### Changes Made **Client Methods (siyuan.py ~line 632)**: - `export_notebook_md(notebook_id)` - Export notebook as markdown zip (base64 encoded) - `export_html(doc_id, pdf, save_path)` - Export document as HTML - `export_docx(doc_id, save_path)` - Export document as Word (requires Pandoc) - `export_opml(notebook_id)` - Export notebook as OPML (requires Pandoc) **Handler Functions (siyuan.py ~line 1677)**: - `_format_file_size()` - Utility for human-readable file sizes - `handle_export_notebook_md()` - Decodes base64 zip, writes to file - `handle_export_html()` - Writes HTML content to file - `handle_export_docx()` - Handles API response with Pandoc warnings - `handle_export_opml()` - Decodes base64 zip, writes to file **CLI Commands (siyuan.py ~line 3378)**: - `export notebook NOTEBOOK_ID [--output PATH]` - `export html DOC_ID [--output PATH]` - `export docx DOC_ID [--output PATH]` - `export opml NOTEBOOK_ID [--output PATH]` ### Verification - All 393 unit tests pass - Created 36 new tests in test_export_extended.py - Created integration tests in test_export_extended_live.py - Help text includes Pandoc warnings for docx/opml commands ### Notes - docx and opml commands require Pandoc, which is not available in Docker deployments - Help text and error messages clearly warn about the Pandoc requirement - Base64 decoding for notebook and opml exports works correctly - Output files are written with correct encoding (UTF-8 for HTML, binary for zips)
triage-agent · 2026-02-03
## Feature Triage Complete **Status:** PARTIALLY IMPLEMENTED **Summary:** Extended export commands would add 4 new export types to the existing `export` group. The SiYuan API endpoints are confirmed via source code analysis. **Key Finding:** 2 of 4 requested exports (docx, opml) require Pandoc, which is not available in Docker deployments per CLAUDE.md. These should be implemented with clear warnings. **Confirmed API Endpoints:** - `/api/export/exportNotebookMd` - No Pandoc needed - `/api/export/exportHTML` - No Pandoc needed - `/api/export/exportDocx` - **Requires Pandoc** - `/api/export/exportOPML` - **Requires Pandoc** **Implementation Location:** - Client methods: siyuan.py ~line 632 - Handler functions: siyuan.py ~line 1614 - CLI commands: siyuan.py ~line 3158 **Complexity:** Medium - requires binary/base64 handling for zip exports See attached triage report for full details.