On branch new_daily_plot
Changes to be committed: modified: scripts/daily_plot.py
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
import mysql.connector as sql
|
||||
import os
|
||||
import configparser
|
||||
|
||||
import pandas as pd
|
||||
import seaborn as sns
|
||||
@@ -11,15 +12,17 @@ from matplotlib.colors import LogNorm
|
||||
from datetime import datetime
|
||||
import textwrap
|
||||
|
||||
BIRD_DB_PWD=os.getenv('DB_PWD')
|
||||
#Extract DB_PWD from thisrun.txt
|
||||
with open('/home/pi/BirdNET-Pi/thisrun.txt', 'r') as f:
|
||||
this_run = f.readlines()
|
||||
db_pwd = str(str(str([i for i in this_run if i.startswith('DB_PWD')]).split('=')[1]).split('\\')[0])
|
||||
|
||||
print(BIRD_DB_PWD)
|
||||
|
||||
db_connection = sql.connect(host='localhost',
|
||||
database='birds',
|
||||
user='birder',
|
||||
password='forms')
|
||||
#password = BIRD_DB_PASSWORD)
|
||||
password=db_pwd)
|
||||
|
||||
|
||||
db_cursor=db_connection.cursor(dictionary=True)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user