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",
diff --git a/html/documentation/changeLog.html b/html/documentation/changeLog.html
index 161233ca3..9ee954473 100644
--- a/html/documentation/changeLog.html
+++ b/html/documentation/changeLog.html
@@ -63,10 +63,24 @@
Enhancements / Changes
Displaying image previews is now done via allsky.sh --preview
.
It was previously allsky.sh preview
.
- Settings
+ New Settings
- - New: xxx
-
- Deleted: xxx
+
- xxx
+
+ Deleted Settings
+
+ - To further simplify configuring a remote Website and
+ remove a source of user error,
+ changing the name of the timelapse, keogram, and startrails files
+ uploaded to a remote Website is no longer allowed
+ (these already couldn't be changed for local Websites).
+ Hence, the
+ Remote Video File Name,
+ Remote Keogram File Name, and
+ Remote Startrails File Name
+ settings in the
+
+ sub-section of the WebUI were deleted.
Bug Fixes
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.
-Remote Video File Name |
- |
- The name to give to the remote timelapse video file.
- If not specified it's the same as the file on your Pi.
- This is rarely used since changing the image name will make it unviewable.
- |
-Remote Keogram File Name |
- |
- The name to give to the remote keogram file.
- If not specified it's the same as the file on your Pi.
- This is rarely used since changing the image name will make it unviewable.
- |
-Remote Startrails File Name |
- |
- The name to give to the remote startrails file.
- If not specified it's the same as the file on your Pi.
- This is rarely used since changing the image name will make it unviewable.
- |
Website URL |
|
Your website's URL, for example
diff --git a/install.sh b/install.sh
index c71759cca..2110130b1 100755
--- a/install.sh
+++ b/install.sh
@@ -58,9 +58,9 @@ COMBINED_BASE_VERSION="v2024.12.06"
# "cameratype" in the settings file.
FIRST_CAMERA_TYPE_BASE_VERSION="v2023.05.01"
# First Allsky version that used the "version" file.
- # It's also when ftp-settings.sh moved to ${ALLSKY_CONFIG}
+ # It's also when ftp-settings.sh moved to the ${ALLSKY_CONFIG} directory.
FIRST_VERSION_VERSION="v2022.03.01"
- # Versions before ${FIRST_VERSION_VERSION} that didn't have version numbers.
+ # Versions before ${FIRST_VERSION_VERSION} didn't have version numbers.
PRE_FIRST_VERSION_VERSION="old"
##### Information on the prior Allsky version, if used
@@ -1664,7 +1664,8 @@ create_allsky_logs()
# runs in a subshell.
DISPLAYED_BRIGHTNESS_MSG="/tmp/displayed_brightness_msg"
DISPLAYED_OFFSET_MSG="/tmp/displayed_offset_msg"
-rm -f "${DISPLAYED_BRIGHTNESS_MSG}" "${DISPLAYED_OFFSET_MSG}"
+DISPLAYED_CHANGE_NAMES_MSG="/tmp/displayed_change_names_msg"
+rm -f "${DISPLAYED_BRIGHTNESS_MSG}" "${DISPLAYED_OFFSET_MSG}" "${DISPLAYED_CHANGE_NAMES_MSG}"
convert_settings() # prior_file, new_file
{
@@ -1677,14 +1678,10 @@ convert_settings() # prior_file, new_file
return
fi
- # If we're upgrading a version >= COMBINED_BASE_VERSION then return.
- # bash doesn't have >= so use ! <
- if [[ ! (${PRIOR_ALLSKY_BASE_VERSION} < "${COMBINED_BASE_VERSION}") ]]; then
- display_msg --logonly info "Not converting '${PRIOR_FILE}'; >= COMBINED_BASE_VERSION."
- return
- fi
+# TODO: Keep track somehow of which upgrades added, deleted, and/or changed names of
+# settings so we know if the settings file needs to be updated.
- local MSG="Converting '$( basename "${PRIOR_FILE}" )' to new format:"
+ local MSG="Converting '$( basename "${PRIOR_FILE}" )' to new format if needed:"
display_msg --log progress "${MSG}"
DIR="/tmp/converted_settings"
@@ -1695,7 +1692,7 @@ convert_settings() # prior_file, new_file
# and quotes around numbers. Change that.
# Don't modify the prior file, so make the changes to a temporary file.
# --settings-only says only output settings that are in the settings file.
- # The OPTIONS_FILE doesn't exist yet so use REPO_OPTIONS_FILE>
+ # The OPTIONS_FILE doesn't exist yet so use REPO_OPTIONS_FILE.
"${ALLSKY_SCRIPTS}/convertJSON.php" \
--convert \
--settings-only \
@@ -1729,7 +1726,7 @@ convert_settings() # prior_file, new_file
;;
"computer")
- # We now compute the value.
+ # As of ${COMBINED_BASE_VERSION}, we compute the value.
VALUE="$( get_computer )"
doV "${FIELD}" "VALUE" "${FIELD}" "text" "${NEW_FILE}"
;;
@@ -1738,12 +1735,11 @@ convert_settings() # prior_file, new_file
"XX_END_XX")
;;
- # These don't exist anymore:
+ # ===== Deleted in ${COMBINED_BASE_VERSION}.
"autofocus" | "background" | "alwaysshowadvanced" | \
"newexposure" | "experimentalexposure" | "showbrightness")
;;
- # These two were deleted in ${COMBINED_BASE_VERSION}:
"brightness" | "daybrightness" | "nightbrightness")
if [[ ! -f ${DISPLAYED_BRIGHTNESS_MSG} ]]; then
touch "${DISPLAYED_BRIGHTNESS_MSG}"
@@ -1761,7 +1757,19 @@ convert_settings() # prior_file, new_file
fi
;;
- # These changed names:
+ # ===== Deleted after ${COMBINED_BASE_VERSION}.
+ "remotewebsitevideodestinationname" | \
+ "remotewebsitekeogramdestinationname" | \
+ "remotewebsitestartrailsdestinationname")
+ if [[ -n ${VALUE} && ! -f ${DISPLAYED_CHANGE_NAMES_MSG} ]]; then
+ touch "${DISPLAYED_CHANGE_NAMES_MSG}"
+ MSG="Changing timelapse, keogram, and/or startrails names"
+ MSG+="\nfor remote Websites is no longer allowed."
+ display_msg --log notice "${MSG}"
+ fi
+ ;;
+
+ # ===== Names changed in ${COMBINED_BASE_VERSION}
"darkframe")
doV "${FIELD}" "VALUE" "takedarkframes" "boolean" "${NEW_FILE}"
;;
@@ -1781,7 +1789,7 @@ convert_settings() # prior_file, new_file
doV "${FIELD}" "VALUE" "remotewebsiteimageurl" "text" "${NEW_FILE}"
;;
- # These now have day and night versions:
+ # ===== Now have day and night versions as of ${COMBINED_BASE_VERSION}
"awb" | "autowhitebalance")
FIELD="awb"
doV "${FIELD}" "VALUE" "day${FIELD}" "boolean" "${NEW_FILE}"
@@ -2087,9 +2095,6 @@ convert_ftp_sh()
doV "NEW" "X" "useremotewebsite" "boolean" "${NEW_FILE}"
doV "" "IMG_UPLOAD_ORIGINAL_NAME" "remotewebsiteimageuploadoriginalname" "boolean" "${NEW_FILE}"
- doV "" "VIDEOS_DESTINATION_NAME" "remotewebsitevideodestinationname" "text" "${NEW_FILE}"
- doV "" "KEOGRAM_DESTINATION_NAME" "remotewebsitekeogramdestinationname" "text" "${NEW_FILE}"
- doV "" "STARTRAILS_DESTINATION_NAME" "remotewebsitestartrailsdestinationname" "text" "${NEW_FILE}"
doV "" "REMOTE_HOST" "REMOTEWEBSITE_HOST" "text" "${ALLSKY_ENV}"
doV "" "REMOTE_PORT" "REMOTEWEBSITE_PORT" "text" "${ALLSKY_ENV}"
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
|