Open dhimmel opened 5 years ago
That is a great suggestion - currently this is not implemented but shouldn’t be to hard to change that.
We would need to
accept a —speed flag, default it to 1
use parseFloat to parse the input flag, catch NaN or <=0 inputs
pass it to svg-term here: https://github.com/marionebl/svg-term-cli/blob/fcedbdb2dc5f8b21b8ff6017ab4ced7b3878e8d5/src/cli.ts#L226-L237
in svg-term: divide the animation-duration by the specified speed https://github.com/marionebl/svg-term/blob/d376d203cb331e34d152aeeb064eb0a430c164bf/src/index.tsx#L120-L125
Want to lend a hand?
Hey @marionebl thanks for the straightforward explanation of how to implement this. I have little JS experience, but this seems like a good opportunity for me to learn if you're willing to review / help if I get stuck.
Before I get started, would you mind adding a LICENSE.md
file (example) to the repo with the MIT License text? The MIT license terms require
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
Before I get started, would you mind adding a LICENSE.md file (example) to the repo with the MIT License text? The MIT license terms require
@dhimmel Thanks for the reminder, added it via https://github.com/marionebl/svg-term-cli/commit/fcedbdb2dc5f8b21b8ff6017ab4ced7b3878e8d5.
[...] I have little JS experience, but this seems like a good opportunity for me to learn if you're willing to review / help if I get stuck.
I'm happy to help and unblock you during the process 👍
@dhimmel let me know if you need any help with this. I'm a javascript beginner as well but needed this feature today so I'm happy to contribute.
I was looking forward to trying this out, but just haven't had the time and it's been a few weeks... So I'd say go ahead and if you make the enhancement that's great, but if not maybe I'll find time in the future. Cheers
On Sun, Oct 28, 2018, 2:57 AM Benjamin Lee notifications@github.com wrote:
@dhimmel https://github.com/dhimmel let me know if you need any help with this. I'm a javascript beginner as well but needed this feature today so I'm happy to contribute.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/marionebl/svg-term-cli/issues/36#issuecomment-433681355, or mute the thread https://github.com/notifications/unsubscribe-auth/ABEOBx_8EpH8XRY2Hm7g2wYikEi_TV4Fks5upVVCgaJpZM4XMErn .
in svg-term: divide the animation-duration by the specified speed https://github.com/marionebl/svg-term/blob/d376d203cb331e34d152aeeb064eb0a430c164bf/src/index.tsx#L120-L125
@marionebl I tried your suggestions, but this ^ seems to only create animation from the first duration/playback-speed
of the recording. Do you have other suggestions for this?
As a workaround, you can re-record the cast
asciinema rec final -c "asciinema play recording --speed 2"
And thereafter, use svg-term
to compile
svg-term --in final --out final.svg
We're using this utility to create animated SVGs of a terminal recording, as per https://github.com/greenelab/manubot/issues/63 and https://github.com/greenelab/manubot/pull/64.
Is it possible to change the speed (i.e. increase / decrease framerate) of the SVG export? I am looking for an equivalent of asciinema's
speed
parameter, e.g. https://asciinema.org/a/205085?speed=2.