charmbracelet / vhs

Your CLI home video recorder πŸ“Ό
MIT License
15.31k stars 261 forks source link

automatically output alt text #42

Closed bnb closed 2 years ago

bnb commented 2 years ago

It would be super awesome for normalizing accessibility if vhs was able to automatically generate plaintext descriptions of what's happening in a recording file from the .tape file.

maaslalani commented 2 years ago

@bnb can you try:

Output alt-text.txt

This will generate a plain text version of whats happening in the GIF (without any ANSI sequences and stuff).

It will generate what the terminal state looks like (in plain text) after each command is run.

maaslalani commented 2 years ago

@bnb When using Output alt-text.txt, VHS generates a fully plain text version of the terminal output.

Output examples/glow/glow-simple.ascii
Output examples/glow/glow-simple.gif

Set Width 1000
Set Height 1050

Type "glow"
Enter
Sleep 1s
Enter
Sleep 1s
Escape
Sleep 1s
Type "q"
Sleep 1s

For example consider this GIF:

The glow-simple.ascii is output:

> glow

────────────────────────────────────────────────────────────────────────────────
> glow

────────────────────────────────────────────────────────────────────────────────

    Glow

   9 local β”‚ 14 stashed β”‚ 3 news

 β”‚ CarrotCake.md
 β”‚ 2 days ago

   StewedPeaches.md
   2 days ago

   notes/Currywurst.md
   2 days ago

   notes/KΓ€sewurst.md
   2 days ago

   notes/SpΓ€tzle.md
   2 days ago

   notes/Weißwurst.md
   2 days ago

   to-do/Okonomiyaki.md
   2 days ago

   β€’β€’

   tab section β€’ h/l ←/β†’ page β€’ / find β€’ s stash β€’ …

────────────────────────────────────────────────────────────────────────────────

   Carrot Cake

  Carrot cake is delicious. And, it takes only 20 minutes to
  make!

  Here is the recipe:

  β€’ Carrots
  β€’ Cake

  Tada!

────────────────────────────────────────────────────────────────────────────────

   Carrot Cake

  Carrot cake is delicious. And, it takes only 20 minutes to
  make!

  Here is the recipe:

  β€’ Carrots
  β€’ Cake

  Tada!

 Glow  CarrotCake.md                              100%  ? Help
────────────────────────────────────────────────────────────────────────────────

   Carrot Cake

  Carrot cake is delicious. And, it takes only 20 minutes to
  make!

  Here is the recipe:

  β€’ Carrots
  β€’ Cake

  Tada!

 Glow  CarrotCake.md                              100%  ? Help
────────────────────────────────────────────────────────────────────────────────

    Glow

   9 local β”‚ 14 stashed β”‚ 3 news

 β”‚ CarrotCake.md
 β”‚ 2 days ago

   StewedPeaches.md
   2 days ago

   notes/Currywurst.md
   2 days ago

   notes/KΓ€sewurst.md
   2 days ago

   notes/SpΓ€tzle.md
   2 days ago

   notes/Weißwurst.md
   2 days ago

   to-do/Okonomiyaki.md
   2 days ago

   β€’β€’

   tab section β€’ h/l ←/β†’ page β€’ / find β€’ s stash β€’ …

────────────────────────────────────────────────────────────────────────────────
> glow

────────────────────────────────────────────────────────────────────────────────
> glow

  Thanks for using Glow!

>

────────────────────────────────────────────────────────────────────────────────
maaslalani commented 2 years ago

Please feel free to reopen this issue if I've misunderstood what you're trying to say!