sic
sic copied to clipboard
Add `convert` and `save` to script.
Depends on: #10, #36 Todo: look at possibilities, check what works from a usability standpoint.
Make
-
convert <format>
and -
save <file-path>
part of script.
This might make <out>
from sic <in> <out> <options>
optional.
save example grammar (simplified, depends on os/filesystem):
whitespace = _{ (" " | "\t" | "\n" | "\r\n") }
sep = _{ ";" }
uint = @{ digit+ }
digit = { '0'..'9' }
path = ${ ( ('a'..'z') | ('A'..'Z') | digit | "." )+ }
operation_sequence = _{ (operation ~ sep?)+ }
operation = _{ blur | flip_horizontal | flip_vertical | resize | save }
blur = ${ ^"blur" ~ whitespace ~ uint}
flip_horizontal = { ^"flip_horizontal" }
flip_vertical = { ^"flip_vertical" }
resize = ${ ^"resize" ~ whitespace ~ uint ~ whitespace ~ uint }
save = ${ ^"save" ~ whitespace ~ path }
main = _{ soi ~ operation_sequence ~ eoi }