Add comments to all scripts.

This commit is contained in:
Matt McWilliams 2021-09-16 10:42:59 -04:00
parent 054a892cea
commit bd72e29c05
8 changed files with 73 additions and 21 deletions

16
draw.sh
View File

@ -1,5 +1,13 @@
#!/bin/bash
###########################
#
# Draws all svgs in a sequence. Starts with a
# fieldguide unless beginning the sequence not
# on the first frame, provided as the second argument.
#
###########################
askContinue () {
echo "Are you ready to continue? (yes/no)"
read input
@ -18,13 +26,7 @@ fi
if [ "${2}" == "" ]; then
name=`basename "${1}"`
bash position.sh set
ax guides/guide_all.svg
number=`mktemp`.svg
node ./numbers/ -n "${name}" -o "${number}"
ax "${number}"
rm -f "${number}"
bash position.sh reset
bash field.sh "${name}"
askContinue "Starting with first frame..."
else

22
field.sh Normal file
View File

@ -0,0 +1,22 @@
#!/bin/bash
###########################
#
# Draws a field guide to test pen position
# or begin a sequence.
#
###########################
name=test
if [[ "${1}" != "" ]]; then
name="${1}"
fi
bash position.sh set
ax guides/guide_all.svg
number=`mktemp`.svg
node ./numbers/ -n "${name}" -o "${number}"
ax "${number}"
rm -f "${number}"
bash position.sh reset

View File

@ -1,5 +1,12 @@
#!/bin/bash
###########################
#
# Position the pen at an offset for a frame
# and resets the pen after it is complete.
#
###########################
XZIG=2.0
X=3.35 #4.2 - XZIG
Y=1.93

7
seq.sh
View File

@ -1,5 +1,12 @@
#!/bin/bash
###########################
#
# Export a video to an image sequence at a
# particular framerate.
#
###########################
MULTIPLE=2
RATE=`echo "scale=0;24/${MULTIPLE}" | bc`

View File

@ -1,5 +1,13 @@
#!/bin/bash
###########################
#
# Run the stipple_gen script on a sequence
# of PNG images and then render the resulting
# preview images into a video.
#
###########################
if [[ "${1}" == "" ]]; then
echo "Please provide a directory of images as the first argument"
exit 1
@ -16,8 +24,7 @@ fi
mkdir -p "${OUTPUT}"
FRAMERATE=12
WIDTH=404
HEIGHT=374
DOTSIZE=4
@ -75,6 +82,6 @@ for png in "${INPUT}/"*.png ; do
fi
done
ffmpeg -y -r 12 -f image2 -i "${IMAGES}" \
ffmpeg -y -r ${FRAMERATE} -f image2 -i "${IMAGES}" \
-c:v prores_ks -profile:v 3 \
"${VIDEO}"

11
test.sh
View File

@ -1,11 +0,0 @@
#!/bin/bash
name=test
bash position.sh set
ax guides/guide_all.svg
number=`mktemp`.svg
node ./numbers/ -n "${name}" -o "${number}"
ax "${number}"
rm -f "${number}"
bash position.sh reset

View File

@ -1,5 +1,13 @@
#!/bin/bash
###########################
#
# Place a dot at the top left-most
# point at the point the position script
# starts the pen.
#
###########################
bash position.sh set
paxi down
sleep 1

View File

@ -1,3 +1,13 @@
#!/bin/bash
###########################
#
# Centers an image in a white frame.
# Used for creating SVG files with a
# "natural" offset.
#
###########################
WIDTH=404
HEIGHT=374