spring-io / antora-extensions

Antora extensions developed for the Spring docs.
Apache License 2.0
7 stars 6 forks source link

Asciinema extension #13

Closed jvalkeal closed 1 year ago

jvalkeal commented 1 year ago

Animated picture is worth thousand words. In spring-shell we've been using asciinema to create cast files which we've then converted to svg and imported those into docs. Tools from https://github.com/marionebl/svg-term-cli and https://asciinema.org.

It's annoying to do this conversion manually so it'd be nice if we can have cast files automatically converted to svg files. I've been playing with this and to get started a simple extension translating a named block(asciinema) into svg can be done.

[asciinema]
----
include::example$asciinemasample.cast[]
----

Library behind cli is https://github.com/marionebl/svg-term.

jvalkeal commented 1 year ago

I looked this and while it kinda did work I'd abandon cast to svg conversion. Mostly because these libs are more or less not maintained and there's too much of a risk pulling all js stuff into a build.

Instead I'm trying to see what's a process to support asciinema player directly which have matured greatly in recent two years.