Code Monkey home page Code Monkey logo

Comments (2)

cirocosta avatar cirocosta commented on May 22, 2024 2

Hey @cookiengineer , as @nbedos pointed out, maybe it's indeed better to not go for that in the final svg output, but instead, in the middle (the cast file).

Wanting to tweak my recordings, I created asciinema-edit - it takes a cast (which termtosvg produces) and then performs a transformation that you might want.

For instance, in your case, you could open the cast with a terminal, remove the pieces you find either too repetitive and then later fix the timestamps with asciinema-edit quantize.

I hope it helps.

thx!

from termtosvg.

nbedos avatar nbedos commented on May 22, 2024

The replay function takes a parameter named min_frame_duration which enforces a minimum duration for each frame. You could set it to say 0.100 seconds to reduce the number of frames and the size of the animation. This parameter can't be set on the command line though, you would have to modify the code.

def replay(records, from_pyte_char, override_theme, fallback_theme, min_frame_duration=0.001, last_frame_duration=1):

You might also want to check out the output of termtosvg record. It's the raw output of the recording with timing information (before it is aggregated by replay())

There is also a lot of duplicated information in the SVG animation itself. It does not help reduce the file size.

from termtosvg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.