marionebl / svg-term-cli

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

Simplify recording a command #7

Closed sindresorhus closed 6 years ago

sindresorhus commented 6 years ago

My most common use-case for this CLI is to record a command with asciinema and pass it to svg-term-cli without saving the recording. Would be nice if that was as simple as using a flag here.

Currently, I have to do:

temp_file=$(mktemp); asciinema rec $temp_file --command="node example.js" --quiet; cat $temp_file | svg-term --out=screenshot.svg

Would be nicer to be able to do:

svg-term --command="node example.js" --out=screenshot.png

svg-term-cli would then just spawn asciinema or tell the user to brew install asciinema if it's not installed.

marionebl commented 6 years ago

May become easier when https://github.com/asciinema/asciinema/issues/255 gets resolved

marionebl commented 6 years ago

The prerelease versions 2.1.0-x provide a --command flag as proposed, progress is tracked here: https://github.com/marionebl/svg-term-cli/pull/8

marionebl commented 6 years ago

Released on @latest as of 2.1.0