Created
October 21, 2014 12:38
-
-
Save feuerrot/27dceb1245b9343e11ae to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import sys | |
import subprocess | |
reloadtime = 30 | |
args = dict(ac='Aachen',d='Duesseldorf',e='Essen',do='Dortmund') | |
key = sys.argv[1] | |
def geturl(city): | |
return "http://www.yr.no/place/Germany/North_Rhine-Westphalia/{}/meteogram.png".format(args[city]) | |
def gettitle(city): | |
return "yrno" | |
file = subprocess.Popen(['feh', '--title', gettitle(key), '--reload', str(reloadtime), geturl(key)]) | |
file.wait() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment