-
-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
273 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
> [!IMPORTANT] | ||
> Certain MP3 and MP4 files in this directory, including any derivatives, are subject to the [Artlist license](LICENSE.pdf). | ||
> This license is valid for the atmos project. | ||
> Please ensure you comply with its terms when using or distributing these files. |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
#!/usr/bin/env bash | ||
set -euo pipefail | ||
|
||
# --------------------------------------------------------------------- | ||
# build.sh | ||
# Executes VHS from the root of the git repository | ||
# Converts tapes/*.tape to mp4/*.mp4, processes scenes, and generates gifs | ||
# --------------------------------------------------------------------- | ||
|
||
# Resolve absolute paths for key directories | ||
REPO_ROOT="$(git rev-parse --show-toplevel)" | ||
TAPES_DIR="$REPO_ROOT/demo/recordings/tapes" | ||
SCENES_DIR="$REPO_ROOT/demo/recordings/scenes" | ||
MP4_OUTDIR="$REPO_ROOT/demo/recordings/mp4" | ||
GIF_OUTDIR="$REPO_ROOT/demo/recordings/gif" | ||
AUDIO_FILE="$REPO_ROOT/demo/recordings/background.mp3" | ||
|
||
# Handle "clean" argument | ||
if [[ "${1:-}" == "clean" ]]; then | ||
echo ">> Cleaning up generated files..." | ||
rm -rf "$MP4_OUTDIR" "$GIF_OUTDIR" | ||
exit 0 | ||
fi | ||
|
||
# Ensure output directories exist | ||
echo ">> Ensuring $MP4_OUTDIR and $GIF_OUTDIR exist" | ||
mkdir -p "$MP4_OUTDIR" "$GIF_OUTDIR" | ||
|
||
# 1) Convert each tapes/*.tape => mp4/<basename>.mp4 | ||
echo ">> Step 1: Converting $TAPES_DIR/*.tape to $MP4_OUTDIR/*.mp4 via VHS" | ||
shopt -s nullglob | ||
TAPEFILES=( "$TAPES_DIR"/*.tape ) | ||
if [[ ${#TAPEFILES[@]} -eq 0 ]]; then | ||
echo "No .tape files found in $TAPES_DIR. Exiting." | ||
exit 1 | ||
fi | ||
|
||
for tape in "${TAPEFILES[@]}"; do | ||
base="$(basename "$tape" .tape)" | ||
echo " Processing $tape -> $MP4_OUTDIR/$base.mp4" | ||
(cd "$REPO_ROOT" && vhs "$tape" --output "$MP4_OUTDIR/$base.mp4") | ||
done | ||
|
||
# 2) Process scenes/*.txt | ||
echo ">> Step 2: Building each scene from $SCENES_DIR/*.txt" | ||
SCENE_FILES=( "$SCENES_DIR"/*.txt ) | ||
if [[ ${#SCENE_FILES[@]} -eq 0 ]]; then | ||
echo "No scene text files found in $SCENES_DIR. Skipping scene-building steps." | ||
exit 0 | ||
fi | ||
|
||
for scene_file in "${SCENE_FILES[@]}"; do | ||
scene_name="$(basename "$scene_file" .txt)" | ||
|
||
echo " Scene: $scene_file => $scene_name" | ||
|
||
# Concatenate scene | ||
echo " Concatenating -> $MP4_OUTDIR/$scene_name.mp4" | ||
ffmpeg -f concat -safe 0 -i "$scene_file" -c copy "$MP4_OUTDIR/$scene_name.mp4" | ||
|
||
# Add audio fade | ||
echo " Adding fade audio -> $MP4_OUTDIR/$scene_name-with-audio.mp4" | ||
DURATION="$(ffprobe -v error -show_entries format=duration -of csv=p=0 "$MP4_OUTDIR/$scene_name.mp4")" | ||
FADE_START=$(( ${DURATION%.*} - 5 )) | ||
ffmpeg -i "$MP4_OUTDIR/$scene_name.mp4" -i "$AUDIO_FILE" \ | ||
-filter_complex "[1:a]afade=t=out:st=${FADE_START}:d=5[aout]" \ | ||
-map 0:v -map "[aout]" \ | ||
-c:v copy -shortest -c:a aac "$MP4_OUTDIR/$scene_name-with-audio.mp4" | ||
|
||
# Create GIF | ||
echo " Creating GIF -> $GIF_OUTDIR/$scene_name.gif" | ||
ffmpeg -y -i "$MP4_OUTDIR/$scene_name-with-audio.mp4" \ | ||
-vf palettegen "$GIF_OUTDIR/$scene_name-palette.png" | ||
|
||
ffmpeg -i "$MP4_OUTDIR/$scene_name-with-audio.mp4" \ | ||
-i "$GIF_OUTDIR/$scene_name-palette.png" \ | ||
-lavfi "fps=10 [video]; [video][1:v] paletteuse" \ | ||
-y "$GIF_OUTDIR/$scene_name.gif" | ||
|
||
echo " Done with scene: $scene_name" | ||
done | ||
|
||
echo | ||
echo ">> Done building scenes!" | ||
echo " Segments: $MP4_OUTDIR/<segment>.mp4" | ||
echo " Scenes: $MP4_OUTDIR/<scene>.mp4" | ||
echo " Audio: $MP4_OUTDIR/<scene>-with-audio.mp4" | ||
echo " GIFs: $GIF_OUTDIR/<scene>.gif" | ||
echo | ||
echo "Use './build.sh clean' to remove them." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"window": true, | ||
"border": { | ||
"radius": 8, | ||
"width": 1, | ||
"color": "#515151" | ||
}, | ||
"shadow": { | ||
"blur": 20, | ||
"x": 0, | ||
"y": 10 | ||
}, | ||
"padding": [20, 40, 20, 20], | ||
"margin": "40", | ||
"font": { | ||
"family": "JetBrains Mono", | ||
"size": 14 | ||
}, | ||
"line_height": 1.2 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
file '../mp4/atmos-version.mp4' | ||
file '../mp4/ls-quick-start.mp4' | ||
file '../mp4/atmos-vendor-pull.mp4' | ||
file '../mp4/atmos-tui.mp4' | ||
file '../mp4/atmos-list-components.mp4' | ||
file '../mp4/atmos-docs.mp4' | ||
file '../mp4/atmos-list-stacks.mp4' | ||
file '../mp4/atmos-validate-stacks.mp4' | ||
file '../mp4/atmos-describe-stacks.mp4' | ||
file '../mp4/atmos-workflows.mp4' | ||
file '../mp4/atmos-help.mp4' | ||
file '../mp4/atmos-terraform-help.mp4' | ||
file '../mp4/atmos-outro.mp4' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,17 @@ | ||
# VHS Defaults for Recordings | ||
|
||
#Set Framerate 10 | ||
#Set CursorBlink true | ||
#Set Margin 20 | ||
#Set MarginFill "#674EFF" | ||
Set Framerate 10 | ||
Set CursorBlink true | ||
Set Margin 20 | ||
Set MarginFill "#674EFF" | ||
|
||
#Set Width 1400 | ||
#Set Height 800 | ||
|
||
#Set PlaybackSpeed 1 | ||
Set PlaybackSpeed 3 | ||
|
||
Hide | ||
Type "alias ls='ls --color=force'" Enter Sleep 500ms | ||
Type "cd examples/quick-start-advanced" Sleep 500ms Enter | ||
Type "clear" Enter Sleep 500ms | ||
Show |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
Source demo/defaults.tape | ||
Source demo/recordings/style.tape | ||
|
||
Type "# Let's review the production VPC configuration in the us-east-2 region..." Sleep 500ms Enter | ||
Type "atmos describe stacks --components=vpc --stack=plat-ue2-prod --sections=vars" Sleep 500ms Enter | ||
Sleep 2s | ||
|
||
Type "# Or checkout all VPCs" Sleep 500ms Enter | ||
Type "atmos describe stacks --components=vpc --sections=vars | less" Sleep 500ms Enter | ||
Sleep 1s | ||
|
||
Down 25 Sleep 500ms | ||
Down 25 Sleep 500ms | ||
Down 25 Sleep 500ms | ||
Down 25 Sleep 500ms | ||
|
||
Type "q" Sleep 500ms | ||
Sleep 1s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Source demo/defaults.tape | ||
Source demo/recordings/style.tape | ||
|
||
Type "# Then we can learn about the VPC component" Sleep 500ms Enter | ||
Type "atmos docs vpc" Sleep 500ms Enter | ||
Sleep 2s | ||
Type "q" Sleep 500ms Enter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Source demo/defaults.tape | ||
Source demo/recordings/style.tape | ||
|
||
Type "# Atmos has a lot of documented commands" Sleep 500ms Enter | ||
Type "atmos --help" Sleep 500ms Enter | ||
Sleep 3s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Source demo/defaults.tape | ||
Source demo/recordings/style.tape | ||
|
||
Type "# Let's see what components we have available!" Sleep 500ms Enter | ||
Type "atmos list components" Sleep 500ms Enter | ||
Sleep 1s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Source demo/defaults.tape | ||
Source demo/recordings/style.tape | ||
|
||
Type "# Now, let's see where they are deployed" Sleep 500ms Enter | ||
Type "atmos list stacks" Sleep 500ms Enter | ||
Sleep 2s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Source demo/defaults.tape | ||
Source demo/recordings/style.tape | ||
|
||
Type "# Check out the docs at https://atmos.tools/" Sleep 500ms Enter | ||
Sleep 2s | ||
|
||
Type "# or join us in #atmos at https://cloudposse.com/slack!" Sleep 500ms Enter | ||
Sleep 3s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Source demo/defaults.tape | ||
Source demo/recordings/style.tape | ||
|
||
Type "# Atmos has native workflows for Terraform" Sleep 500ms Enter | ||
Type "atmos terraform --help" Sleep 500ms Enter | ||
Sleep 5s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
Source demo/defaults.tape | ||
Source demo/recordings/style.tape | ||
|
||
Type "# In Atmos you can easily explore components, stacks, and run commands..." Sleep 500ms Enter | ||
Type "atmos" Sleep 500ms Enter | ||
Sleep 2s | ||
Down Sleep 500ms | ||
Down Sleep 500ms | ||
Up Sleep 500ms | ||
Up Sleep 500ms | ||
Up Sleep 500ms | ||
Up Sleep 500ms | ||
Up Sleep 1s | ||
Right Sleep 1s | ||
Down Sleep 500ms | ||
Right Sleep 1s | ||
Down Sleep 500ms | ||
Up Sleep 1s | ||
Enter | ||
Sleep 1s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Source demo/defaults.tape | ||
Source demo/recordings/style.tape | ||
|
||
Type "# And validate the stack configurations" Sleep 500ms Enter | ||
Type "atmos validate stacks" Sleep 500ms Enter | ||
Sleep 2s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Source demo/defaults.tape | ||
Source demo/recordings/style.tape | ||
|
||
Type "# We will start by installing some 3rd-party components and other artifacts..." Sleep 500ms Enter | ||
Type "atmos vendor pull" Sleep 500ms Enter | ||
Sleep 9s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Source demo/defaults.tape | ||
Source demo/recordings/style.tape | ||
|
||
Sleep 500ms | ||
Type "# First check you have Atmos installed" Sleep 500ms Enter | ||
Type "atmos version" Sleep 500ms Enter | ||
Sleep 2s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
Source demo/defaults.tape | ||
Source demo/recordings/style.tape | ||
|
||
Type "# In Atmos you can easily explore workflows and execute workflow commands..." Sleep 500ms Enter | ||
Type "atmos workflow" Sleep 500ms Enter | ||
Sleep 2s | ||
Down Sleep 500ms | ||
Right Sleep 500ms | ||
Down Sleep 500ms | ||
Right Sleep 500ms | ||
Down Sleep 500ms | ||
Down Sleep 500ms | ||
Up Sleep 500ms | ||
Up Sleep 500ms | ||
Enter | ||
Sleep 3s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
Source demo/defaults.tape | ||
Source demo/recordings/style.tape | ||
|
||
Hide | ||
Type "cd ../../" Sleep 500ms Enter | ||
Type "clear" Enter Sleep 500ms | ||
Show | ||
|
||
Type "# Now let's explore the Quick Start example" Sleep 500ms Enter | ||
Type "cd examples/quick-start-advanced" Sleep 500ms Enter | ||
|
||
Type "ls -al" Sleep 500ms Enter | ||
Sleep 1s |