From 6e76729ce899e2f32af8335aff530622d9a8dbe4 Mon Sep 17 00:00:00 2001 From: Josh McKinney Date: Wed, 24 Jan 2024 08:22:46 -0800 Subject: [PATCH] chore: move example vhs tapes to a folder (#867) --- examples/README.md | 2 +- examples/{ => vhs}/barchart.tape | 0 examples/{ => vhs}/block.tape | 0 examples/{ => vhs}/calendar.tape | 0 examples/{ => vhs}/canvas.tape | 0 examples/{ => vhs}/chart.tape | 0 examples/{ => vhs}/colors.tape | 0 examples/{ => vhs}/colors_rgb.tape | 0 examples/{ => vhs}/constraints.tape | 0 examples/{ => vhs}/custom_widget.tape | 0 examples/{ => vhs}/demo.tape | 0 examples/{ => vhs}/demo2-destroy.tape | 0 examples/{ => vhs}/demo2-social.tape | 0 examples/{ => vhs}/demo2.tape | 0 examples/{ => vhs}/docsrs.tape | 0 examples/{ => vhs}/flex.tape | 0 examples/{ => vhs}/gauge.tape | 0 examples/{ => vhs}/generate.bash | 10 +++++----- examples/{ => vhs}/hello_world.tape | 0 examples/{ => vhs}/inline.tape | 0 examples/{ => vhs}/layout.tape | 0 examples/{ => vhs}/list.tape | 0 examples/{ => vhs}/modifiers.tape | 0 examples/{ => vhs}/panic.tape | 0 examples/{ => vhs}/paragraph.tape | 0 examples/{ => vhs}/popup.tape | 0 examples/{ => vhs}/ratatui-logo.tape | 0 examples/{ => vhs}/scrollbar.tape | 0 examples/{ => vhs}/sparkline.tape | 0 examples/{ => vhs}/table.tape | 0 examples/{ => vhs}/tabs.tape | 0 examples/{ => vhs}/user_input.tape | 0 32 files changed, 6 insertions(+), 6 deletions(-) rename examples/{ => vhs}/barchart.tape (100%) rename examples/{ => vhs}/block.tape (100%) rename examples/{ => vhs}/calendar.tape (100%) rename examples/{ => vhs}/canvas.tape (100%) rename examples/{ => vhs}/chart.tape (100%) rename examples/{ => vhs}/colors.tape (100%) rename examples/{ => vhs}/colors_rgb.tape (100%) rename examples/{ => vhs}/constraints.tape (100%) rename examples/{ => vhs}/custom_widget.tape (100%) rename examples/{ => vhs}/demo.tape (100%) rename examples/{ => vhs}/demo2-destroy.tape (100%) rename examples/{ => vhs}/demo2-social.tape (100%) rename examples/{ => vhs}/demo2.tape (100%) rename examples/{ => vhs}/docsrs.tape (100%) rename examples/{ => vhs}/flex.tape (100%) rename examples/{ => vhs}/gauge.tape (100%) rename examples/{ => vhs}/generate.bash (80%) rename examples/{ => vhs}/hello_world.tape (100%) rename examples/{ => vhs}/inline.tape (100%) rename examples/{ => vhs}/layout.tape (100%) rename examples/{ => vhs}/list.tape (100%) rename examples/{ => vhs}/modifiers.tape (100%) rename examples/{ => vhs}/panic.tape (100%) rename examples/{ => vhs}/paragraph.tape (100%) rename examples/{ => vhs}/popup.tape (100%) rename examples/{ => vhs}/ratatui-logo.tape (100%) rename examples/{ => vhs}/scrollbar.tape (100%) rename examples/{ => vhs}/sparkline.tape (100%) rename examples/{ => vhs}/table.tape (100%) rename examples/{ => vhs}/tabs.tape (100%) rename examples/{ => vhs}/user_input.tape (100%) 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