A live bird collage card for your Home Assistant dashboard.
fixed clear_all_data.sh bug where it broke wttr.in link
Patrick McGuireaa379714498c
diff --git a/scripts/clear_all_data.sh b/scripts/clear_all_data.shindex 9e93202a..de568fb8 100755--- a/scripts/clear_all_data.sh+++ b/scripts/clear_all_data.sh@@ -24,28 +24,28 @@ echo "Recreating necessary directories"sudo -u ${USER} ln -fs $(dirname ${my_dir})/homepage/* ${EXTRACTED}if [ ! -z ${BIRDNETLOG_URL} ];thenBIRDNETLOG_URL="$(echo ${BIRDNETLOG_URL} | sed 's/\/\//\\\/\\\//g')"- sudo -u${USER} sed -i "s/http:\/\/birdnetpi.local:8080/"${BIRDNETLOG_URL}"/g" $(dirname ${my_dir})/homepage/*.html+ sudo -u ${USER} sed -i "s/http:\/\/birdnetpi.local:8080/"${BIRDNETLOG_URL}"/g" $(dirname ${my_dir})/homepage/*.htmlphpfiles="$(grep -l "birdnetpi.local:8080" ${my_dir}/*.php)"for i in "${phpfiles[@]}";do- sudo -u${USER} sed -i "s/http:\/\/birdnetpi.local:8080/"${BIRDNETLOG_URL}"/g" ${i}+ sudo -u ${USER} sed -i "s/http:\/\/birdnetpi.local:8080/"${BIRDNETLOG_URL}"/g" ${i}donefiif [ ! -z ${EXTRACTIONLOG_URL} ];thenEXTRACTIONLOG_URL="$(echo ${EXTRACTIONLOG_URL} | sed 's/\/\//\\\/\\\//g')"- sudo -u${USER} sed -i "s/http:\/\/birdnetpi.local:8888/"${EXTRACTIONLOG_URL}"/g" $(dirname ${my_dir})/homepage/*.html+ sudo -u ${USER} sed -i "s/http:\/\/birdnetpi.local:8888/"${EXTRACTIONLOG_URL}"/g" $(dirname ${my_dir})/homepage/*.htmlphpfiles="$(grep -l "birdnetpi.local:8888" ${my_dir}/*.php)"for i in "${phpfiles[@]}";do- sudo -u${USER} sed -i "s/http:\/\/birdnetpi.local:8888/"${EXTRACTIONLOG_URL}"/g" ${i}+ sudo -u ${USER} sed -i "s/http:\/\/birdnetpi.local:8888/"${EXTRACTIONLOG_URL}"/g" ${i}donefisudo -u ${USER} ln -fs $(dirname ${my_dir})/scripts ${EXTRACTED}if [ ! -z ${BIRDNETPI_URL} ];thenBIRDNETPI_URL="$(echo ${BIRDNETPI_URL} | sed 's/\/\//\\\/\\\//g')"- sudo -u${USER} sed -i "s/http:\/\/birdnetpi.local/"${BIRDNETPI_URL}"/g" $(dirname ${my_dir})/homepage/*.html+ sudo -u ${USER} sed -i "s/http:\/\/birdnetpi.local/"${BIRDNETPI_URL}"/g" $(dirname ${my_dir})/homepage/*.htmlphpfiles="$(grep -l birdnetpi.local ${my_dir}/*.php)"for i in "${phpfiles[@]}";do- sudo -u${USER} sed -i "s/http:\/\/birdnetpi.local/"${BIRDNETPI_URL}"/g" ${i}+ sudo -u ${USER} sed -i "s/http:\/\/birdnetpi.local/"${BIRDNETPI_URL}"/g" ${i}donefi@@ -59,7 +59,8 @@ sudo -u ${USER} cp -f $(dirname ${my_dir})/templates/green_bootstrap.css ${HOME}sudo -u ${USER} cp -f $(dirname ${my_dir})/templates/index_bootstrap.html ${HOME}/phpsysinfo/templates/htmlecho "Setting Wttr.in URL to "${LATITUDE}", "${LONGITUDE}""-sudo -u${USER} sed -i "s/https:\/\/v2.wttr.in\//https:\/\/v2.wttr.in\/"${LATITUDE},${LONGITUDE}"/g" $(dirname ${my_dir})/homepage/menu.html+sudo -u ${USER} git -C $(dirname ${my_dir}) checkout -f homepage/menu.html+sudo -u ${USER} sed -i "s/https:\/\/v2.wttr.in\//https:\/\/v2.wttr.in\/"${LATITUDE},${LONGITUDE}"/g" $(dirname ${my_dir})/homepage/menu.htmlecho "Generating BirdDB.txt"[ -f $(dirname ${my_dir})/BirdDB.txt ] || sudo -u ${USER} touch $(dirname ${my_dir})/BirdDB.txt