Adding pythond3 virtualenv to birdnet analysis python call

This commit is contained in:
Jake Herbst
2022-05-16 21:46:24 -04:00
parent 670d3f90ca
commit dad5868f22
+9 -7
View File
@@ -29,8 +29,8 @@ fi
INCLUDE_LIST="$HOME/BirdNET-Pi/include_species_list.txt"
EXCLUDE_LIST="$HOME/BirdNET-Pi/exclude_species_list.txt"
if [ ! -f ${INCLUDE_LIST} ];then
touch ${INCLUDE_LIST} &&
if [ ! -f ${INCLUDE_LIST} ];then
touch ${INCLUDE_LIST} &&
chmod g+rw ${INCLUDE_LIST}
fi
if [ ! -f ${EXCLUDE_LIST} ];then
@@ -59,8 +59,8 @@ get_files() {
# Takes one argument:
# - {DIRECTORY}
move_analyzed() {
for i in "${files[@]}";do
j="${i}.csv"
for i in "${files[@]}";do
j="${i}.csv"
if [ -f "${1}/${j}" ];then
if [ ! -d "${1}-Analyzed" ];then
mkdir -p "${1}-Analyzed" && echo "'Analyzed' directory created"
@@ -75,7 +75,9 @@ move_analyzed() {
# Uses one argument:
# - {DIRECTORY}
run_analysis() {
sleep .5
PYTHON_VIRTUAL_ENV="$HOME/BirdNET-Pi/birdnet/bin/python3"
sleep .5
### TESTING NEW WEEK CALCULATION
WEEK_OF_YEAR="$(echo "($(date +%m)-1) * 4" | bc -l)"
@@ -123,7 +125,7 @@ run_analysis() {
BIRDWEATHER_ID_PARAM=""
BIRDWEATHER_ID_LOG=""
fi
echo analyze.py \
echo $PYTHON_VIRTUAL_ENV analyze.py \
--i "${1}/${i}" \
--o "${1}/${i}.csv" \
--lat "${LATITUDE}" \
@@ -135,7 +137,7 @@ run_analysis() {
${INCLUDEPARAM} \
${EXCLUDEPARAM} \
${BIRDWEATHER_ID_LOG}
analyze.py \
$PYTHON_VIRTUAL_ENV analyze.py \
--i "${1}/${i}" \
--o "${1}/${i}.csv" \
--lat "${LATITUDE}" \