Skip to content

Commit

Permalink
Merge pull request #672 from ckuethe/document_timelapse
Browse files Browse the repository at this point in the history
add some more documentation to timelapse.sh
  • Loading branch information
linuxkidd authored Oct 16, 2021
2 parents 0d51103 + 5965ef0 commit fad7883
Showing 1 changed file with 20 additions and 10 deletions.
30 changes: 20 additions & 10 deletions scripts/timelapse.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,38 @@ if [ -z "${ALLSKY_HOME}" ] ; then
fi

source "${ALLSKY_HOME}/variables.sh"
source "${ALLSKY_CONFIG}/config.sh"
source "${ALLSKY_SCRIPTS}/filename.sh"
source "${ALLSKY_CONFIG}/ftp-settings.sh"

ME="$(basename "${BASH_ARGV0}")"

cd $ALLSKY_HOME

if [ $# -lt 1 -o $# -gt 2 -o "${1}" = "-h" -o "${1}" = "--help" ] ; then
XD="/path/to/nonstandard/location/of/allsky"
TODAY=$(date +%Y%m%d)
echo -en "${RED}"
echo -n "Usage: ${ME} [--help] DATE [directory]"
echo -n "Usage: ${ME} [-h|--help] <DATE> [<IMAGE_DIR>]"
echo -e "${NC}"
echo " example: ${ME} ${TODAY}"
echo " or: ${ME} ${TODAY} /media/external/allsky"
echo " or: ${ME} ${TODAY} ${XD}"
echo ""
echo -en "${YELLOW}"
echo "'DATE' must be in '${ALLSKY_IMAGES}' unless 'directory' is specified,"
echo "in which case 'DATE' must be in in 'directory', i.e., 'directory/DATE'."
echo "<DATE> must be of the form YYYYMMDD."
echo ""
echo "<IMAGE_DIR> defaults to '\${ALLSKY_IMAGES}' (wherever your installation of allsky is"
echo "configured to store images), but may be overriden to use a nonstandard location such"
echo "as a usb stick or a network drive (eg. for regenerating timelapses). In that case <DATE>"
echo "must exist inside <IMAGE_DIR>, eg. '${XD}/${TODAY}'."
echo ""
echo "Produces a movie in <IMAGE_DIR>/<DATE>/allsky-<DATE>.mp4"
echo "eg. ${ALLSKY_IMAGES}/${TODAY}/allsky-${TODAY}.mp4"
echo "or ${XD}/${TODAY}/allsky-${TODAY}.mp4"
echo -en "${NC}"
exit 1
fi


source "${ALLSKY_CONFIG}/config.sh"
source "${ALLSKY_SCRIPTS}/filename.sh"

cd $ALLSKY_HOME

# Allow timelapses of pictures not in the standard ALLSKY_IMAGES directory.
# If $2 is passed, it's the top folder, otherwise use the one in ALLSKY_IMAGES.
DATE="${1}"
Expand Down

0 comments on commit fad7883

Please sign in to comment.