Feat : add species whitelist (#110)

* Add white_list to server.py

https://github.com/Nachtzuster/BirdNET-Pi/issues/108

* Create whitelist_list.php

* Add whitelist to views

* Make more explicit the usage

* Update views.php

* Align with uppercase

* Align with "species"

https://github.com/Nachtzuster/BirdNET-Pi/issues/108

* Update views.php

* Correct python code

https://github.com/Nachtzuster/BirdNET-Pi/issues/108

* Align clear_all_data.sh

* Align install_services.sh

* Embed whitelist_species_list in PREDICTED_SPECIES_LIST

* Only embed whitelist in predicted list

* Correct python append @dalogue1

https://github.com/Nachtzuster/BirdNET-Pi/issues/108#issuecomment-2183508903

* Update scripts/server.py

Co-authored-by: Nachtzuster <Nachtzuster@users.noreply.github.com>

* Use preexisting functions

Co-authored-by: Nachtzuster <Nachtzuster@users.noreply.github.com>

* Alert not a recommended WoW

---------

Co-authored-by: Nachtzuster <Nachtzuster@users.noreply.github.com>
This commit is contained in:
Alexandre
2024-06-30 10:18:32 +02:00
committed by GitHub
parent 8a92469f45
commit 18693fae06
5 changed files with 138 additions and 0 deletions
+3
View File
@@ -135,6 +135,9 @@ def predictSpeciesList(lat, lon, week):
# if there's a custom user-made include list, we only want to use the species in that
if (len(INCLUDE_LIST) == 0):
PREDICTED_SPECIES_LIST.append(s[1])
WHITELIST_LIST = loadCustomSpeciesList(os.path.expanduser("~/BirdNET-Pi/whitelist_species_list.txt"))
for species in WHITELIST_LIST:
PREDICTED_SPECIES_LIST.append(species)
def loadCustomSpeciesList(path):