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,20 +101,37 @@ You can run Fragmented from the commandline or scripts.
### 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
--output PATH Where to write the resulting image to.
In batch mode, this must be a folder.
--load-image PATH The path to the image. This will overwrite the
load directive of the shader file.
Passing a folder activates batch mode.
(optional)
dump-shaderlib
| Dumps the shaderlib into the current directory.
--shader PATH The path to the shader
--output PATH Where to write the resulting image to.
In batch mode, this must be a folder.
--load-image PATH The path to the image. This will overwrite the
load directive of the shader file.
Passing a folder activates batch mode.
(optional)
```
You can also run `./Fragmented cmd help` to show the help message.
### 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.
@ -124,11 +141,11 @@ Since version v8.0, you can pass a directory to `--load-image` and `--output`. T
#### 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