Make it easy to generate the relevant files for selfhosting video

It is possible to self-host asciinema videos, but it requires you to do manual steps, that are easy if you know how, but harder the first time, and next to impossible if you have no experience making html.

I propose:

`asciinema --export-html public_html/ my.cast`

This should put the relevant files in public_html and make an index.html.

The index.html should show off the most used options, so instead of the user having to learn the options from the documentation, he has an example that he can simply edit.

The index.html should be the recommended way to host the asciinema recording if you only have access to that dir (e.g. public_html on a shared server). It should include all relevant copyright notices and help people avoid the JavaScript trap (The JavaScript Trap - GNU Project - Free Software Foundation). It could possibly use the ideas from JavaScript License Web Labels - GNU Project - Free Software Foundation

I think every output of such export would differ in the cast file, everything else (including index.html) being pretty much static. With this in mind I’m not sure if it’s worth having it as a functionality of the CLI.

Wouldn’t a ready to use, copy-pastable index.html in the docs be enough? I think a guide somewhere in this section asciinema player - asciinema docs could cover this.

For example:

  1. copy-paste this index.html into a directory with your recording
  2. rename your recording file to whatever-index-html-expects
  3. download js/css of the player from these links and place them in the same directory
  4. (optionally) tweak the player options in the index.html

@ole-tange I just realized you’re the author of GNU parallel :slight_smile: Fantastic tool, thanks for developing it!

1 Like

One of the issues here is copyright: What should be written in the index.html to respect Asciinema’s copyright? What should be done so it also satisfies LibreJS (thus protecting the freedom of other users Setting Your JavaScript Free (GNU LibreJS 7.21))? It might also be good here to give the user the option to license his video under a free license.

If you have never dealt with JS/CSS before then it is simply easier if you get something that works up front: You might know how to copy the index.html from the docs into a file, but you might be surprised how many ways that can go wrong. The same with downloading the JS/CSS files. Here you have the added problem, that links break: If you read old documentation, the URLs may no longer work.

It is along the lines of

And yes, most of the output will be static, which should make this a small change.

By having it as a command it just makes it easier.

(PS: You probably guessed what I am going to use Asciinema for).