Repository navigation
feat(ofd): convert fixed-layout documents to Markdown - #209
Open
lihongjie0209 wants to merge 3 commits into
Open
lihongjie0209 wants to merge 3 commits into
lihongjie0209 wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
All reported issues were addressed across 24 files
Reply to a comment to ask cubic a question or push back. It learns from your replies.
Click Fix with cubic on a comment, or reply @cubic-dev-ai fix this, and cubic writes the fix.
View guided diff | Re-trigger cubic
There was a problem hiding this comment.
1 issue found across 13 files (changes from recent commits).
Confidence score: 4/5
- In
python/anydoc/__init__.py, a valid PDF with%PDF-beyond the 1,024-byte detection window is rejected instead of being sent to hosted Parse. Preserve the path-based format fallback for this case.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="python/anydoc/__init__.py">
<violation number="1" location="python/anydoc/__init__.py:88">
P2: This guard drops the native path extension fallback: a valid `.pdf` whose `%PDF-` header is beyond the 1,024-byte content-detection window is rejected instead of sent to hosted Parse. Fall back to `format_from_path(path)` as the native path API does.</violation>
</file>
Reply with feedback, questions, or to request a fix.
View guided diff | Re-trigger cubic
This branch has not been deployed
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.
Summary
.ofdpaths across the Rust, Node.js, Python, and Wasm APIs.TextCoderuns using anydoc's bounded ZIP/XML readers, without depending onofdrw.Validation
cargo fmt --all --checkcargo clippy --workspace --all-targets --all-features --locked --offline -- -D warningscargo test --locked --offlinenpm ci && npm run build && npm testinnode/(22 tests; generated declarations checked)python -m unittest discover -s python/tests(13 tests)cargo clippy -p anydoc-wasm --target wasm32-unknown-unknown --locked --offline -- -D warningswasm-pack build wasm --release --target web --scope firecrawlandnode --test wasm/test.mjs(8 tests)Scope notes
OFD is fixed-layout: larger-font headings and complete bordered table grids use conservative layout inference. Borderless/irregular tables, images, vector drawings, non-link annotations, and OCR are not converted. Image-only pages return
NeedsOcrrather than incomplete Markdown.Closes #208