Update README regarding commandline interface

This commit is contained in:
ChaoticByte 2025-01-31 20:27:14 +01:00
parent d29f14c7c9
commit e40ab18683
No known key found for this signature in database

View file

@ -101,7 +101,22 @@ You can run Fragmented from the commandline or scripts.
### Usage ### Usage
``` ```
./Fragmented cmd --shader PATH [--load-image PATH] ~ Fragmented CLI ~
-================-
Usage:
./Fragmented <command> <args...>
Commands:
help
| Shows this help text.
apply --shader PATH [--load-image PATH]
| Applies a shader file.
--shader PATH The path to the shader --shader PATH The path to the shader
--output PATH Where to write the resulting image to. --output PATH Where to write the resulting image to.
@ -110,11 +125,13 @@ You can run Fragmented from the commandline or scripts.
load directive of the shader file. load directive of the shader file.
Passing a folder activates batch mode. Passing a folder activates batch mode.
(optional) (optional)
dump-shaderlib
| Dumps the shaderlib into the current directory.
``` ```
You can also run `./Fragmented cmd help` to show the help message.
### Batch Mode ### Batch Mode
Since version v8.0, you can pass a directory to `--load-image` and `--output`. This will process all images in the input directory and write the output to the output directory. Since version v8.0, you can pass a directory to `--load-image` and `--output`. This will process all images in the input directory and write the output to the output directory.
@ -124,11 +141,11 @@ Since version v8.0, you can pass a directory to `--load-image` and `--output`. T
#### Examples #### Examples
``` ```
./Fragmented cmd --shader ./examples/oklab.gdshader --output ./output.png ./Fragmented apply --shader ./examples/oklab.gdshader --output ./output.png
``` ```
``` ```
./Fragmented cmd --shader ./examples/oklab.gdshader --load-image ~/Pictures/test.png --output ./output.png ./Fragmented apply --shader ./examples/oklab.gdshader --load-image ~/Pictures/test.png --output ./output.png
``` ```
## Known Issues ## Known Issues