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
Add argument --filter to converter #59
Add argument --filter to converter #59
Conversation
Allows conversions where no filter can be auto-detected. E.g. no filter is auto-detected for HTML→Docx conversion, but the "Office Open XML Text" filter supports it. |
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.
Other than that this looks good!
tests/test_integration.py
Outdated
try: | ||
converter.main() | ||
except RuntimeError as err: | ||
assert "Office Open XML Text" in f"{err}" |
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.
Using f"{err}" here seems needlessly obscure, you should be able to just check this directly in the exception arguments, I think?
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.
Also black complains so if you could run black on everything that would be great!
Allows explicit selection of which export filter to use, skipping auto-detection based on filenames. If the given filter is not recognized, show a list of available filters. Refer to LibreOffice Help for an overview of available filters: https://help.libreoffice.org/latest/en-US/text/shared/guide/convertfilters.html
4ddf294
to
b37e04b
Compare
I'm unable to see why the build step failed - any thoughts? |
It errors out because it can't install version 1.1build1 of dist-info, and I have no idea why it would try to install dist-info at all. So that's all very strange. |
The build job failed because an Ubuntu-packaged version of dist-info with an invalid version tag was used.
Apparently, 1.1 does not exist. Use 1.0 instead.
Adding it to setup.cfg apparently did not work. Add workaround in build job instead.
This reverts commit bbe6069.
This reverts commit 66f3290.
This reverts commit ca54845.
I give up on fixing the build job. I can't imagine it has anything to do with any of the changes in this PR anyway. |
Yeah, that was a mess. Fixed that and merged. Thanks! |
Allows explicitly specifying which export filter to use, rather than relying on auto-detection.
I needed to specify "Office Open XML Text" as filter to be able to convert HTML to Docx.