UI tweaks

This commit is contained in:
ehpersonal38
2022-05-13 14:09:34 -04:00
parent 444aeb166a
commit b550421be0
4 changed files with 47 additions and 11 deletions
+10
View File
@@ -7,6 +7,8 @@ import matplotlib.pyplot as plt
from matplotlib.colors import LogNorm
from datetime import datetime
import textwrap
import matplotlib.font_manager as font_manager
from matplotlib import rcParams
userDir = os.path.expanduser('~')
conn = sqlite3.connect(userDir + '/BirdNET-Pi/scripts/birds.db')
@@ -29,6 +31,14 @@ df['Hour of Day'] = [r.hour for r in df.Time]
#Create separate dataframes for separate locations
df_plt=df #Default to use the whole Dbase
# Add every font at the specified location
font_dir = ['$HOME/BirdNET-Pi/homepage/static']
for font in font_manager.findSystemFonts(font_dir):
font_manager.fontManager.addfont(font)
# Set font family globally
rcParams['font.family'] = 'Roboto Flex'
#Get todays readings
now = datetime.now()
df_plt_today = df_plt[df_plt['Date']==now.strftime("%Y-%m-%d")]
+1
View File
@@ -37,6 +37,7 @@ $totalcount = $result1->fetchArray(SQLITE3_ASSOC);
<td><?php echo $totalcount['COUNT(*)'];?></td>
</tr>
</table>
<br><br>
<?php
if (file_exists('./Charts/'.$chart)) {
echo "<img src=\"/Charts/$chart?nocache=time()\" >";