Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for demos via asciicasts (asciinema) #6

Closed
11 of 14 tasks
masukomi opened this issue Oct 12, 2022 · 2 comments
Closed
11 of 14 tasks

add support for demos via asciicasts (asciinema) #6

masukomi opened this issue Oct 12, 2022 · 2 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@masukomi
Copy link
Member

masukomi commented Oct 12, 2022

asciinema is probably the best way to demonstrate the usage of any given command. it's files are stored in asciicast v2 format

  • add support for asciicast_url to the TOML ingestion
    • 100% optional
    • can be a path /foo/bar/baz.cast
    • can be a file protocol path file://foo/bar/baz.cast
      • NO (maybe later) converted to /foo/bar/baz.cast
    • can be an url https://foo/bar/baz.cast
      • expected mime type is application/x-asciicast but we shouldn't enforce that. I'm sure a lot of servers get it wrong.
    • NO: if an asciicast_url is found in a toml it will check if asciinema support has been enabled, and .... ask the user if they want it enabled? ??? or just store the data? just store the data
  • add support for adding .cast files separately
    • clu add path/to/my.cast
    • name must match command already in the db
  • add playback support
    • NO: only supported if asciinema support has been enabled
  • add clu demo <command> functionality (see Playback below)
  • add clu list demos functionality (see Playback below)

Adding Demos

For now, clu add will only support local paths /path/to/my.cast

You can only add a web url via the .toml (for now).

Playback support

No clue how this should work since most commands probably won't have casts.

At the very least there should be an line in the clu show <command> indicating that a "demo" is available.

I'm thinking something like clu demo <command> and it invokes asciinema play /path/to/my.cast if there's a demo (asciicast) for the specified command.

Skipped: However, IF the asciicast_url is an http(s) url it'll just callopen <asciicast_url> and load the web page.

👆 we can add that later.

If there isn't one it should say something like

There's no demo available for . Go here https://example.com/creating_demos.html to learn how to create one.

maybe there's a clu demos command (plural demoS) which lists all the commands that have demos.

I'm open to suggestions .

Side Note / Future Thinking

Once we have support for markdown export we'll be able to link to an asciicast to demonstrate the use of the command.

This will likely have to wait until we have the ability to export a "readme" type page for every command.

I think we're going to end up in a situation where we're basically just generating pages for some static site generator. A custom index and then an individual page for every command. ... would be cool.

@masukomi masukomi added the enhancement New feature or request label Oct 12, 2022
@masukomi masukomi added this to the 2.0.0 milestone Oct 12, 2022
@masukomi masukomi self-assigned this Oct 12, 2022
@masukomi masukomi changed the title add support for asciicasts (asciinema) add support for demos via asciicasts (asciinema) Oct 12, 2022
@masukomi
Copy link
Member Author

Work for this is happening in the asciinema branch, but beware. I may force push at any time and break its history.

@masukomi
Copy link
Member Author

masukomi commented Nov 6, 2022

I believe this got mushed into the tags work and came in via 1650dbf

will be released in v2

@masukomi masukomi closed this as completed Nov 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant