From c87b20b617a989f239ce4761880ae34afdc42df7 Mon Sep 17 00:00:00 2001
From: Eric Claeys <83164203+EricClaeys@users.noreply.github.com>
Date: Sat, 28 Dec 2024 19:30:42 -0600
Subject: [PATCH 1/5] Update options.json.repo: remove options
Also:
* Indicate using original name is rarely used.
* Highlight example URLs.
---
config_repo/options.json.repo | 45 +++++------------------------------
1 file changed, 6 insertions(+), 39 deletions(-)
diff --git a/config_repo/options.json.repo b/config_repo/options.json.repo
index 93fecfce4..387564659 100644
--- a/config_repo/options.json.repo
+++ b/config_repo/options.json.repo
@@ -2012,7 +2012,7 @@
{
"name" : "remotewebsiteimageuploadoriginalname",
"default" : false,
-"description" : "Enable to upload images using YYYYMMDDHHMMSS naming.",
+"description" : "Enable to upload images using YYYYMMDDHHMMSS naming. Rarely used.",
"label" : "Upload With Original Name",
"label_prefix" : "Remote Website",
"type" : "boolean",
@@ -2020,42 +2020,9 @@
"valuedependson" : "imageuploadfrequency=[1-9]*"
},
{
-"name" : "remotewebsitevideodestinationname",
-"default" : "",
-"description" : "Optional name of the remote video file.",
-"label" : "Remote Video File Name",
-"label_prefix" : "Remote Website",
-"type" : "text",
-"carryforward" : true,
-"booldependson" : "useremotewebsite",
-"optional" : true
-},
-{
-"name" : "remotewebsitekeogramdestinationname",
-"default" : "",
-"description" : "Optional name of the remote keogram file.",
-"label" : "Remote Keogram File Name",
-"label_prefix" : "Remote Website",
-"type" : "text",
-"carryforward" : true,
-"booldependson" : "useremotewebsite",
-"optional" : true
-},
-{
-"name" : "remotewebsitestartrailsdestinationname",
-"default" : "",
-"description" : "Optional name of the remote startrails file.",
-"label" : "Remote Startrails File Name",
-"label_prefix" : "Remote Website",
-"type" : "text",
-"carryforward" : true,
-"booldependson" : "useremotewebsite",
-"optional" : true
-},
-{
"name" : "remotewebsiteurl",
"default" : "",
-"description" : "The URL of your Allsky Website, for example: https://mywebsite.com/allsky/.
Must begin with http or https.",
+"description" : "The URL of your Allsky Website, for example: https://mywebsite.com/allsky/.
Must begin with http or https.",
"label" : "Website URL",
"label_prefix" : "Remote Website",
"type" : "widetext",
@@ -2067,7 +2034,7 @@
{
"name" : "remotewebsiteimageurl",
"default" : "",
-"description" : "The URL of the image on your Allsky Website, for example: https://mywebsite.com/allsky/image.jpg.
Must begin with http or https.",
+"description" : "The URL of the image on your Allsky Website, for example: https://mywebsite.com/allsky/image.jpg.
Must begin with http or https.",
"label" : "Image URL",
"label_prefix" : "Remote Website",
"type" : "widetext",
@@ -2275,7 +2242,7 @@
},
{
"name" : "remoteservervideodestinationname",
-"default" : "",
+"default" : "allsky.mp4",
"description" : "Optional name of the remote video file.",
"label" : "Remote Video File Name",
"label_prefix" : "Remote Server",
@@ -2286,7 +2253,7 @@
},
{
"name" : "remoteserverkeogramdestinationname",
-"default" : "",
+"default" : "keogram.jpg",
"description" : "Optional name of the remote keogram file.",
"label" : "Remote Keogram File Name",
"label_prefix" : "Remote Server",
@@ -2297,7 +2264,7 @@
},
{
"name" : "remoteserverstartrailsdestinationname",
-"default" : "",
+"default" : "startrails.jpg",
"description" : "Optional name of the remote startrails file.",
"label" : "Remote Startrails File Name",
"label_prefix" : "Remote Server",
From b5bd98a59b5f601fb3c22220d6d61482d94362b3 Mon Sep 17 00:00:00 2001
From: Eric Claeys <83164203+EricClaeys@users.noreply.github.com>
Date: Sat, 28 Dec 2024 19:51:40 -0600
Subject: [PATCH 2/5] Update generateForDay.sh: Remove code for changing names
Also, have all error output go to stderr
---
scripts/generateForDay.sh | 81 +++++++++++++--------------------------
1 file changed, 27 insertions(+), 54 deletions(-)
diff --git a/scripts/generateForDay.sh b/scripts/generateForDay.sh
index ebfcaea63..3b96b339c 100755
--- a/scripts/generateForDay.sh
+++ b/scripts/generateForDay.sh
@@ -86,6 +86,7 @@ done
usage_and_exit()
{
local RET=${1}
+ exec >&2
echo
[[ ${RET} -ne 0 ]] && echo -en "${RED}"
echo "Usage: ${ME} [--help] [--silent] [--debug] [--nice n] [--upload] \\"
@@ -126,7 +127,7 @@ fi
if [[ -n ${IMAGES_FILE} ]]; then
if [[ ! -s ${IMAGES_FILE} ]]; then
- echo -e "${RED}*** ${ME} ERROR: '${IMAGES_FILE}' does not exist or is empty!${NC}"
+ echo -e "${RED}*** ${ME} ERROR: '${IMAGES_FILE}' does not exist or is empty!${NC}" >&2
exit 3
fi
INPUT_DIR="" # Not used
@@ -138,9 +139,9 @@ if [[ -n ${IMAGES_FILE} ]]; then
# In case the filename doesn't include a path, put in a default location.
if [[ ${OUTPUT_DIR} == "." ]]; then
OUTPUT_DIR="${ALLSKY_TMP}"
- echo -en "${ME}: ${YELLOW}"
- echo "Can't determine where to put files so putting in '${OUTPUT_DIR}'."
- echo -e "${NC}"
+ echo -en "${ME}: ${YELLOW}" >&2
+ echo "Can't determine where to put files so putting in '${OUTPUT_DIR}'." >&2
+ echo -e "${NC}" >&2
fi
# Use the basename of the directory.
@@ -158,7 +159,7 @@ else
DATE="$( basename "${INPUT_DIR}" )"
fi
if [[ ! -d ${INPUT_DIR} ]]; then
- echo -e "${RED}*** ${ME} ERROR: '${INPUT_DIR}' does not exist!${NC}"
+ echo -e "${RED}*** ${ME} ERROR: '${INPUT_DIR}' does not exist!${NC}" >&2
exit 4
fi
@@ -178,14 +179,14 @@ if [[ ${TYPE} == "GENERATE" ]]; then
DIRECTORY="${2}"
CMD="${3}"
[[ ${SILENT} == "false" ]] && echo "===== Generating ${GENERATING_WHAT}"
- [[ ${DIRECTORY} != "" ]] && mkdir -p "${OUTPUT_DIR}/${DIRECTORY}"
+ [[ -n ${DIRECTORY} ]] && mkdir -p "${OUTPUT_DIR}/${DIRECTORY}"
[[ -n ${DEBUG_ARG} ]] && echo "${ME}: Executing: ${CMD}"
# shellcheck disable=SC2086
eval ${CMD}
local RET=$?
if [[ ${RET} -ne 0 ]]; then
- echo -e "${RED}${ME}: Command Failed: ${CMD}${NC}"
+ echo -e "${RED}${ME}: Command Failed: ${CMD}${NC}" >&2
elif [[ ${SILENT} == "false" ]]; then
echo -e "\tDone"
fi
@@ -200,7 +201,7 @@ else
if [[ ${L_WEB_USE} == "false" &&
${R_WEB_USE} == "false" &&
${R_SERVER_USE} == "false" ]]; then
- echo -e "${RED}*** ${ME} ERROR: '--upload' specified but nowhere to upload!${NC}"
+ echo -e "${RED}*** ${ME} ERROR: '--upload' specified but nowhere to upload!${NC}" >&2
exit 5
fi
@@ -208,25 +209,15 @@ else
if [[ ${R_WEB_USE} == "true" ]]; then
R_WEB_DEST_DIR="$( settings ".remotewebsiteimagedir" )"
- if [[ -n ${R_WEB_DEST_DIR} && ${R_WEB_DEST_DIR: -1:1} != "" ]]; then
- R_WEB_DEST_DIR="${R_WEB_DEST_DIR}/"
- fi
-
- if [[ ${DO_KEOGRAM} == "true" ]]; then
- R_WEB_KEOGRAM_NAME="$( settings ".remotewebsitekeogramdestinationname" )"
- fi
- if [[ ${DO_STARTRAILS} == "true" ]]; then
- R_WEB_STARTRAILS_NAME="$( settings ".remotewebsitestartrailsdestinationname" )"
- fi
- if [[ ${DO_TIMELAPSE} == "true" ]]; then
- R_WEB_VIDEO_NAME="$( settings ".remotewebsitevideodestinationname" )"
+ if [[ -n ${R_WEB_DEST_DIR} && ${R_WEB_DEST_DIR: -1:1} != "/" ]]; then
+ R_WEB_DEST_DIR+="/"
fi
fi
if [[ ${R_SERVER_USE} == "true" ]]; then
R_SERVER_DEST_DIR="$( settings ".remoteserverimagedir" )"
- if [[ -n ${R_SERVER_DEST_DIR} && ${R_SERVER_DEST_DIR: -1:1} != "" ]]; then
- R_SERVER_DEST_DIR="${R_SERVER_DEST_DIR}/"
+ if [[ -n ${R_SERVER_DEST_DIR} && ${R_SERVER_DEST_DIR: -1:1} != "/" ]]; then
+ R_SERVER_DEST_DIR+="/"
fi
if [[ ${DO_KEOGRAM} == "true" ]]; then
@@ -290,14 +281,14 @@ if [[ ${DO_KEOGRAM} == "true" ]]; then
DO_TIMELAPSE="false"
# -gt 90 means either no files or unable to read initial file, and
# keograms and timelapse will have the same problem, so don't bother running.
- echo "Keogram creation unable to read files; will not run startrails or timelapse."
+ echo "Keogram creation unable to read files; will not run startrails or timelapse." >&2
fi
else
if [[ ! -f ${UPLOAD_FILE} ]]; then
- echo -en "${YELLOW}"
- echo -n "WARNING: '${UPLOAD_FILE}' not found; skipping."
- echo -e "${NC}"
+ echo -en "${YELLOW}" >&2
+ echo -n "WARNING: '${UPLOAD_FILE}' not found; skipping." >&2
+ echo -e "${NC}" >&2
((EXIT_CODE++))
else
DEST_DIR="keograms"
@@ -310,12 +301,6 @@ if [[ ${DO_KEOGRAM} == "true" ]]; then
((EXIT_CODE+=$?))
fi
if [[ ${R_WEB_USE} == "true" ]]; then
- if [[ -n ${R_WEB_KEOGRAM_NAME} ]]; then
- DEST_NAME="${R_WEB_KEOGRAM_NAME}"
- else
- DEST_NAME="${KEOGRAM_FILE}"
- fi
-
#shellcheck disable=SC2086
"${ALLSKY_SCRIPTS}/upload.sh" ${UPLOAD_SILENT} ${DEBUG_ARG} "--remote-web" \
"${UPLOAD_FILE}" "${R_WEB_DEST_DIR}${DEST_DIR}" "${DEST_NAME}" "Keogram"
@@ -357,14 +342,14 @@ if [[ ${DO_STARTRAILS} == "true" ]]; then
DO_TIMELAPSE="false"
# -gt 90 means either no files or unable to read initial file, and
# timelapse will have the same problem, so don't bother running.
- echo "Startrails creation unable to read files; will not run timelapse."
+ echo "Startrails creation unable to read files; will not run timelapse." >&2
fi
else
if [[ ! -f ${UPLOAD_FILE} ]]; then
- echo -en "${YELLOW}"
- echo -n "WARNING: '${UPLOAD_FILE}' not found; skipping."
- echo -e "${NC}"
+ echo -en "${YELLOW}" >&2
+ echo -n "WARNING: '${UPLOAD_FILE}' not found; skipping." >&2
+ echo -e "${NC}" >&2
((EXIT_CODE++))
else
DEST_DIR="startrails"
@@ -377,12 +362,6 @@ if [[ ${DO_STARTRAILS} == "true" ]]; then
((EXIT_CODE+=$?))
fi
if [[ ${R_WEB_USE} == "true" ]]; then
- if [[ -n ${R_WEB_STARTRAILS_NAME} ]]; then
- DEST_NAME="${R_WEB_STARTRAILS_NAME}"
- else
- DEST_NAME="${STARTRAILS_FILE}"
- fi
-
#shellcheck disable=SC2086
"${ALLSKY_SCRIPTS}/upload.sh" ${UPLOAD_SILENT} ${DEBUG_ARG} "--remote-web" \
"${UPLOAD_FILE}" "${R_WEB_DEST_DIR}${DEST_DIR}" "${DEST_NAME}" "Startrails"
@@ -422,8 +401,8 @@ if [[ ${DO_TIMELAPSE} == "true" ]]; then
if [[ -f ${UPLOAD_FILE} ]]; then
RET=0
else
- echo -e "${RED}${ME}: ERROR: video file '${UPLOAD_FILE}' not found!"
- echo -e "Cannot create thumbnail.${NC}"
+ echo -e "${RED}${ME}: ERROR: video file '${UPLOAD_FILE}' not found!" >&2
+ echo -e "Cannot create thumbnail.${NC}" >&2
RET=1
fi
else
@@ -450,14 +429,14 @@ if [[ ${DO_TIMELAPSE} == "true" ]]; then
make_thumbnail "00" "${UPLOAD_FILE}" "${UPLOAD_THUMBNAIL}"
fi
if [[ ! -f ${UPLOAD_THUMBNAIL} ]]; then
- echo -e "${RED}${ME}: ERROR: video thumbnail not created!${NC}"
+ echo -e "${RED}${ME}: ERROR: video thumbnail not created!${NC}" >&2
fi
fi
elif [[ ! -f ${UPLOAD_FILE} ]]; then
- echo -en "${YELLOW}"
- echo -n "WARNING: '${UPLOAD_FILE}' not found; skipping."
- echo -e "${NC}"
+ echo -en "${YELLOW}" >&2
+ echo -n "WARNING: '${UPLOAD_FILE}' not found; skipping." >&2
+ echo -e "${NC}" >&2
((EXIT_CODE++))
else
DEST_DIR="videos"
@@ -481,12 +460,6 @@ if [[ ${DO_TIMELAPSE} == "true" ]]; then
fi
fi
if [[ ${R_WEB_USE} == "true" ]]; then
- if [[ -n ${R_WEB_VIDEO_NAME} ]]; then
- DEST_NAME="${R_WEB_VIDEO_NAME}"
- else
- DEST_NAME="${VIDEO_FILE}"
- fi
-
D="${R_WEB_DEST_DIR}${DEST_DIR}"
if [[ ${THUMBNAIL_ONLY} != "true" ]]; then
#shellcheck disable=SC2086
From cf3d4fcd9e4be58b00403589cd2ce8d103b852d7 Mon Sep 17 00:00:00 2001
From: Eric Claeys <83164203+EricClaeys@users.noreply.github.com>
Date: Sat, 28 Dec 2024 20:04:47 -0600
Subject: [PATCH 3/5] Update allsky.html: Remove references to changing names
---
html/documentation/settings/allsky.html | 18 ------------------
1 file changed, 18 deletions(-)
diff --git a/html/documentation/settings/allsky.html b/html/documentation/settings/allsky.html
index 60166c072..cabf5cfad 100644
--- a/html/documentation/settings/allsky.html
+++ b/html/documentation/settings/allsky.html
@@ -1241,24 +1241,6 @@
This is rarely used since changing the image name will make it unviewable.
-
allsky.sh --preview
.
It was previously allsky.sh preview
.
-