Skip to content

Commit

Permalink
feat: demo.tape timing
Browse files Browse the repository at this point in the history
  • Loading branch information
joshka committed Sep 17, 2023
1 parent cd4626a commit cccf2ad
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 29 deletions.
3 changes: 2 additions & 1 deletion README.md
@@ -1,4 +1,5 @@
![Demo of Ratatui](https://repository-images.githubusercontent.com/600886023/96016d23-3bdd-4611-8c03-2e8b5836f900)
![Demo of
Ratatui](https://github.com/ratatui-org/ratatui/blob/ed851fb5bb3673b3213d1511e77be82fa6719ea0/examples/demo2-noborders.gif?raw=true)
<!-- See RELEASE.md for instructions on creating the demo gif --->

<div align="center">
Expand Down
2 changes: 1 addition & 1 deletion examples/README.md
Expand Up @@ -8,7 +8,7 @@ occur in a terminal.

## Demo

This is the demo example from the main README. It is available for each of the backends. Source:
This is the previous demo example from the main README. It is available for each of the backends. Source:
[demo.rs](./demo/).

```shell
Expand Down
77 changes: 51 additions & 26 deletions examples/demo2.tape
Expand Up @@ -2,46 +2,71 @@
# To run this script, install vhs and run `vhs ./examples/demo.tape`
Output "target/demo2.gif"
Set Theme "OceanicMaterial"
# Github social preview size (1280x640 with 80px padding)
# Set Width 1280
# Set Height 640
# Github social preview size (1280x640 with 80px padding) and must be < 1MB
# This puts some constraints on the amount of interactivity we can do.
Set Width 1280
Set Height 640
Set Padding 80
# Without the padding for README.md, etc.
Set Width 1120
Set Height 480
Set Padding 0
# Set Width 1120
# Set Height 480
# Set Padding 0
Hide
Type "cargo run --example demo2"
Enter
Sleep 2s
Show
# About screen
Sleep 1s
Down # Red eye
Sleep 0.35s
Down # black eye
Sleep 0.35s
Down # red eye
Sleep 0.35s
Down # black eye
Sleep 1.5s
Sleep 3.5s
Down # Red eye
Sleep 0.35s
Down # black eye
Sleep 0.35s
Down # red eye
Sleep 0.35s
Sleep 0.5s
Down # black eye
Sleep 1.5s
Sleep 1s
Tab
# Email
Sleep 5s
Down
Sleep 1s
Down
Sleep 1s
Down
Sleep 1s
Down
Sleep 2s
Tab
# Trace route
Sleep 5s
Tab
# Misc
Sleep 5s
Sleep 1s
Down
Sleep 0.5s
Down
Sleep 0.5s
Down
Sleep 0.5s
Down
Sleep 0.5s
Down
Sleep 0.5s
Down
Sleep 0.5s
Down
Sleep 1s
Tab
# Recipe
Sleep 1s
Down
Sleep 0.5s
Down
Sleep 0.5s
Down
Sleep 0.5s
Down
Sleep 0.5s
Down
Sleep 0.5s
Down
Sleep 0.5s
Down
Sleep 1s
Tab
# Misc
Sleep 5s
Tab
2 changes: 1 addition & 1 deletion src/lib.rs
Expand Up @@ -3,7 +3,7 @@
//! [ratatui](https://github.com/ratatui-org/ratatui) is a library that is all about cooking up terminal user
//! interfaces (TUIs).
//!
//! ![Demo](https://vhs.charm.sh/vhs-tF0QbuPbtHgUeG0sTVgFr.gif)
//! ![Demo](https://github.com/ratatui-org/ratatui/blob/ed851fb5bb3673b3213d1511e77be82fa6719ea0/examples/demo2-noborders.gif?raw=true)
//!
//! # Get started
//!
Expand Down

0 comments on commit cccf2ad

Please sign in to comment.