-
Notifications
You must be signed in to change notification settings - Fork 55
feat: add parameter to choose of which pages export the doctags #290
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat: add parameter to choose of which pages export the doctags #290
Conversation
Signed-off-by: rickymaggio02 <riccardo.maggioni@googlemail.com>
Merge ProtectionsYour pull request matches the following merge protections and will not be merged until they are valid. 🟢 Enforce conventional commitWonderful, this rule succeeded.Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- I have left some inline comments/suggestions.
- Besides, let's test-cover the new param (you can draw inspiration from how we test
minified
in test_docling_doc.py).
@@ -3885,6 +3885,7 @@ def export_to_doctags( # noqa: C901 | |||
add_table_cell_location: bool = False, | |||
add_table_cell_text: bool = True, | |||
minified: bool = False, | |||
pages: Optional[list[int]] = None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's make it a set since the underlying parameter is also a set.
pages: Optional[list[int]] = None, | |
pages: Optional[set[int]] = None, |
@@ -3903,6 +3904,7 @@ def export_to_doctags( # noqa: C901 | |||
:param # table specific flagsadd_table_cell_location: bool | |||
:param add_table_cell_text: bool: (Default value = True) | |||
:param minified: bool: (Default value = False) | |||
:param pages: list[int]: (Default value = None) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:param pages: list[int]: (Default value = None) | |
:param pages: set[int]: (Default value = None) |
Add parameter to export only certain pages to doctors from a Docling document