From 306c4ff2042e4e99bfac5af752d7435130a2fcc4 Mon Sep 17 00:00:00 2001 From: DarthKeizer Date: Sat, 13 May 2017 17:05:24 +0200 Subject: [PATCH] Update twittertweeter-ads.py added option for a whole number format output, use %i --- twittertweeter-ads.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/twittertweeter-ads.py b/twittertweeter-ads.py index ce62cba..e8cddfb 100644 --- a/twittertweeter-ads.py +++ b/twittertweeter-ads.py @@ -11,7 +11,7 @@ data = urlopen('path/to/admin/api.php').read() #bytes body = data.decode('utf-8') data = json.loads(body) -# Create tweet, adjust %.2f for amount of decimals you want +# Create tweet, adjust %.2f for amount of decimals you want or %i for a whole number template_tweet = "\nAds Blocked: %s\nAds Percentage Today: %.2f\nDNS Queries Today: %s\nDomains Being Blocked: %s" data = template_tweet % (data['ads_blocked_today'], float (data['ads_percentage_today']),