Created
December 27, 2017 23:29
-
-
Save kueller/b733f32d73668be19561c0a13dfffc0d to your computer and use it in GitHub Desktop.
This file contains 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
# Examples: | |
# | |
# Muse - Knights of Cydonia (Live at Wembley) :: kueller | |
# U2 - Even Better Than the Real Thing :: nsw1-6, TomGuy, and Fat Ha1p3rt | |
# | |
import sys | |
import time | |
with open(sys.argv[1], "r") as f: | |
setlist = f.read().split('\n') | |
for i in range(0, len(setlist)): | |
if setlist[i] == '': continue | |
raw_input('>') | |
tok = setlist[i].split('::') | |
if len(tok) < 2: continue | |
song = tok[0].strip() | |
author = tok[1].strip() | |
if len(author.split(',')) > 1: | |
authormsg = "Authors: %s" % author | |
else: | |
authormsg = "Author: %s" % author | |
msg = "Now Playing: \"%s\"\n%s" % (song, authormsg) | |
print("Changing to: \"%s\"" % song) | |
if i < len(setlist): | |
print("Next: \"%s\"" % setlist[i+1]) | |
time.sleep(10) | |
with open("current", "w") as f: | |
f.write(msg) | |
raw_input('>') | |
with open("current", "w") as f: | |
f.write("") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment