feat: add Sheet document type support#68
Open
talka123456 wants to merge 4 commits into
Open
Conversation
- Add formatSheet() to convert Sheet JSON to Markdown table - Update get_doc to auto-format Sheet documents - Add graceful degradation on format failure - Support mixed document types (Doc, Sheet, Board) in knowledge base - Add doc-type utility for document type detection
Previously formatSheet() only read data[0], silently dropping all subsequent sheet tabs. Now iterates over every entry in body_sheet.data and concatenates each sheet's Markdown table output. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
When multiple sheets lack a name field (all defaulting to 'Sheet1') or have identical names, append a numeric suffix so each tab is distinguishable in the Markdown output: Sheet1, Sheet1 (2), Sheet1 (3). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Add support for reading Yuque Sheet (电子表格) documents and properly handle non-Doc types (Sheet, Table, Board, Thread) across document tools.
Related Issues
N/A
Type of Change
Checklist
Added
yuque_get_docwith automatic Markdown table formattingdoc-typeutility module for document type detection and write guardstypeandbody_sheetfields added toYuqueDocinterfaceyuque_create_docrejectslakesheetformat with clear erroryuque_update_docblocks body writes on Sheet/Table/Board/Thread types; metadata updates still work