Added ability to supply JSON from standard input
This commit is contained in:
17
README.md
17
README.md
@@ -9,13 +9,26 @@ You will need the following packages: `build-essential` `libsdl2-dev` `libsdl2-i
|
||||
Just run `make` and an executable called `trmnl_sdl` should be produced.
|
||||
|
||||
# How to use
|
||||
1. You will need to write a JSON config file.
|
||||
It can either be named `config.json` or you will need to pass it as the first command line parameter to the executable.
|
||||
### General use
|
||||
1. You will need to write a JSON config file named `config.json`.
|
||||
An example structure of the config file can be found in `config_example.json`.
|
||||
You can find more info on the available Widgets and their parameters at the end of this file.
|
||||
2. Run the executable
|
||||
3. Convert the image to a suitable format via an ImageMagick command from below.
|
||||
|
||||
### Different ways to supply JSON
|
||||
1. Default
|
||||
* Command: `./trmnl_sdl`
|
||||
* JSON Used: `config.json`
|
||||
|
||||
2. Specified file
|
||||
* Command: `./trmnl_sdl path/to/json/file.json`
|
||||
* JSON Used: `path/to/json/file.json`
|
||||
|
||||
3. Standard input
|
||||
* Command: `./trmnl_sdl -`
|
||||
* JSON Used: Supplied on the standard input for the process.
|
||||
|
||||
# ImageMagick commands to prepare image for TRMNL device
|
||||
### Convert image without dithering
|
||||
`convert trmnl.png -monochrome -colors 2 -depth 1 -strip png:output.png`
|
||||
|
||||
Reference in New Issue
Block a user