From 9cabc8e8c6463424777e62f957e639e28bfadf3e Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Sat, 1 Jun 2024 09:40:48 +0200 Subject: [PATCH] Convert options to main app --- .../rootfs/etc/cont-init.d/71-newfeatures.sh | 37 ------------------- 1 file changed, 37 deletions(-) diff --git a/birdnet-pi/rootfs/etc/cont-init.d/71-newfeatures.sh b/birdnet-pi/rootfs/etc/cont-init.d/71-newfeatures.sh index 87b68ac76..925fccd2f 100755 --- a/birdnet-pi/rootfs/etc/cont-init.d/71-newfeatures.sh +++ b/birdnet-pi/rootfs/etc/cont-init.d/71-newfeatures.sh @@ -9,43 +9,6 @@ set -e echo " " bashio::log.info "Adding new features" -# Set the online birds info system -################################## -if [[ "$(bashio::config "BIRDS_ONLINE_INFO")" == *"ebird"* ]]; then - echo "... using ebird instead of allaboutbirds" - # Set ebird database - mv /helpers/ebird.txt /home/pi/BirdNET-Pi/model/ebird.txt - chown pi:pi /home/pi/BirdNET-Pi/model/ebird.txt - # Get language - export "$(grep "^DATABASE_LANG" /config/birdnet.conf)" - # shellcheck disable=SC2016 - sed -i '/$sciname =/a \\t$ebirdname = shell_exec("grep \\"$( echo \\"$sciname\\" | sed '\''s/_/ /g'\'')\\" /home/pi/BirdNET-Pi/model/ebird.txt | cut -d'\''_'\'' -f2 | sed '\''s/ /_/g'\''");' "$HOME"/BirdNET-Pi/scripts/todays_detections.php - sed -i "s|https://allaboutbirds.org/guide/|https://ebird.org/species/?siteLanguage=${DATABASE_LANG}_${DATABASE_LANG}|g" "$HOME"/BirdNET-Pi/scripts/todays_detections.php - # shellcheck disable=SC2016 - sed -i '/$sciname =/a \\t$ebirdname = shell_exec("grep \\"$( echo \\"$sciname\\" | sed '\''s/_/ /g'\'')\\" /home/pi/BirdNET-Pi/model/ebird.txt | cut -d'\''_'\'' -f2 | sed '\''s/ /_/g'\''");' "$HOME"/BirdNET-Pi/scripts/stats.php - sed -i "s|https://allaboutbirds.org/guide/\$comname|https://ebird.org/species/\$ebirdname?siteLanguage=${DATABASE_LANG}_${DATABASE_LANG}|g" "$HOME"/BirdNET-Pi/scripts/stats.php -else - # Correct allaboutbirds for non-english names - echo "... using allaboutbirds, with correction for non-english names" - # shellcheck disable=SC2016 - sed -i 's|allaboutbirds.org/guide/Database Maintenance' "$HOME"/BirdNET-Pi/homepage/views.php - sed -i "/advanced.php/a\ if(\$_GET\['view'\] == \"Adminer\"){echo \"\";}" "$HOME"/BirdNET-Pi/homepage/views.php - sed -i "s|deny|SameOrigin|g" "$HOME"/BirdNET-Pi/scripts/adminer.php - sed -i "1a echo 'Open in new page';" "$HOME"/BirdNET-Pi/scripts/adminer.php -fi - # Add weekly report button ############################### if ! grep -q "Weekly Report" "$HOME"/BirdNET-Pi/homepage/views.php; then