- Add the mungegenre function and related information
- Stars converted to pluses with mungefile
* examples/*, README, Makefile, debian/rules
- a basic daemon-like shell script to rip automatically when a CD is inserted
- a init.d/ script to start the daemon
- install the examples inside the tarball
- install the examples inside the /usr/share/doc dir in the debian package
git-svn-id: http://abcde.googlecode.com/svn/trunk@7
a0fa61bc-5347-0410-a1a9-
7f54aa4e1825
tarball:
@cd .. && tar czvf abcde_$(VERSION).orig.tar.gz \
tarball:
@cd .. && tar czvf abcde_$(VERSION).orig.tar.gz \
- abcde-$(VERSION)/{Makefile,COPYING,README,TODO,FAQ,abcde,abcde.1,abcde.conf,changelog,cddb-tool,cddb-tool.1}
+ abcde-$(VERSION)/{Makefile,COPYING,README,TODO,FAQ,abcde,abcde.1,abcde.conf,changelog,cddb-tool,cddb-tool.1,examples/}
* Support for keeping an existing playlist (and not add new entries to it),
erase the existing one (overwrite) or append new entries to the existing
one.
* Support for keeping an existing playlist (and not add new entries to it),
erase the existing one (overwrite) or append new entries to the existing
one.
+* Under ./examples you will find a very basic way to make abcde run in the
+ background and start a non-interactive rip of a CD, if it can find an
+ audio CD in the tray.
+ The abcded script depends on eject and cdparanoia being installed in your
+ system.
+* New mungegenre function to switch off (or modify) the default behaviour of
+ transforming uppercase characters to lowercase.
ALBUMFILE=$(mungefilename "$DALBUM")
ARTISTFILE=$(mungefilename "$TRACKARTIST")
TRACKFILE=$(mungefilename "$TRACKNAME")
ALBUMFILE=$(mungefilename "$DALBUM")
ARTISTFILE=$(mungefilename "$TRACKARTIST")
TRACKFILE=$(mungefilename "$TRACKNAME")
- GENRE=$(echo $CDGENRE | tr "[:upper:]" "[:lower:]")
+ GENRE=$(mungegenre "$GENRE")
YEAR=$(echo $CDYEAR)
# If we want to start the tracks with a given number, we need to modify the
# TRACKNUM value before evaluation
YEAR=$(echo $CDYEAR)
# If we want to start the tracks with a given number, we need to modify the
# TRACKNUM value before evaluation
for LASTTRACK in $TRACKQUEUE; do :; done
ALBUMFILE=$(mungefilename "$DALBUM")
ARTISTFILE=$(mungefilename "$DARTIST")
for LASTTRACK in $TRACKQUEUE; do :; done
ALBUMFILE=$(mungefilename "$DALBUM")
ARTISTFILE=$(mungefilename "$DARTIST")
- GENRE=$(echo $CDGENRE | tr "[:upper:]" "[:lower:]")
+ GENRE=$(mungegenre "$GENRE")
if [ "$VARIOUSARTISTS" = "y" ] ; then
PLAYLISTFILE=$(eval echo $VAPLAYLISTFORMAT)
else
if [ "$VARIOUSARTISTS" = "y" ] ; then
PLAYLISTFILE=$(eval echo $VAPLAYLISTFORMAT)
else
echo "$@" | sed s,:,\ -,g | tr \ /\* __+ | tr -d \'\"\?\[:cntrl:\]
}
echo "$@" | sed s,:,\ -,g | tr \ /\* __+ | tr -d \'\"\?\[:cntrl:\]
}
+# Custom genre munging:
+mungegenre ()
+{
+ echo $CDGENRE | tr "[:upper:]" "[:lower:]"
+}
+
# pre_read
# Empty pre_read function, to be defined in the configuration file.
pre_read ()
# pre_read
# Empty pre_read function, to be defined in the configuration file.
pre_read ()
the control character munging (NULs can't be in a filename either, and
newlines and such in filenames are typically not desirable).
.TP
the control character munging (NULs can't be in a filename either, and
newlines and such in filenames are typically not desirable).
.TP
+.B mungegenre
+mungegenre () is a shell function used to modify the $GENRE variable. As
+a default action, it takes $GENRE as $1 and outputs the resulting value
+to stdout converting all UPPERCASE characters to lowercase.
+.TP
+.B pre_read
+pre_read () is a shell function which is executed before the CDROM is read
+for the first time, during abcde execution. It can be used to close the CDROM
+tray, to set its speed (via "setcd" or via "eject", if available) and other
+preparation actions. The default function is empty.
+.TP
.B EJECTCD
If set to "y", abcde will call eject(1) to eject the cdrom from the drive
after all tracks have been read.
.B EJECTCD
If set to "y", abcde will call eject(1) to eject the cdrom from the drive
after all tracks have been read.
# * Translate colons to a space and a dash for Windows compatibility
# * Eat control characters, single quotes, and question marks
# * Translate spaces and forward slashes to underscores
# * Translate colons to a space and a dash for Windows compatibility
# * Eat control characters, single quotes, and question marks
# * Translate spaces and forward slashes to underscores
+# * Translate stars into pluses.
# To change that, redefine the mungefilename function.
# mungefilename recieves the CDDB data (artist, track, title, whatever)
# as $1 and outputs it on stdout.
# To change that, redefine the mungefilename function.
# mungefilename recieves the CDDB data (artist, track, title, whatever)
# as $1 and outputs it on stdout.
# echo "$@" | sed s,:,\ -,g | tr \ /\* __+ | tr -d \'\"\?\[:cntrl:\]
#}
# echo "$@" | sed s,:,\ -,g | tr \ /\* __+ | tr -d \'\"\?\[:cntrl:\]
#}
+# Custom genre munging:
+# By default we just transform uppercase to lowercase. Not much of a fancy
+# function, with not much use, but one can disable it ot just turn the first
+# Uppercase.
+#mungegenre ()
+#{
+# echo $CDGENRE | tr "[:upper:]" "[:lower:]"
+#}
+
+
# Custom pre-read function
# By default it does nothing.
# You can set some things to get abcde funtion in better ways:
# Custom pre-read function
# By default it does nothing.
# You can set some things to get abcde funtion in better ways:
-abcde (2.1.20-2.2pre2-1) unstable; urgency=low
+abcde (2.1.20-2.2pre2-1) experimental; urgency=low
* Added support for MPP/MP+(Musepack) encoding. Although I am trying to
get 2.2 for Debian Sarge release, mpc seems safe enough to introduce. See
* Added support for MPP/MP+(Musepack) encoding. Although I am trying to
get 2.2 for Debian Sarge release, mpc seems safe enough to introduce. See
* New "0" choice for "None of the above" has been introduced. If selected, a
template is created and the user encouraged to edit it (Closes: #147683).
* New options for when the PLAYLIST already exists: erase, append or keep.
* New "0" choice for "None of the above" has been introduced. If selected, a
template is created and the user encouraged to edit it (Closes: #147683).
* New options for when the PLAYLIST already exists: erase, append or keep.
- * Small bug fixes along the code:
- - abcde.1 corrections
+ * Small bug fixes along the code:
+ - abcde.1 corrections and additions
- abcde corrections
- abcde.conf additions
- abcde corrections
- abcde.conf additions
+ * The GENRE is munged now in its own mungegenre function, so that no more
+ upper-to-lowercase is done (forced) except if the default is used.
- -- Jesus Climent <jesus.climent@hispalinux.es> Sat, 10 Jul 2004 10:42:12 -0300
+ -- Jesus Climent <jesus.climent@hispalinux.es> Fri, 30 Jul 2004 15:14:18 +0300
abcde (2.1.19-1) unstable; urgency=low
abcde (2.1.19-1) unstable; urgency=low
# Add here commands to install the package into debian/tmp.
$(MAKE) install DESTDIR=`pwd`/debian/tmp
# Add here commands to install the package into debian/tmp.
$(MAKE) install DESTDIR=`pwd`/debian/tmp
+ install -d `pwd`/debian/tmp/usr/share/doc/abcde/examples
+ install -m 644 examples/* `pwd`/debian/tmp/usr/share/doc/abcde/examples
--- /dev/null
+#!/bin/sh
+
+##########
+# The first argument tells what to do.
+##########
+
+RUNNING=`ps -ef|grep [a]bcded|awk '{ print $2 }'`
+
+state=$1
+
+case $state in
+start)
+
+ if [ -n "$RUNNING" ]; then
+ echo "abcde daemon already running."
+ exit 0
+ fi
+
+ echo "Starting abcde daemon"
+ abcded &
+ echo "Done."
+ ;;
+stop)
+ if [ -n "$RUNNING" ]; then
+ /bin/kill -9 $RUNNING > /dev/null
+ if [ $? = 0 ]; then
+ echo "abcde daemon killed"
+ fi
+ fi
+ ;;
+restart)
+ $0 stop
+ $0 start
+ ;;
+*)
+ echo "Usage: $0 {start|stop|restart}"
+ exit 1
+esac
+
--- /dev/null
+#!/bin/sh
+# The first version of this script used a very linux-dependent aproach.
+# Modified to use cdparanoia and check for audio files on the CD
+
+#NOTE! Change the CDROM variable to point to your device.
+#CDROM=/proc/ide/hdh
+DELAY=10
+DO_RIP="/usr/bin/abcde -x -b -N"
+CDPARANOIA="cdparanoia -Q 2>&1 | grep 'audio only'"
+
+while true; do
+# CAPACITY=`cat $CDROM/capacity`
+# if [ $CAPACITY -gt 0 ]; then
+# $RIP
+# fi
+
+ sleep $DELAY
+ GO=$CDPARANOIA
+ RET=$?
+ if [ $RET = "0" ] ; then
+ DO_RIP
+ fi
+done
+