From c89f97e2bb1de6cf6ec9c4ad0e5948c22c8e49ff Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Sun, 6 May 2012 20:12:21 -0400 Subject: [PATCH 1/3] add rip-dvd --- bash_aliases | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/bash_aliases b/bash_aliases index 7676ec7..2225600 100755 --- a/bash_aliases +++ b/bash_aliases @@ -57,6 +57,16 @@ function prompt_ps1_git_branch() alias ls='ls --color=auto' alias strip-cr="sed -e 's/\x0d//'" 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' HISTCONTROL='ignoreboth' HISTSIZE=5000 From 96210fd6eafa44c2fb7cb4c376926f1468ed1f58 Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Sun, 3 Jun 2012 19:53:43 -0400 Subject: [PATCH 2/3] add id3guess --- id3guess | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 id3guess diff --git a/id3guess b/id3guess new file mode 100755 index 0000000..915f0a8 --- /dev/null +++ b/id3guess @@ -0,0 +1,18 @@ +#!/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() + +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, '-t', track, '-s', title, f]).wait() From 4b94a83b44998e4fcd393b8f616b766f2ed1b007 Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Sun, 3 Jun 2012 21:28:27 -0400 Subject: [PATCH 3/3] id3guess: prompt for year --- id3guess | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/id3guess b/id3guess index 915f0a8..5866678 100755 --- a/id3guess +++ b/id3guess @@ -9,10 +9,12 @@ 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, '-t', track, '-s', title, f]).wait() + Popen(['id3tag', '-a', artist, '-A', album, '-y', year, '-t', track, '-s', title, f]).wait()