auto-generate ~graphical version of demo?
Edit: This was initially about setting up automation to ensure the sample of demo output in the repo was kept in sync with the real demos/tests. That work's been done, but it might still be nice to have an animated/graphical demo if it adds value and we can readily automate it.
I'd like to better-automate extracting fresh (and sample output code blocks?) demos from the real test suite (there's the cli demo in tests/demo.bats, and the Nix ~integration tests in ci.nix). Mostly so I don't have to either waste time regenerating them every time I push to master, or constantly worry about whether they're out of date.
There's an underlying question about what the ideal form of the demos is. My thinking at the moment is that this is a more-the-merrier proposition, and anything is better than nothing. Main options:
- [x] a static output ~log, ideally with with some form of highlighting, maybe:
- [x] In general, this is done. It's not fancy or HTML, but regen of demos.md has been automated for a while now.
- [x] convert the ansi to html with ansi2html or similar (also want a stylesheet; the default output colors suck)
- [x] the Makefile handles the broad strokes of "automating" this within my normal dev workflows (but we could probably skip this if all of the right outputs were built in CI and published from there?)
- [ ] add a new outputter for the demos that is designed for this (see tests/demo.bash; could change
RESHOLVE_DEMOinto a string and use a switch block for handling.)
- [ ] a graphical format, either like: a slide-show with one slide per test, or a rolling ~screencast-style: svg (preferred) / JS-rendered non-image / gif; potential resources:
- https://github.com/nmattia/niv/blob/b50a0107691487d4948c2078a77afdc0d1f20e8b/default.nix#L293-L307
- https://github.com/garbas/asciinema-scenario
Other potential resources: https://www.r-bloggers.com/2020/04/rendering-your-readme-with-github-actions/