Created
April 30, 2016 13:25
-
-
Save tobigue/38405b66b73daeb0e58303a6081cc11d to your computer and use it in GitHub Desktop.
vlc dvbt picker
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
import sys, io, csv, subprocess | |
VLC = "C:\\Program Files (x86)\\VideoLAN\\VLC\\vlc.exe" | |
programs = """ | |
Programm,Frequenz,SID | |
Das Erste,522,14 | |
ZDF,570,514 | |
RTL Television,506,16405 | |
SAT.1,658,16408 | |
ProSieben,658,16403 | |
VOX,506,16418 | |
kabel eins,658,16394 | |
RTL2,506,16406 | |
Super RTL,506,16411 | |
rbb Berlin,522,12 | |
rbb Brandenburg,522,11 | |
EinsExtra,522,15 | |
Phoenix,522,13 | |
3sat,570,515 | |
ZDFinfokanal,570,516 | |
neo/KiKa,570,517 | |
Bayerisches FS,618,34 | |
n-tv,618,16400 | |
QVC,618,16404 | |
Channel 21/Euronews,618,16421 | |
Bibel TV,618,16426 | |
DAS VIERTE,618,16430 | |
N24,658,16398 | |
arte,682,4913 | |
MDR Sachsen,682,97 | |
NDR FERNSEHEN,682,129 | |
WDR Köln,706,262 | |
Südwest BW/RP,706,225 | |
HSE24,706,16387 | |
TELE 5,706,16413 | |
Eurosport,754,16420 | |
TV.Berlin,754,16579 | |
sixx,754,16401 | |
imusic TV,754,16392 | |
""".strip() | |
f = io.StringIO(programs) | |
reader = csv.reader(f, delimiter=",") | |
next(reader) # skip first row | |
program_data = {} | |
for i, row in enumerate(reader, 1): | |
program_data[str(i)] = row | |
print(i, row[0]) | |
print() | |
chosen = input("Pick a number: ") | |
freq = program_data[chosen][1] | |
prog = program_data[chosen][2] | |
subprocess.Popen([VLC, "dvb-t://frequency=%s000000:bandwidth=0" % freq, ":program=%s" % prog]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment