Skip to content
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 alias for filter-options #94

Merged
merged 1 commit into from
Oct 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

- Made the --daemon parameter work again

- Added a --filter-option alias for --filter-options


2.0b1 (2023-08-18)
------------------
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ Contributors
* Alessandro Filippini, https://github.com/AlePini
* Dmitry Shachnev, https://github.com/mitya57
* Socheat Sok, https://github.com/socheatsok78
* BohwaZ, https://github.com/bohwaz
8 changes: 7 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,20 @@ Unoconvert
* `outfile`: The path to the converted file (use - for stdout)
* `--convert-to`: The file type/extension of the output file (ex pdf). Required when using stdout
* `--filter`: The export filter to use when converting. It is selected automatically if not specified.
* `--filter-options`: Options for the export filter, in name=value format. Use true/false for boolean values.
* `--filter-option`: Pass an option for the export filter, in name=value format. Use true/false for boolean values. Can be repeated for multiple options.
* `--filter-options`: Alias for `--filter-option`.
* `--host`: The host used by the server, defaults to "127.0.0.1"
* `--port`: The port used by the server, defaults to "2002"
* `--host-location`: The host location determines the handling of files. If you run the client on the
same machine as the server, it can be set to local, and the files are sent as paths. If they are
different machines, it is remote and the files are sent as binary data. Default is auto, and it will
send the file as a path if the host is 127.0.0.1 or localhost, and binary data for other hosts.

Example for setting PNG width/height::

unoconvert infile.odt outfile.png --filter-options PixelWidth=640 --filter-options PixelHeight=480


Unocompare
~~~~~~~~~~

Expand Down
4 changes: 3 additions & 1 deletion src/unoserver/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,11 @@ def converter_main():
)
parser.add_argument(
"--filter-options",
"--filter-option",
default=[],
action="append",
help="Options for the export filter, in name=value format. Use true/false for boolean values.",
help="Pass an option for the export filter, in name=value format. Use true/false for boolean values. "
"Can be repeated for multiple options.",
)
parser.add_argument(
"--update-index",
Expand Down