diff options
author | Max Kellermann <max@duempel.org> | 2008-09-25 17:49:56 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-09-25 17:49:56 +0200 |
commit | 43e418ebd4086dd483d0ec727ddcabf375f7d360 (patch) | |
tree | 8680f6b618601eecba1fef2f9a864c99fe1e0b6e /lyrics | |
parent | e4a12c7faadb9ed9ddffa6164ea27813716fdce4 (diff) | |
download | mpd-43e418ebd4086dd483d0ec727ddcabf375f7d360.tar.gz mpd-43e418ebd4086dd483d0ec727ddcabf375f7d360.tar.xz mpd-43e418ebd4086dd483d0ec727ddcabf375f7d360.zip |
lyrics: replaced "hd.py" with "hd.sh"
Replace the "hd" plugin with a trivial shell script.
Diffstat (limited to 'lyrics')
-rwxr-xr-x | lyrics/hd.py | 22 | ||||
-rwxr-xr-x | lyrics/hd.sh | 8 |
2 files changed, 8 insertions, 22 deletions
diff --git a/lyrics/hd.py b/lyrics/hd.py deleted file mode 100755 index 173342c98..000000000 --- a/lyrics/hd.py +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/python -# -# Load lyrics from the user's home directory -# -# Author: Max Kellermann <max@duempel.org> -# - -from sys import argv, exit, stdout -from os import environ -from os.path import expanduser - -path = expanduser("~/.lyrics/%s - %s.txt" % (argv[1], argv[2])) -try: - f = file(path) -except IOError: - exit(2) - -while True: - x = f.read(4096) - if not x: - break - stdout.write(x) diff --git a/lyrics/hd.sh b/lyrics/hd.sh new file mode 100755 index 000000000..4bcbce4bb --- /dev/null +++ b/lyrics/hd.sh @@ -0,0 +1,8 @@ +#!/bin/sh -e +# +# Load lyrics from the user's home directory +# +# Author: Max Kellermann <max@duempel.org> +# + +cat ~/.lyrics/"$1 - $2".txt 2>/dev/null |