Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add convert and save to script. #9

Open
foresterre opened this issue Aug 4, 2018 · 0 comments
Open

Add convert and save to script. #9

foresterre opened this issue Aug 4, 2018 · 0 comments
Labels
C-enhancement Category: enhancements

Comments

@foresterre
Copy link
Owner

foresterre commented Aug 4, 2018

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 }
@foresterre foresterre added the C-enhancement Category: enhancements label Aug 4, 2018
@foresterre foresterre added this to the 0.11.0 milestone Aug 12, 2018
@foresterre foresterre removed this from the 0.11.0 milestone Mar 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: enhancements
Projects
None yet
Development

No branches or pull requests

1 participant