README: Add Usage

This commit is contained in:
2024-01-14 12:14:10 +01:00
parent cd6b30cf80
commit 5b3b96fb35
2 changed files with 42 additions and 1 deletions

View File

@ -1,4 +1,5 @@
pyinstaller --noconfirm ^ pyinstaller ^
--noconfirm ^
--onefile ^ --onefile ^
--console ^ --console ^
--icon "NONE" ^ --icon "NONE" ^

View File

@ -3,3 +3,43 @@
A standalone [WeasyPrint](https://weasyprint.org/) wrapper for Windows. A standalone [WeasyPrint](https://weasyprint.org/) wrapper for Windows.
# Usage
Synopsis:
```
winziprint [-h] [-v] [-d DIR] [ -D | [-p] [-2] [-e ENCODING] [ - | INPUT [INPUT...] OUTPUT ] ]
```
Command line options:
* `-h`, `--help` - show help message and exit
* `-V`, `--version` - show version and exit
* `-D`, `--daemon` - run as a daemon and expose a named socket
* `-d`, `--directory` - set the working directory
* `-e`, `--encoding` - encoding of the input files
* `-2`, `-double-sided` - pad documents to an event number of pages
* `-p`, `--progress` - show progress updates
Command line arguments:
* `-` - use stdin for retrieving input and output file names (semi-colon-seperated)
* `INPUT` - name of a html input file
* `OUTPUT` - name of a pdf output file
## Normal mode
In normal mode all options, input and output files are passed by command line arguments.
## Batch mode
To activate batch mode `-` has to be passed as only input or output file.
In batch mode all options may be passed as command line arguments. These are used as defaults.
## Server mode
To activate server mode the `-D` flag has to be set.
Keep in mind, that not all command line options may be present.
The protocol is the same as in server mode.