Project

General

Profile

Actions

Task #2414

closed

Wiki gadget for Asciinema files

Added by Beluga Beluga over 6 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Wiki
Target version:
-
Start date:
Due date:
% Done:

0%

Tags:

Description

This summer I made an Asciinema recording of building LibreOffice under Ubuntu. I would like to be able to embed it on our wiki. I believe Asciinema recordings could be useful tutorials for other things down the line (you can copy text from them).

The Asciinema player https://github.com/asciinema/asciinema-player requires two files: asciinema-player.css and asciinema-player.js (.js right before closing the body element).

Then the recording is added in the article like so:
<asciinema-player src="/demo.cast"></asciinema-player>
I hope the markup would be allowed by default and we would not need an additional extension. In the worst case we would have to use https://www.mediawiki.org/wiki/Extension:HTML_Tags

It would appear the .css and .js files could be made available as a gadget (the extension is shipped with MW): https://www.mediawiki.org/wiki/Extension:Gadgets

Actions #1

Updated by Beluga Beluga about 4 years ago

  • Status changed from New to Closed
  • Assignee changed from Dennis Roczek to Beluga Beluga

Good news: this can be closed. I managed to create a widget for playing SVG animations produced by termtosvg https://github.com/nbedos/termtosvg
It is still a work in progress, because for security reasons we don't want JavaScript inside the SVG file (MediaWiki by default blocks such uploads) and this means the original SVG has to be changed in creative ways.

My idea for the next attempt is to embed the y-axis movement data in the SVG as some kind of an element and extract it with a JS function contained in the widget. The current template approach is ugly as I just feed the y-axis data in the widget parameters and for very long recordings it might grow to stupid proportions.

Actions

Also available in: Atom PDF