A live bird collage card for your Home Assistant dashboard.
removing old files
mcguirepr894863a2eef707
diff --git a/scripts/birdnet_stats.sh b/scripts/birdnet_stats.shdeleted file mode 100755index 8dfd6020..00000000--- a/scripts/birdnet_stats.sh+++ /dev/null@@ -1,90 +0,0 @@-#!/usr/bin/env bash-# BirdNET Stats Page-trap 'setterm --cursor on && exit' EXIT-trap 'rm -f "${TMP_FILE}" && exit' EXIT-source /etc/birdnet/birdnet.conf-setterm --cursor off-TMP_FILE="$(mktemp)"--while true;do- cat << 'EOF'- ____ __ __ __ _____ ______ ____-/\ _`\ __ /\ \/\ \/\ \/\ __\/\__ _\ /\ _`\ __-\ \ \_\ \ /\_\ _ __ \_\ \ \ `\\ \ \ \_/\/_/\ \/ \ \ \_\ \/\_\- \ \ _ <'\/\ \/\`'__\/'_` \ \ , ` \ \ _\ \ \ \ \ \ ,__/\/\ \- \ \ \_\ \\ \ \ \ \//\ \_\ \ \ \`\ \ \ \/__ \ \ \ \ \ \/ \ \ \- \ \____/ \ \_\ \_\\ \___,_\ \_\ \_\ \____/ \ \_\ \ \_\ \ \_\- \/___/ \/_/\/_/ \/__,_ /\/_/\/_/\/___/ \/_/ \/_/ \/_/--EOF- if [ "$(find ${EXTRACTED} -name '*.wav' | wc -l)" -ge 1 ] &> /dev/null;then- a=$(find "${EXTRACTED}/By_Date" -type f -name '*.wav' | wc -l)- else- a=0- fi- echo- if [ "${a}" -ge "1" ];then- SOFAR=$(($(wc -l ${IDFILE}| cut -d' ' -f1)/2))- else- SOFAR=0- fi- if [ $SOFAR = 1 ];then- verbage=detection- else- verbage=detections- fi- echo " -$a $verbage so far"- echo- echo " -$SOFAR species identified so far"- echo- if [ "${SOFAR}" -ge "1" ] && ( find ${EXTRACTED}/By_Date/$(date +%Y-%m-%d) -name '*wav' &> /dev/null );then- MOST_RECENT="$(find ${EXTRACTED}/By_Date/$(date +%Y-%m-%d) \- | sort -t"%" -rk2 \- | head -n1 \- | cut -d'/' -f8)"- AT_TIME="$(find ${EXTRACTED}/By_Date/$(date +%Y-%m-%d) \- | sort -t"%" -rk2 \- | head -n1 \- | rev \- | cut -d'-' -f1 \- | rev \- | cut -d'.' -f1)"- echo " -Most recent species detection: ${MOST_RECENT//_/ } at ${AT_TIME}"- echo- fi- if [ ${a} -ge 1 ];then- while read -r line;do- # Get species name- SPECIES="$(echo "${line}" | awk -F: '/Common Name/ {print $2}')"- SPECIES="${SPECIES// /_}"- SPECIES="$(echo ${SPECIES/_} | tr -d "'")"- [ -z ${SPECIES} ] && continue-- # Get all detection files- ALL_DETECTION_FILES="$(find ${EXTRACTED}/By_Date/*/${SPECIES} -name '*.wav')"- ALL_DETECTION_FILES="$(echo ${ALL_DETECTION_FILES[@]} | tr ' ' '\n')"-- # Parse highest confidence score- MAX_SCORE="$(echo "${ALL_DETECTION_FILES}"| awk -F% '{print $1}')"- MAX_SCORE="$(echo "${MAX_SCORE[@]}" | rev |cut -d"-" -f1|rev | sort -r | head -n1)"-- # Set noun-plurality agreement for grammar- DETECTIONS="$(($(ls -1 ${EXTRACTED}/By_Date/*/${SPECIES} | wc -l)/2))"- if [ ${DETECTIONS} = 1 ];then- verbage=detection- else- verbage=detections- fi-- # Write results to temporary file- echo "${DETECTIONS} $verbage for ${SPECIES//_/ } | max conf ${MAX_SCORE}%"- done < "${IDFILE}" > ${TMP_FILE}-- # Print temporary file sorted by # of detections- sort -rk1 -h "${TMP_FILE}"- fi- echo- echo -n "Listening since "${INSTALL_DATE}""- sleep 20- clear-donediff --git a/scripts/set_date_and_time.sh b/scripts/set_date_and_time.shdeleted file mode 100755index 394e3df4..00000000--- a/scripts/set_date_and_time.sh+++ /dev/null@@ -1,5 +0,0 @@-#!/usr/bin/env -S sudo -E bash-# Setting date and time manually for non-network attached installatoins-most_recent="$(date +"%F %T" | tr '-' '/')"-new_time=$(whiptail --inputbox "Please set the correct time by changing these values. (24h clock format)" 20 60 "$most_recent" 3>&1 1>&2 2>&3)-date -s "$new_time"diff --git a/scripts/update_db_pwd.sh b/scripts/update_db_pwd.shdeleted file mode 100755index 9b68f133..00000000--- a/scripts/update_db_pwd.sh+++ /dev/null@@ -1,11 +0,0 @@-#!/usr/bin/env bash-# Update database password-source /etc/birdnet/birdnet.conf--sudo mysql -e "- SET PASSWORD FOR 'birder'@'localhost' = PASSWORD('${DB_PWD}');- FLUSH PRIVILEGES";-git -C /home/pi/BirdNET-Pi checkout -f scripts/analyze.py-git -C /home/pi/BirdNET-Pi checkout -f scripts/viewdb.php-sed -i "s/databasepassword/${DB_PWD}/g" /home/pi/BirdNET-Pi/scripts/analyze.py-sed -i "s/databasepassword/${DB_PWD}/g" /home/pi/BirdNET-Pi/scripts/viewdb.php