Contents
Asciinema
Description
This macro allows to attach asciinema cast-files to a page and play them. Maybe you like it, too.
Based on and inspired by: https://github.com/asciinema/asciinema-player
The github page also documents all the asciinema-player options. (I just snake_cased the options for the plugin).
Installation
- Drop the latest release (.js+.css) of the github-repo "asciinema/asciinema-player" into your static files (probably into: "/usr/share/moin/htdocs/asciinema").
- Drop the macro in your site-specific "data/plugin/macro" directory.
- Restart server.
- Attach .cast file to site.
- Use macro.
Download & Release Notes
Download |
Release Version |
Moin Version |
Release Notes |
1.0 |
1.9 (maybe earlier) |
|
Usage
All options and their order:
<<Asciinema(filename, pagename, theme, cols, rows, autoplay, preload, loop, start_at, speed, poster, font_size, title, author, author_url, author_img_url)>>
Possible values of options
cols=([80]|Num) rows=([24]|Num) font-size=([small]|medium|big|Num(px,em,…) poster=(npt:mm:ss|"data:text/plain,Poster text") theme=([asciinema]|tango|solarized-dark|solarized-light|monokai)
Example
You can leave out or reorder options if you use assignments (key=value) in the macro call.
<<Asciinema(demo.cast, theme="asciinema", cols=80, rows=24, autoplay=yes, preload=yes, loop=yes, start_at="00:03", speed=2, poster="npt:3", font_size="small", title="Asciinema Demo", author="Name of the Author", author_url="https://moinmo.in/MacroMarket/Asciinema", author_img_url="https://moinmo.in/favicon.ico")>>
Copyright
MoinMoin Asciinema-Macro: Copyright © 2011-2018 Tobias Stein. GPLv2 or later
Asciinema: Copyright © 2011-2018 Marcin Kulik. All code is licensed under the Apache License, Version 2.0. See LICENSE file for details.
License
MoinMoin Asciinema-Macro: GPLv2 or later
Asciinema: All code is licensed under the Apache License, Version 2.0. See LICENSE file for details.
Bugs
- None known so far.
- I'm not so sure about, if the options "author_url", "author_img_url" are exploitable in some way maybe by XSS …