Merge branch 'master' of ssh://holtrop.homelinux.com/files

This commit is contained in:
Josh Holtrop 2012-07-09 13:46:59 -04:00
commit 585b6ecfeb
2 changed files with 30 additions and 0 deletions

View File

@ -70,6 +70,16 @@ function prompt_ps1_svn_branch()
alias ls='ls --color=auto' alias ls='ls --color=auto'
alias strip-cr="sed -e 's/\x0d//'" alias strip-cr="sed -e 's/\x0d//'"
alias rip='abcde -x -p -o mp3:"-v -b160"' alias rip='abcde -x -p -o mp3:"-v -b160"'
function rip-dvd()
{
name="$1"
if [ "$name" == "" ]; then
echo 'specify dvd name'
else
mplayer dvd://1 -v -dupstream -dumpfile "$name.vob"
mencoder -ovc xvid -oac mp3lame -xvidencopts fixed_quant=4 -lameopts cbr:br=192:aq=1 -aid 128 -sid 0 -o "$name.avi" "$name.vob"
fi
}
export LESS='Ri' export LESS='Ri'
HISTCONTROL='ignoreboth' HISTCONTROL='ignoreboth'
HISTSIZE=5000 HISTSIZE=5000

20
id3guess Executable file
View File

@ -0,0 +1,20 @@
#!/usr/bin/env python
import os
import sys
import re
from subprocess import Popen, PIPE
sys.stdout.write('Artist: ')
artist = sys.stdin.readline().strip()
sys.stdout.write('Album: ')
album = sys.stdin.readline().strip()
sys.stdout.write('Year: ')
year = sys.stdin.readline().strip()
for f in sorted(os.listdir('.')):
m = re.match('(\d+)\s(.*)\.mp3', f, re.I)
if m is not None:
track, title = m.group(1, 2)
sys.stdout.write('%s: Track "%s", Title "%s"\n' % (f, track, title))
Popen(['id3tag', '-a', artist, '-A', album, '-y', year, '-t', track, '-s', title, f]).wait()