dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit 84b187643499e8d121719374a53c85b995e125ba
parent 333a2455b6c890a250e19f2de9cd78441cdc8248
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Mon,  2 Sep 2019 16:32:52 +0200

Add script to rip audio cd

Diffstat:
A.local/bin/rip-audio-cd.sh | 28++++++++++++++++++++++++++++
1 file changed, 28 insertions(+), 0 deletions(-)

diff --git a/.local/bin/rip-audio-cd.sh b/.local/bin/rip-audio-cd.sh @@ -0,0 +1,28 @@ +#!/bin/sh +set -e + +# https://wiki.archlinux.org/index.php/Rip_Audio_CDs + +help() { + echo "$0" + echo "rips audio to highest bitrate mp3 and flac from default cd drive" + echo "requires cdrtools, lame and flac" +} + +#drive=/dev/sr0 + +if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then + help + exit 0 +fi + +sudo cdda2wav -vall cddb=0 speed=4 -paranoia paraopts=proof -B +orig_user=$(whoami) +sudo chown $orig_user:$orig_user *.wav + +for f in *.wav; do + lame -V0 "$f" + flac "$f" +done + +rm ./*.wav