Live data from Hacker News

Show HN: Termtosvg – Record terminal sessions as SVG animations

github.com

41–50 of 84 posts

Re: Show HN: Termtosvg – Record terminal sessions as SVG animations

#41
post #37
post #31

Earlier quoted context omitted.

OP here. Sadly, SVG file size is not as small as I'd want it to be. The main problem is that a few attributes (x, y and lengthAdjust) have to be repeated on each text tag to position each character at the right place. I can't use CSS for this since those attributes are not styling attributes. Using SVG definitions efficiently to avoid duplication is also not as easy as I thought it would be. I have a few ideas on how…

What about embedding a mini ECMAScript player and apply values to the DOM on the fly ?

I'd rather stick to plain SVG for the animation part, in case ECMAScript is stripped from the SVG for security reasons. ECMAScript might be worth adding for additional features though (play/pause, progress bar, frame seeking...)

Re: Show HN: Termtosvg – Record terminal sessions as SVG animations

#42
post #38

Cool. It is not very clear from the description so I will ask: What are the advantages over "asciinema"? At the moment I only see that it does not require a specific player (javascript for the web), on the other hand it seems you are not able to pause the "execution".

Yes, there is no dependency on a specific player.

The output is an SVG animation so you can modify it as you want. For example you could add a last frame with the logo of your project.

Not being able to pause the animation is annoying, I will probably add some way to it with ECMAScript in the future.

Re: Show HN: Termtosvg – Record terminal sessions as SVG animations

#43

Earlier quoted context omitted.

I'm pretty sure no browser supports 100% of SVG spec.

Facts like these always drives me crazy... these companies (namely Microsoft, but I guess Google/Mozilla as well a bit) have huge teams and resources, and can't build a browser that follows specs that have been hammered out only after years of work.

There's a reason why some bodies ship a reference implementation with the standard. Sometimes what's specified is infeasible, or even impossible (if the spec contradicts itself) to implement.

Re: Show HN: Termtosvg – Record terminal sessions as SVG animations

#44
post #38

Cool. It is not very clear from the description so I will ask: What are the advantages over "asciinema"? At the moment I only see that it does not require a specific player (javascript for the web), on the other hand it seems you are not able to pause the "execution".

I think standalone is the most outstanding advantage. Many recordings of terminal are using asciiema or youtube, those links in a github readme.md file is a static screenshot instead of animated one, you have to click the link to watch the animation.

You can view the animation without javascript enabled, and it's media type is image, you don't even need to convert it to base64 to use it. It's like gif but relatively smaller and with more colors, and it's Scalable Vector.

Re: Show HN: Termtosvg – Record terminal sessions as SVG animations

#45

This is extremely cool, and will be useful. One bug I noticed is that it seems to break virtualenv which is made with --system-site-packages its not finding the modules

Thanks! I will look into the virtualenv problem, but if you can spare the time could you please open an issue and include the exact steps to reproduce the error?

https://github.com/nbedos/termtosvg/issues/new

Re: Show HN: Termtosvg – Record terminal sessions as SVG animations

#46
post #32

Earlier quoted context omitted.

W3C should have a rule that a web browser which does not intend to support the standard may not call itself a "web browser".

I'm pretty sure no browser supports 100% of SVG spec.

That doesn’t mean they can’t be expected to support a meaningful subset. Honestly I don’t even know what they’re thinking here: they have no real alternative.

Re: Show HN: Termtosvg – Record terminal sessions as SVG animations

#47
post #43

Earlier quoted context omitted.

Facts like these always drives me crazy... these companies (namely Microsoft, but I guess Google/Mozilla as well a bit) have huge teams and resources, and can't build a browser that follows specs that have been hammered out only after years of work.

There's a reason why some bodies ship a reference implementation with the standard. Sometimes what's specified is infeasible, or even impossible (if the spec contradicts itself) to implement.

But what if the other vendors do have an implementation?

Re: Show HN: Termtosvg – Record terminal sessions as SVG animations

#48
post #46

Earlier quoted context omitted.

I'm pretty sure no browser supports 100% of SVG spec.

That doesn’t mean they can’t be expected to support a meaningful subset. Honestly I don’t even know what they’re thinking here: they have no real alternative.

[deleted]

Re: Show HN: Termtosvg – Record terminal sessions as SVG animations

#49
post #47
post #43

Earlier quoted context omitted.

There's a reason why some bodies ship a reference implementation with the standard. Sometimes what's specified is infeasible, or even impossible (if the spec contradicts itself) to implement.

But what if the other vendors do have an implementation?

This is in the context of an upstream comment (softly) claiming that now browser has 100% SVG support.

I think sometimes this is because the full spec is infeasible to implement, at least in a performant manner, and rather than implement a fully compliant but slow mess, they implement a partially compliant but usefully fast subset.

Providing a reference implementation allows a standards body to learn early that what they are speccing is counterproductive in one manner or another, prior to releasing it and getting vendor feedback.

Re: Show HN: Termtosvg – Record terminal sessions as SVG animations

#50
post #49
post #47

Earlier quoted context omitted.

But what if the other vendors do have an implementation?

This is in the context of an upstream comment (softly) claiming that now browser has 100% SVG support. I think sometimes this is because the full spec is infeasible to implement, at least in a performant manner, and rather than implement a fully compliant but slow mess, they implement a partially compliant but usefully fast subset. Providing a reference implementation allows a standards body to learn early that what…

Ok, but it's not like Microsoft can't discuss with W3C any problems (in their view) in the standard.

Anyway, I totally agree that there should be a reference implementation. Imho, preferably in a purely functional language, to keep it as clean as possible.

Post reply on HN