Cron job and english translation. #2

Closed
mwoolweaver wants to merge 30 commits from cron-job into master
Showing only changes of commit 9933141e70 - Show all commits

View File

@ -65,12 +65,13 @@ def get_pihole_data():
def construct_tweet(data):
today = datetime.today().strftime("%m.%d.%Y")
tweet = 'Pi-hole statistics for {date}:\n'.format(date=today)
today = datetime.today().strftime("%m/%d/%Y")
tweet += 'Pi-hole statistics for {date}:\n'.format(date=today)
tweet += 'Ads Blocked: ' + str(comma_value(data['ads_blocked_today']))
tweet += ' (' + str(round(data['ads_percentage_today'], 2)).replace('.', ',') + ' %)\n'
tweet += 'Total DNS Queries: ' + str(comma_value(data['dns_queries_today'])) + '\n'
tweet += 'Domains on Blocklist: ' + str(comma_value(data['domains_being_blocked']))
tweet += '#Sky-hole: The @The_Pi_Hole on @GoogleCompute.'
return tweet