asciinema / asciicast2gif

Generate GIF animations from asciicasts (asciinema recordings)
MIT License
1.21k stars 82 forks source link

Height overflow #57

Closed AuHau closed 2 years ago

AuHau commented 5 years ago

I have bit longer cast (here), that I tried to convert, but I wanted to limit the height of resulting GIF so I used the -h parameter. Unfortunately the resulted GIF trims the part that overflow the limited window.

I would expect that the tool will imitate terminal window behaviour where when the prompt reaches bottom of the window, it will start "push out" the oldest entries up and from the window view box.

Is there some way to make this happen?

mathieu-aubin commented 5 years ago

Wouldnt it help to modify your cast file to the desired size and then try conversion?

AuHau commented 5 years ago

Hmm that did not occur to me, but how do I do that? I checked the asciinema help and did not find any way how to constrain the height...

AuHau commented 5 years ago

Hmm I figured out that resizing the terminal do the trick.

But I still believe that it is sort of a bug and should be at least documented.

mathieu-aubin commented 5 years ago

From what i can read - altho yes i believe its not entirely clear - the readme uses the word « clip » rather than « wrap » or similar.

Does it make sense that « clip » would be litteral in this situation? You are more than welcome to submit a pr and i am certain that others will benefit from it.

@sickill any words on this?

AuHau commented 5 years ago

Hmmm as a non-native speaker, this might be then short-coming from my side. I would maybe then propose instead of "clip" use word "crop".

"Crop" is a quiet standard term in many graphical editors which describes this sort of behavior and hence could be better understood. If you will agree, I am happy to provide PR for this change.

ku1ik commented 2 years ago

IMO both "clip" and "crop" are usually understood as something is cut off, which is different behaviour than what you expected (resizing of the virtual terminal). One way to change the virtual terminal size is to edit the .cast file and change the width / height attr to e.g. a lower value. This will make the virtual terminal used for rendering smaller, as if you were recording your session in a smaller terminal window in the first place.