Option args for other asciinema configurables
wulfgarpro opened this issue · 7 comments
It would be nice if we could pass option args to asciinema2gif that are supported in the GET request to the https://asciinema.org/api/asciicasts/ resource. e.g. speed, tframe, etc.
This would preclude users from having to figure out the ugly GET request syntax with their desired parameters before running the URL by asciinema2gif. i.e. https://asciinema.org/api/asciicasts/88888?t=4&speed=2
Some of them are already supported.
Show me a list with all parameters and how they work, and I’ll work on implementing what’s missing when I have the time.
Here are the options and how they work:
https://github.com/asciinema/asciinema-player#options
Shouldn't be much work to add options for the bulk of them since you've already managed it for some.
Of all of those, the ones I see making sense for this script are:
width
height
startAt
speed
poster
fontSize
However, when trying to add them to a url (like in your example), it seems like the only one that works is speed
.
Do any of the others work for you?
To be honest, speed is probably the most useful.
Here's the json object they're using:
{"speed":2.0,"autoPlay":false,"loop":false,"preload":false,"fontSize":"small","theme":"asciinema","title":"Example session using oh-my-zsh with history-sync plugin","author":"wulfgarpro","authorURL":"/~wulfgarpro","authorImgURL":"//gravatar.com/avatar/2c7844044ac404d3d6bf00ee3e572db6?s=128&d=retro"}
Of the available options mentioned above, here's an example showing the mutable ones:
https://asciinema.org/api/asciicasts/43575?speed=5&loop=true&preload=true&theme=tango
You can see the variables change on the source page for the above url.
Of them startAt, fontSize and autoPlay indeed do not work.
Options such as loop
and preload
do not matter in gif form, anyway, but speed
is definitely something I can see an argument for.
PR at #23.
Agreed. Closing.
Done.