marionebl / svg-term-cli

Share terminal sessions via SVG and CSS
MIT License
3.48k stars 116 forks source link

Merge all frames (aka one static SVG) #18

Open adius opened 6 years ago

adius commented 6 years ago

Would be cool to be able to merge the whole cast to one static SVG. (similar to https://github.com/misc0110/asciicast2vector)

marionebl commented 6 years ago

Unfortunately asciicast2vector produces SVG that render like this on my machine:

screen shot 2018-01-20 at 23 51 16

I am not quite sure how this should look like - would this new mode render all the frames of an asciicast under each other vertically?

adius commented 6 years ago

No just the final frame when everything has been typed.

adius commented 6 years ago

Well maybe there should be options for both use cases, but I guess just the final frame is the most common.

marionebl commented 6 years ago

Rendering a specific frame is possible with the --at flag:

svg-term --cast=rfS1M5ynKm1hGaBqJYJj0mGCi --window --at=43250 --out=screenshot.svg

Produces:

adius commented 6 years ago

Thanks! I feel like this is such a common use case, it should maybe have it's own flag?

marionebl commented 6 years ago

Some idea what that flag would be and do exactly?

--last  render last frame statically

I am not totally convinced this is worth the effort - you could achieve the very same with --at and very high values.

adius commented 6 years ago

you could achieve the very same with --at and very high values

That's what I thought. Except I misjudged what high values means 😅

Also it's act as documentation that this is even possible. Took me some time to figure out that I can misuse --at. I like your --last proposal 👍 .