Skip to content

Instantly share code, notes, and snippets.

View pygoner's full-sized avatar
🤪

Martin Jobke pygoner

🤪
View GitHub Profile
@pygoner
pygoner / CO2Signal.3min.py
Last active January 12, 2021 16:54
CO2 Signal plugin for BitBar - read line 14-15 for initialisation
#!/usr/bin/env PYTHONIOENCODING=UTF-8 /usr/local/bin/python3
# <bitbar.title>CO2Signal API</bitbar.title>
# <bitbar.version>v1.0</bitbar.version>
# <bitbar.author>Martin Jobke</bitbar.author>
# <bitbar.author.github>pygoner</bitbar.author.github>
# <bitbar.desc>This plugin displays the current gCO2eq emmissions per kWh of produced energy in the requested country </bitbar.desc>
# <bitbar.dependencies>python, CO2 Signal</bitbar.dependencies>
import requests