Created
December 31, 2015 11:07
-
-
Save darkfeline/ad7f08a4f3f31950ffb5 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/python3 | |
| """ | |
| ytplay | |
| ====== | |
| Play a list of youtube songs from stdin, echoing to stdout. | |
| """ | |
| import subprocess | |
| import sys | |
| for line in sys.stdin: | |
| subprocess.call(['mpv', '--no-video', '--no-terminal', line.rstrip()]) | |
| sys.stdout.write(line) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment