mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-08-01 03:26:08 -04:00
docs: simplify readme svg (#1418)
This commit is contained in:
parent
d16f01d810
commit
16f2f9bb64
3 changed files with 183 additions and 705 deletions
|
@ -8,6 +8,11 @@
|
|||
# screenrecordings container. A full script run takes ~20min.
|
||||
#
|
||||
|
||||
# Create IAM configuration
|
||||
pushd constellation || exit
|
||||
constellation iam create gcp --generate-config --projectID constellation-331613 --serviceAccountID constellation-demo --zone europe-west3-b --yes
|
||||
popd || exit
|
||||
|
||||
docker build -t screenrecodings docker
|
||||
|
||||
# Create cast
|
||||
|
@ -19,14 +24,24 @@ docker run -it \
|
|||
|
||||
# Fix meta data: width and height are always zero in Docker produced cast files.
|
||||
# Header is the first lint of cast file in JSON format, we read, fix and write it.
|
||||
head recordings/github-readme.cast -n 1 | yq e -M '.width = 95 | .height = 17' - > new_header.cast
|
||||
head -n 1 recordings/github-readme.cast | yq -M '.width = 95 | .height = 17 | . + {"idle_time_limit": 0.5}' - > new_header.cast
|
||||
# Does not work on MacOS due to a different sed
|
||||
sed -i 's/idle_time_limit:/"idle_time_limit":/' new_header.cast
|
||||
# Then append everything, expect first line from original cast file.
|
||||
tail -n+2 recordings/github-readme.cast >> new_header.cast
|
||||
|
||||
# Then render cast into svg using:
|
||||
# https://github.com/nbedos/termtosvg
|
||||
termtosvg render new_header.cast readme.svg -t window-frame.svg
|
||||
termtosvg render new_header.cast readme.svg -t window-frame.svg -D 1ms
|
||||
|
||||
# Copy and cleanup
|
||||
cp readme.svg ../static/img/shell-windowframe.svg
|
||||
rm readme.svg new_header.cast
|
||||
|
||||
# cleanup Constellation
|
||||
sudo chown -R "$USER":"$USER" ./constellation
|
||||
pushd constellation || exit
|
||||
constellation terminate -y
|
||||
constellation iam destroy -y
|
||||
rm -rf ./*
|
||||
popd || exit
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue