changes that remove the default pi user

This commit is contained in:
mcguirepr89
2022-04-11 17:29:00 -04:00
parent 6495284d21
commit f69f04d19d
24 changed files with 169 additions and 153 deletions
+6 -3
View File
@@ -1,3 +1,4 @@
#!/home/patrick/BirdNET-Pi/birdnet/bin/python3
import sqlite3
import os
import configparser
@@ -8,7 +9,8 @@ from matplotlib.colors import LogNorm
from datetime import datetime
import textwrap
conn = sqlite3.connect('/home/*/BirdNET-Pi/scripts/birds.db')
userDir = os.path.expanduser('~')
conn = sqlite3.connect(userDir + '/BirdNET-Pi/scripts/birds.db')
df = pd.read_sql_query("SELECT * from detections", conn)
cursor = conn.cursor()
cursor.execute('SELECT * FROM detections')
@@ -97,7 +99,8 @@ f.subplots_adjust(top=0.9)
plt.suptitle("Top 10 Last Updated: "+ str(now.strftime("%Y-%m-%d %H:%M")))
#Save combined plot
savename='/home/*/BirdSongs/Extracted/Charts/Combo-'+str(now.strftime("%Y-%m-%d"))+'.png'
userDir = os.path.expanduser('~')
savename=userDir + '/BirdSongs/Extracted/Charts/Combo-'+str(now.strftime("%Y-%m-%d"))+'.png'
plt.savefig(savename)
plt.show()
plt.close()
@@ -165,7 +168,7 @@ f.subplots_adjust(top=0.9)
plt.suptitle("Bottom 10 Last Updated: "+ str(now.strftime("%Y-%m-%d %H:%M")))
#Save combined plot
savename='/home/*/BirdSongs/Extracted/Charts/Combo2-'+str(now.strftime("%Y-%m-%d"))+'.png'
savename=userDir + '/BirdSongs/Extracted/Charts/Combo2-'+str(now.strftime("%Y-%m-%d"))+'.png'
plt.savefig(savename)
plt.show()
plt.close()