mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-14 17:37:05 +05:30
feat(scripts): add a quick way to refresh the README graphic
This commit is contained in:
parent
0a1913e056
commit
9fdd72220f
5 changed files with 25 additions and 7 deletions
19
scripts/refresh-feature-graphic.sh
Executable file
19
scripts/refresh-feature-graphic.sh
Executable file
|
@ -0,0 +1,19 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
# Get the absolute path to the script file
|
||||
SCRIPT_DIR="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" && pwd)"
|
||||
SCREENSHOT_DIR="${SCRIPT_DIR}"/../screenshots
|
||||
|
||||
# Run the Maestro flow to generate the screenshots
|
||||
source "${SCRIPT_DIR}"/run-maestro-flows.sh
|
||||
|
||||
# Use imagemagick to stitch the screenshots horizontally
|
||||
nix-shell -p imagemagick --run "convert +append ${SCREENSHOT_DIR}/HottestPosts.png ${SCREENSHOT_DIR}/CommentsPage.png ${SCREENSHOT_DIR}/SavedPosts.png ${SCRIPT_DIR}/../.github/readme_feature.png"
|
||||
|
||||
# Convert the resulting PNG to WebP
|
||||
nix-shell -p libwebp --run "cwebp .github/readme_feature.png -o .github/readme_feature.webp"
|
||||
|
||||
# Remove the now-useless PNG
|
||||
rm ".github/readme_feature.png"
|
Loading…
Add table
Add a link
Reference in a new issue