Add page_indexes parameter to transform functions
Convert PDFs into various formats and translate them in one go
Brought to you by:
alic-zhang,
aliczhang-oomol
Originally posted by: coderabbitai[bot]
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.
Walkthrough
This change adds an optional
page_indexes: range | None = Noneparameter to the public functionstransform_markdownandtransform_epubin pdf_craft/functions.py, and to the corresponding methodstransform_markdown,transform_epub, and_extract_from_pdfin pdf_craft/transform.py. The parameter is threaded through these call sites and, when provided, included in arecognize_kwargsdictionary passed to the OCR recognition call so callers can restrict OCR to specified page ranges.Estimated code review effort
🎯 2 (Simple) | ⏱️ ~12 minutes
Possibly related PRs
🚥 Pre-merge checks | ✅ 1 | ❌ 1
❌ Failed checks (1 warning)
| Check name | Status | Explanation | Resolution | | :---------: | :--------- | :-------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------- | | Title check | ⚠️ Warning | The title does not follow the required format of `<type>(<scope>): <subject>`. It is missing the type prefix and follows a generic pattern instead. | Reformat the title to follow the required pattern, for example: `feat(functions): add page_indexes parameter to transform functions` | </subject></scope></type>✅ Passed checks (1 passed)
| Check name | Status | Explanation | | :---------------: | :------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------- | | Description check | ✅ Passed | The description is related to the changeset, providing a concrete usage example of the new page_indexes parameter being added to the transform functions. |📜 Recent review details
**Configuration used**: Organization UI **Review profile**: CHILL **Plan**: Pro📥 Commits
Reviewing files that changed from the base of the PR and between [a20de2] and f9dd20ce8773e0ff2895cf4a49e784ca4fba8641.📒 Files selected for processing (1)
* `pdf_craft/transform.py`🚧 Files skipped from review as they are similar to previous changes (1)
* pdf_craft/transform.pyThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share
- [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)Comment
@coderabbitai helpto get the list of available commands and usage tips.Originally posted by: HuSharp
@coderabbitai help
Originally posted by: coderabbitai[bot]
@HuSharp, hello! How can I assist you with this PR? I can help with:
Just let me know what you need!
Originally posted by: coderabbitai[bot]
Chat
There are 3 ways to chat with CodeRabbit:
I pushed a fix in commit <commit_id>, please review it.Open a follow-up GitHub issue for this discussion.@coderabbitaiin a new review comment at the desired location with your query.@coderabbitaiin a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.CodeRabbit commands
@coderabbitai pauseto pause the reviews on a PR.@coderabbitai resumeto resume the paused reviews.@coderabbitai reviewto trigger an incremental review. This is useful when automatic reviews are disabled for the repository.@coderabbitai full reviewto do a full review from scratch and review all the files again.@coderabbitai summaryto regenerate the summary of the PR.@coderabbitai evaluate custom pre-merge check --instructions <custom-checks-instructions> --name <custom-checks-title> [--mode <error|warning>]to validate the custom pre-merge checks instructions. Defaults toerrorwhen--modeis omitted.@coderabbitai ignore pre-merge checksto override pre-merge checks and get an approval on PR.@coderabbitai run pre-merge checksto run pre-merge checks on the pull request.@coderabbitai generate sequence diagramto generate a sequence diagram of the changes in this PR.@coderabbitai resolveto resolve all the CodeRabbit review comments.@coderabbitai configurationto show the current CodeRabbit configuration for the repository.@coderabbitai generate configurationto create a PR that adds the current resolved configuration as.coderabbit.yaml(or show it if already present).@coderabbitai helpto get help.Other keywords and placeholders
@coderabbitai ignoreor@coderabbit ignoreanywhere in the PR description to prevent this PR from being reviewed.@coderabbitai summaryor@cr summaryto generate the high-level summary at a specific location in the PR description.@coderabbitaior@cranywhere in the PR title to generate the title automatically.CodeRabbit configuration file (
.coderabbit.yaml).coderabbit.yamlfile to the root of your repository.# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.jsonStatus, support, documentation and community
Originally posted by: HuSharp
@coderabbitai review
Originally posted by: coderabbitai[bot]
✅ Actions performed
Review triggered. > Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.