User Tools

Site Tools


m0tzoinkyphat

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
m0tzoinkyphat [2022/07/27 18:14] – created m0tzom0tzoinkyphat [2024/04/23 22:33] (current) m0tzo
Line 16: Line 16:
  
 PATH = os.path.dirname(__file__) PATH = os.path.dirname(__file__)
-API_URL = 'https://m.0tzo.me/index.php/api/statistics'+API_URL = 'https://m.0tzo.me/index.php/api/statistics/<cloudlog-api>/'
  
 # Fetching the data from the API # Fetching the data from the API
Line 22: Line 22:
     resp = requests.get(API_URL, timeout=(15, 30))     resp = requests.get(API_URL, timeout=(15, 30))
     data = resp.json()     data = resp.json()
-    TODAY_TEXT = "Today:data['Today'+    TODAY_TEXT = "Today: {:,}".format(int(data['Today']))  # Format with commas 
-    TOTAL_TEXT = "Total: " + data['total_qsos'] + " - " + datetime.now().strftime('%H:%M')  +    TOTAL_TEXT = "Total: {:,} - {}".format(int(data['total_qsos']), datetime.now().strftime('%H:%M')) 
-    MONTH_TEXT = "Month: " + data['month_qsos'+    MONTH_TEXT = "Month: {:,}".format(int(data['month_qsos']))  # Format with commas 
-    YEAR_TEXT  = "Year: " + data['year_qsos'+    YEAR_TEXT = "Year: {:,}".format(int(data['year_qsos']))  # Format with commas 
 + 
 +#   TODAY_TEXT = "Today: " + data['Today'
 +#   TOTAL_TEXT = "Total: " + data['total_qsos'] + " - " + datetime.now().strftime('%H:%M')  
 +#   MONTH_TEXT = "Month: " + data['month_qsos'
 +#   YEAR_TEXT  = "Year: " + data['year_qsos'
  
 except Exception as e: except Exception as e:
m0tzoinkyphat.1658945679.txt.gz · Last modified: 2022/07/27 18:14 by m0tzo