Closed mathiasbynens closed 6 years ago
Sure, that is what derhuerst/asciicast-to-svg does.
We'd have to implement this over at marionebl/svg-term.
Could be something like this:
Below src/index.js#L35
const frames = 'frameAt' in options
? frames.filter(frame => frame.stamp === frameAt) // pseudo code
: frames;
<Reel
duration={data.duration}
frameWidth={cast.width}
stamps={data.stamps}
width={data.frames.length * cast.width}
animates={frames.length > 0}
>
frames.map(frame => ...)
Want to to lend a hand? :)
Ping @mathiasbynens (Guess I completed my comment edits after you read it)
Released via 1.1.0
$ yarn global add svg-term-cli@latest
$ svg-term --version
1.1.0
svg-term --cast=3 --out nyancat.svg --frame --from=3000 --to=6000 #1
svg-term --cast=rfS1M5ynKm1hGaBqJYJj0mGCi --out jsvu.svg --frame -at 40000 # 2
Did the --frame
option get removed? It would have been really useful...
Ah never mind, you don't need --frame -at 10
, just --at 10
.
Would it be feasible to extract just a single frame as an SVG?