Repository navigation
fix(autoindex): tell .odp owners to save as .pptx, not export to PDF - #1131
Merged
Merged
Conversation
Motivation: the unsupported-format hint for an OpenDocument presentation still said "export it as PDF". That was the best advice before xerj-org#1117; since .pptx has its own extractor, it is the better target: one record per slide with `slide_title`, table rows kept as rows, and speaker notes in the body, none of which survives a PDF export. xerj-org#1124 made the same update for .ods ("save it as .xlsx"); the .odp arm was missed when PPTX landed. Change: sniff.rs `unsupported_document_advice("odp")` -> "save it as .pptx". The existing export-hint test now also pins the target format for ods and odp. Evidence: - New assertion failed before the fix: `assertion failed: unsupported_document_advice("odp").unwrap().contains(".pptx")` - After: `cargo test -p xerj-autoindex --lib` -> 1189 passed, 0 failed, 2 ignored (rust:latest container, full repo mounted). - `cargo fmt --all -- --check` clean. Written by an AI agent (Claude Code) on behalf of the PR author.
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 this changes, and why
When autoindex finds an OpenDocument presentation (
.odp), the unsupported-format hint tells the user to "export it as PDF". That was the best advice before #1117. Now that.pptxhas its own extractor, saving as.pptxgives a better result: one record per slide withslide_title, table rows kept as rows, and speaker notes in the body. A PDF export keeps none of those. #1124 made the same update for.ods("save it as .xlsx"), but the.odparm was missed when PPTX landed.The change is one line in
sniff.rs(unsupported_document_advice("odp")now says "save it as .pptx"). The existing export-hint test now also checks the target format forodsandodp.Evidence
Before the fix, the new assertion fails:
After the fix:
Checks
cargo fmt --all(--checkclean)cargo build --release -j 32 -p xerj-autoindexcargo test -p xerj-autoindex --libpasses.odphint (searched the repo).Not run:
clippy -D warnings(CI runs it) and the ES-YAML gate, for the reason above.Provenance
rust:latestcontainer with the full repo mounted, because the crate's tests don't compile on Windows.🤖 Generated with Claude Code