π° See more on the Release Article
β New shortcut syntax
β New target transpilation
β Integrate with others CLI
Changes:
New Supported Format
πΉ State Machine Cat
New Syntax
This new syntax symbols will desugar into several expressions. For best experience, use fmonospaced font with programming ligatures like FiraCode
πΉ Toggle Transition
A <-> B @ Toggle
π will desugar into π
A -> B @ Toggle
A <- B @ Toggle
πΉ Loop Transition
A ->> B @ Loop
// or
B <<- A @ Loop
π will desugar into π
A -> B @ Loop
B -> B @ Loop
πΉ Transient Loop Transition
A >-> B @ Loop
// or
B <-< A @ Loop
π will desugar into π
A -> B
B -> B @ Loop
πΉ Self Transition
Not exactly desugar into multiple expressions but this new syntax can give a clear distinction between normal transition and self transition.
->> B @ Loop
π is same as π
B -> B @ Loop
// or
B <- B @ Loop
CLI (see usage)
Breaking changes
πΉ In subcommand code
, positional argument [DIST]
changes to -o, --output
(cause by a bug in [clap][], probably π€)
πΉ In subcommand code
and repl
, flag --format <target>
must be specified (to avoid favoritism)
New Features
πΉ Add print
command in non-interactive mode (repl
with no --interactive
flag set)
πΉ Add exit
command to close REPL session
πΉ Tweak error prompt color
πΉ In subcommand code
, use special error handle when positional argument <FILE>
is a directory
πΉ Semantic check depend on the output format. For example. --as png
will disable semantic check and instead mark and note the illegal transition.
πΉ Hide empty result when repl -i
piped from stdin (it will not print empty line or comment)
πΉ --output <DIST>
will give an error messages that it must be specified if outputting --as <format>
binary file (e.g --as jpg
)
πΉ --as <format>
will give an error messages if paired with wrong --format <target>
(e.g --format smcat --as boxart
)
πΉ possible values in --as <format>
will be hidden and disabled if certain others CLI not being installed
πΉ Hook to others CLI
In this update, scrap
able to support others formats only if this CLI has been installed:
- smcat
- dot
- graph-easy (as a fallback for some formats if dot not available)
This brings several ability if combined with certain tools, for example: