Skip to content

Commit

Permalink
Added ability to print or email daily report
Browse files Browse the repository at this point in the history
  • Loading branch information
adamsher committed May 18, 2023
1 parent ec3fd78 commit 58a3881
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/devicekiosk.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,12 @@ def dailyReport(self):
print('SQLite Connection closed')

print(body)
self.emailDailyReport(body)
if (self.config["email_daily_report"] == True):
self.emailDailyReport(body)

if (self.config["print_daily_report"] == True):
lpr = subprocess.Popen("/usr/bin/lpr", stdin=subprocess.PIPE)
lpr.communicate(bytes(body, 'utf-8'))

def emailDailyReport(self, body):
msg = EmailMessage()
Expand Down
2 changes: 1 addition & 1 deletion src/qml/Start.qml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ Item {
}
Button {
id: btnDailyReport
text: "Email Daily Report"
text: "Daily Report"
visible: false
font.pointSize: 50
Layout.fillWidth: true
Expand Down

0 comments on commit 58a3881

Please sign in to comment.