Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add some more documentation to timelapse.sh #672

Merged
merged 2 commits into from
Oct 16, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 18 additions & 10 deletions scripts/timelapse.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,36 @@ 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="/media/external/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}"
linuxkidd marked this conversation as resolved.
Show resolved Hide resolved
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}', but may be overriden. In that case"
echo "<DATE> 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