Skip to content

A live bird collage card for your Home Assistant dashboard.

adjustments -- generate BirdDB headers automatically

Patrick McGuire655d2ab49843
diff --git a/homepage/menu.html b/homepage/menu.html
index 4dfbd0cf..8121044e 100644
--- a/homepage/menu.html
+++ b/homepage/menu.html
@@ -73,7 +73,7 @@ body::-webkit-scrollbar {
</body>
<footer style="font-size: small;">
- Icon by <a style="font-weight: bold" href="https://www.freepik.com" title="Freepik">Freepik</a> from <a style="font-weight: bold" href="https://www.flaticon.com/" title="Flaticon">Flaticon.com</a>
+ Icon by <a style="font-weight: bold" href="https://www.freepik.com" title="Freepik">Freepik</a> from <a target="_content" style="font-weight: bold" href="https://www.flaticon.com/" title="Flaticon">Flaticon.com</a>
</footer>
</html>
diff --git a/scripts/install_services.sh b/scripts/install_services.sh
index 1b28eb54..03b2b3f7 100755
--- a/scripts/install_services.sh
+++ b/scripts/install_services.sh
@@ -145,6 +145,8 @@ create_necessary_dirs() {
fi
sudo -u ${USER} ln -fs $(dirname ${my_dir})/scripts/spectrogram.php ${EXTRACTED}
+ sudo -u ${USER} ln -fs $(dirname ${my_dir})/scripts/viewday.php ${EXTRACTED}
+ sudo -u ${USER} ln -fs $(dirname ${my_dir})/scripts/overview.php ${EXTRACTED}
sudo -u ${USER} ln -fs $(dirname ${my_dir})/scripts/viewdb.php ${EXTRACTED}
sudo -u ${USER} ln -fs ${HOME}/phpsysinfo ${EXTRACTED}
sudo -u ${USER} cp -f $(dirname ${my_dir})/templates/phpsysinfo.ini ${HOME}/phpsysinfo/
@@ -154,7 +156,14 @@ create_necessary_dirs() {
echo "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
+}
+generate_BirdDB() {
+ echo "Generating BirdDB.txt"
+ [ -f $(dirname ${my_dir})/BirdDB.txt ] || sudo -u ${USER} touch $(dirname ${my_dir})/BirdDB.txt
+ if ! grep Date $(dirname ${my_dir})/BirdDB.txt;then
+ sudo -u ${USER} sed -i '1 i\Date;Time;Sci_Name;Com_Name;Confidence;Lat;Lon;Cutoff;Week;Sens;Overlap' $(dirname ${my_dir})/BirdDB.txt
+ fi
}
install_alsa() {
diff --git a/scripts/update_services.sh b/scripts/update_services.sh
index 56c67ed9..11534a69 100755
--- a/scripts/update_services.sh
+++ b/scripts/update_services.sh
@@ -144,6 +144,8 @@ create_necessary_dirs() {
fi
sudo -u ${USER} ln -fs $(dirname ${my_dir})/scripts/spectrogram.php ${EXTRACTED}
+ sudo -u ${USER} ln -fs $(dirname ${my_dir})/scripts/viewday.php ${EXTRACTED}
+ sudo -u ${USER} ln -fs $(dirname ${my_dir})/scripts/overview.php ${EXTRACTED}
sudo -u ${USER} ln -fs $(dirname ${my_dir})/scripts/viewdb.php ${EXTRACTED}
sudo -u ${USER} ln -fs ${HOME}/phpsysinfo ${EXTRACTED}
sudo -u ${USER} cp -f $(dirname ${my_dir})/templates/phpsysinfo.ini ${HOME}/phpsysinfo/
@@ -154,6 +156,15 @@ create_necessary_dirs() {
sudo -u${USER} sed -i "s/https:\/\/v2.wttr.in\//https:\/\/v2.wttr.in\/"${LATITUDE},${LONGITUDE}"/g" $(dirname ${my_dir})/homepage/menu.html
}
+generate_BirdDB() {
+ echo "Generating BirdDB.txt"
+ [ -f $(dirname ${my_dir})/BirdDB.txt ] || sudo -u ${USER} touch $(dirname ${my_dir})/BirdDB.txt
+ if ! grep Date $(dirname ${my_dir})/BirdDB.txt;then
+ sudo -u ${USER} sed -i '1 i\Date;Time;Sci_Name;Com_Name;Confidence;Lat;Lon;Cutoff;Week;Sens;Overlap' $(dirname ${my_dir})/BirdDB.txt
+ fi
+}
+
+
install_alsa() {
echo "Checking for alsa-utils and pulseaudio"
if which arecord &> /dev/null ;then