diff --git a/examples/README.md b/examples/README.md index 1392d462..c49db39a 100644 --- a/examples/README.md +++ b/examples/README.md @@ -328,7 +328,7 @@ Links to images to make them easier to update in bulk. Use the following script the examples to the images branch. (Requires push access to the branch). ```shell -examples/generate.bash +examples/vhs/generate.bash ``` --> diff --git a/examples/barchart.tape b/examples/vhs/barchart.tape similarity index 100% rename from examples/barchart.tape rename to examples/vhs/barchart.tape diff --git a/examples/block.tape b/examples/vhs/block.tape similarity index 100% rename from examples/block.tape rename to examples/vhs/block.tape diff --git a/examples/calendar.tape b/examples/vhs/calendar.tape similarity index 100% rename from examples/calendar.tape rename to examples/vhs/calendar.tape diff --git a/examples/canvas.tape b/examples/vhs/canvas.tape similarity index 100% rename from examples/canvas.tape rename to examples/vhs/canvas.tape diff --git a/examples/chart.tape b/examples/vhs/chart.tape similarity index 100% rename from examples/chart.tape rename to examples/vhs/chart.tape diff --git a/examples/colors.tape b/examples/vhs/colors.tape similarity index 100% rename from examples/colors.tape rename to examples/vhs/colors.tape diff --git a/examples/colors_rgb.tape b/examples/vhs/colors_rgb.tape similarity index 100% rename from examples/colors_rgb.tape rename to examples/vhs/colors_rgb.tape diff --git a/examples/constraints.tape b/examples/vhs/constraints.tape similarity index 100% rename from examples/constraints.tape rename to examples/vhs/constraints.tape diff --git a/examples/custom_widget.tape b/examples/vhs/custom_widget.tape similarity index 100% rename from examples/custom_widget.tape rename to examples/vhs/custom_widget.tape diff --git a/examples/demo.tape b/examples/vhs/demo.tape similarity index 100% rename from examples/demo.tape rename to examples/vhs/demo.tape diff --git a/examples/demo2-destroy.tape b/examples/vhs/demo2-destroy.tape similarity index 100% rename from examples/demo2-destroy.tape rename to examples/vhs/demo2-destroy.tape diff --git a/examples/demo2-social.tape b/examples/vhs/demo2-social.tape similarity index 100% rename from examples/demo2-social.tape rename to examples/vhs/demo2-social.tape diff --git a/examples/demo2.tape b/examples/vhs/demo2.tape similarity index 100% rename from examples/demo2.tape rename to examples/vhs/demo2.tape diff --git a/examples/docsrs.tape b/examples/vhs/docsrs.tape similarity index 100% rename from examples/docsrs.tape rename to examples/vhs/docsrs.tape diff --git a/examples/flex.tape b/examples/vhs/flex.tape similarity index 100% rename from examples/flex.tape rename to examples/vhs/flex.tape diff --git a/examples/gauge.tape b/examples/vhs/gauge.tape similarity index 100% rename from examples/gauge.tape rename to examples/vhs/gauge.tape diff --git a/examples/generate.bash b/examples/vhs/generate.bash similarity index 80% rename from examples/generate.bash rename to examples/vhs/generate.bash index c82bdbb9..31be2927 100755 --- a/examples/generate.bash +++ b/examples/vhs/generate.bash @@ -25,12 +25,12 @@ set -o pipefail # ensure that running each example doesn't have to wait for the build cargo build --examples --features=crossterm,all-widgets -for tape in examples/*.tape; do - gif=${tape/examples\//} - gif=${gif/.tape/.gif} - ~/go/bin/vhs $tape --quiet +for tape_path in examples/vhs/*.tape; do + tape_file=${tape_path/examples\/vhs\//} # strip the examples/vhs/ prefix + gif_file=${tape_file/.tape/.gif} # replace the .tape suffix with .gif + ~/go/bin/vhs $tape_path --quiet # this can be pasted into the examples README.md - echo "[${gif}]: https://github.com/ratatui-org/ratatui/blob/images/examples/${gif}?raw=true" + echo "[${gif_file}]: https://github.com/ratatui-org/ratatui/blob/images/examples/${gif_file}?raw=true" done git switch images git pull --rebase upstream images diff --git a/examples/hello_world.tape b/examples/vhs/hello_world.tape similarity index 100% rename from examples/hello_world.tape rename to examples/vhs/hello_world.tape diff --git a/examples/inline.tape b/examples/vhs/inline.tape similarity index 100% rename from examples/inline.tape rename to examples/vhs/inline.tape diff --git a/examples/layout.tape b/examples/vhs/layout.tape similarity index 100% rename from examples/layout.tape rename to examples/vhs/layout.tape diff --git a/examples/list.tape b/examples/vhs/list.tape similarity index 100% rename from examples/list.tape rename to examples/vhs/list.tape diff --git a/examples/modifiers.tape b/examples/vhs/modifiers.tape similarity index 100% rename from examples/modifiers.tape rename to examples/vhs/modifiers.tape diff --git a/examples/panic.tape b/examples/vhs/panic.tape similarity index 100% rename from examples/panic.tape rename to examples/vhs/panic.tape diff --git a/examples/paragraph.tape b/examples/vhs/paragraph.tape similarity index 100% rename from examples/paragraph.tape rename to examples/vhs/paragraph.tape diff --git a/examples/popup.tape b/examples/vhs/popup.tape similarity index 100% rename from examples/popup.tape rename to examples/vhs/popup.tape diff --git a/examples/ratatui-logo.tape b/examples/vhs/ratatui-logo.tape similarity index 100% rename from examples/ratatui-logo.tape rename to examples/vhs/ratatui-logo.tape diff --git a/examples/scrollbar.tape b/examples/vhs/scrollbar.tape similarity index 100% rename from examples/scrollbar.tape rename to examples/vhs/scrollbar.tape diff --git a/examples/sparkline.tape b/examples/vhs/sparkline.tape similarity index 100% rename from examples/sparkline.tape rename to examples/vhs/sparkline.tape diff --git a/examples/table.tape b/examples/vhs/table.tape similarity index 100% rename from examples/table.tape rename to examples/vhs/table.tape diff --git a/examples/tabs.tape b/examples/vhs/tabs.tape similarity index 100% rename from examples/tabs.tape rename to examples/vhs/tabs.tape diff --git a/examples/user_input.tape b/examples/vhs/user_input.tape similarity index 100% rename from examples/user_input.tape rename to examples/vhs/user_input.tape