From c9c2ca2730a901eb83ebbdb15522bd2a5849b64f Mon Sep 17 00:00:00 2001 From: data Date: Tue, 22 Jun 2004 05:42:05 +0000 Subject: [PATCH] Check-in after database failure git-svn-id: http://abcde.googlecode.com/svn/trunk@1 a0fa61bc-5347-0410-a1a9-7f54aa4e1825 --- COPYING | 340 +++++++ FAQ | 98 ++ KNOWN.BUGS | 1 + Makefile | 28 + README | 211 +++++ TODO | 35 + abcde | 2213 ++++++++++++++++++++++++++++++++++++++++++++++ abcde.1 | 355 ++++++++ abcde.conf | 248 ++++++ cddb-tool | 239 +++++ cddb-tool.1 | 97 ++ changelog | 844 ++++++++++++++++++ debian/changelog | 850 ++++++++++++++++++ debian/conffiles | 1 + debian/control | 19 + debian/copyright | 24 + debian/dirs | 2 + debian/docs | 4 + debian/files | 1 + debian/preinst | 26 + debian/rules | 70 ++ 21 files changed, 5706 insertions(+) create mode 100644 COPYING create mode 100644 FAQ create mode 100644 KNOWN.BUGS create mode 100644 Makefile create mode 100644 README create mode 100644 TODO create mode 100755 abcde create mode 100644 abcde.1 create mode 100644 abcde.conf create mode 100755 cddb-tool create mode 100644 cddb-tool.1 create mode 100644 changelog create mode 100644 debian/changelog create mode 100644 debian/conffiles create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/dirs create mode 100644 debian/docs create mode 100644 debian/files create mode 100644 debian/preinst create mode 100755 debian/rules diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..60549be --- /dev/null +++ b/COPYING @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) 19yy + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) 19yy name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/FAQ b/FAQ new file mode 100644 index 0000000..8fe8ef9 --- /dev/null +++ b/FAQ @@ -0,0 +1,98 @@ + +Q. I am using MacOSX and I am having problems to use abcde. +A. Well, I have a Mac, but I use linux on it. I have not been able to find + a way to make it work there, since I do not have the development tools + installed. I have placed a basic support, but some user reports are just + complaining about abcde not encoding the ripped tracks, as if + cdda2wav/cdparanoia/cddafs would never end reading them. If you have such + a system and experience problems, please, report them, and I will try to + work them out with your help. + +Q. I would like to give the trackname and the artist_name directly to the + encoder (in my case oggenc), but found no documentation. +A. That is not possible, since abcde gets the information from CDDB database. + You can create a template and fill it with the option "-n". + +Q. What formats can I encode my music to? +A. As for version 2.1.7, abcde includes support for MP3, Ogg/Vorbis, + Ogg/Speex and Flac. + +Q. I have a CD with a data track, and abcde complaints it cannot read/encode + it. +A. It is not easy to find a data track on a CD. Right now, I can only think + of getting the track info from CDDB and ask the user for continuing should + a "data" track name is found. But the solution is far from been optimal. + For now, if you find a "data" track and you know the number, restart abcde + specifying the tracks to be encoded, leaving out the data one. + +Q. How can I separate the different output files I get using multiple-output + support? +A. Use the OUTPUT variable in PLAYLISTFORMAT and OUTPUTFORMAT. It holds the + different output file types you passed to abcde (i.e., ogg, mp3, flac) + during playlist creation and file/directory creation. + +Q. I keep on getting files with ".ogg.ogg" extension. What am I doing wrong? +A. The code for multiple-output adds automatically the extension of the + different outputs you select with the "-o" extension (or with OUTPUTTYPE + variable). Erase the ".${OUTPUTTYPE}" part from the OUTPUTFORMAT variable + in /etc/abcde.conf or ~/.abcde.conf + +Q. I use Debian/RedHat/(put your Unix flavour here) and MP3 encoding is not + working. What am I doing wrong? +A. Since MP3 is considered non-free (you get it for free, but hardware players + and net broadcasters have to pay license fees), some release engineering + groups and release management teams have decided not to provide MP3 encoding + tools. + These distributions or operative systems have decided to use Ogg/Vorbis as + the default encoding format, since it contains no (known) patent claims + and they are (supposed to be) completely Free (released under a BSD-like + license). + However, there is no strong (at the moment) hardware support, although + some groups and companies are strongly working on getting it, real soon + now. For that reason some people prefer to encode to MP3. + + UPDATE *** UPDATE + There are at least 3 known brands already selling Ogg/Vorbis portable + players: Rio, iRiver and Neuros. + Go buy one and you have no more reasons to use MP3. + + If you are among those individuals, you might need to add support for MP3 + encoding to your system: + Debian : check http://marillat.free.fr to install lame in your system. + others prefer bladeenc. Check www.apt-get.org or google. + RedHat : search on rpmfind.net + FreeBSD: By default includes LAME support. + OpenBSD: Available by specifying you want to install the port with LAME + support, or by just installing it later from the ports tree. + NetBSD : Available in pkgsrc. + + Others : Please, help me here. + +Q. I have modified some of the options, and now CDDB has stopped working. +A. Check that you have modified everything in the right way. For instance, if + you modify the HTTPGET program you might want to set some options of your + own. If you use the predefined ones (wget, curl and fetch) abcde will try + to use some defaults. Keep in mind that the output should go to the output + as standard output, to be saved in a file for later use. + +Q. My hardware player (put it here) does not recognize the playlists created + with abcde. What I am doing wrong? +A. Try using "-m" when creating the playlists, or setting DOSPLAYLIST as an + option in the config file. + +Q. I am requested to have eject when setting the speed although I do not use + for anything. +A. If you do not use cdparanoia, eject is used for setting the speed of the + cdrom drive. You can substitute it for "cdset" with "-x" as the argument, + but you have to install it manually. + Another way to get the same results is using the pre_read function, defined + in your /etc/abcde.conf file. + +OBSOLETE +-------- +Q. I set KEEPWAVS to "y" but abcde insists on erasing my directory, along + with the wav tracks. What I am doing wrong? +A. The default action set includes clean, which cleans the temp directory, + if nothing goes wrong. Take the "clean" out from the action list and you + are done. + UPDATE: KEEPWAVS unselects now the clean action. diff --git a/KNOWN.BUGS b/KNOWN.BUGS new file mode 100644 index 0000000..a45b148 --- /dev/null +++ b/KNOWN.BUGS @@ -0,0 +1 @@ +No serious ones ;) diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..b2774f9 --- /dev/null +++ b/Makefile @@ -0,0 +1,28 @@ +VERSION = 2.1.20 +INSTALL = /usr/bin/install -c + +# Installation directories +prefix = ${DESTDIR}/usr +exec_prefix = ${prefix} +mandir = ${prefix}/share/man/man1 +bindir = ${exec_prefix}/bin +etcdir = ${DESTDIR}/etc + +all: + +clean: + +install: + $(INSTALL) -d -m 755 $(bindir) + $(INSTALL) -m 755 -o 0 abcde $(bindir) + $(INSTALL) -m 755 -o 0 cddb-tool $(bindir) + $(INSTALL) -d -m 755 $(mandir) + $(INSTALL) -m 644 -o 0 abcde.1 $(mandir) + $(INSTALL) -m 644 -o 0 cddb-tool.1 $(mandir) + $(INSTALL) -d -m 755 $(etcdir) + $(INSTALL) -m 644 -o 0 abcde.conf $(etcdir) + +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} + diff --git a/README b/README new file mode 100644 index 0000000..3e80ccd --- /dev/null +++ b/README @@ -0,0 +1,211 @@ +ABCDE +===== + +abcde is a frontend command-line utility (actually, a shell script) that +grabs tracks off a CD, encodes them to Ogg/Vorbis, MP3, FLAC or Ogg/Speex +format, and tags them, all in one go. + +Your finished Ogg/MP3/FLAC/Speex's are, by default, stored in a subdirectory of +the current directory (named after the artist) with a filename based on the +track title. Spaces are replaced by underscores, and apostrophes and +control codes are filtered out. Colons are replaced with an underscore and a +hyphen. The end result usually looks like: Our_Lady_Peace/01.Supermans_Dead.ogg +This filename munging is customizable - edit the mungefilename function in +your abcde.conf to change it. + +Need to go through an HTTP proxy for CDDB access? No problem, just export +your http_proxy variable first so wget/fetch/curl can see it. + +You already store CDDB entries for your CD collection on your hard disk? Piece +of cake. Just edit CDDBLOCALDIR to point to the repository and give abcde the +"-L" flag to make use of it. + +Low on disk space? abcde has different algorithms to schedule ripping and +encoding - to optimize for disk conservation, use -l. + +abcde can also take advantage of SMP systems, just like make. Try +'abcde -j 2' - it'll run two encoder jobs while it rips the next +track. + +abcde now uses FreeDB by default. To use a different FreeDB mirror or +another CDDB service, change the CDDBURL option in your abcde.conf. + +Frustrated that you can't use the CPU power on Machine A sitting right +next to Machine B with the fast cdrom drive? Now you don't have to be - +Run distmp3host (included in distmp3) on Machine A, and then run +abcde -r MachineA from Machine B (where "MachineA" is a dns name or IP +address). Use this in combination with '-j 0' to shift all encoding off the +local machine. + +You do not have internet connection, or just feel with free time to write +down all the song names and artists instead of using CDDB? Use -n and edit +the template. + +To make abcde 2.x work more like 1.x, put these options in your abcde.conf: + +INTERACTIVE=n +OUTPUTTYPE=mp3 +ID3TAGV=1 + +NOTICE: abcde needs cd-discid. Grab it from: +http://www.hispalinux.es/~data/files/cd-discid/ + +MAJOR CHANGES +============= +New options in 2.1.19: + +* ONETRACK mode has been introduced. Setting the flag "-1" will create a + single file with all the tracks from the CD. + +Changes in 2.1.18: + +* CDSPEED option defaults to eject. However, since cdparanoia has a built-in + option to set the speed, we use it. There is not way (right now) to force + the use of eject, but it will be introduced in a future release. Also one + can use the pre_read function to set the speed with other program. + +New options in 2.1.16: + +* -S, CDSPEED and CDSPEEDOPTS for setting the speed of the CDROM. One can + set the options in abcde.conf and pass the value on the command line. + This option can be used with "eject -x ", "setcd -x " or the + built-in cdparanoia option "-S ", if the CD reader supports it. +* Added a pre-read function. Modify it at your pleasure in abcde.conf + One can use it to close the CD drive. +* -m option, to modify the playlist to include CRLF in every line. Some + players insist on having those to work properly with playlists. + +New options in 2.1.15: + +* -V can be used to obtain some more information about the CDDB queries. +* -v shows the version, basic help, and exits. + +New options from 2.1.10 to 2.1.13: + +* CDROMID has been introduced for cdda2wav use with SCSI devices. +* Use -L to retrieve the CDDB entries from a local repository (also one can + set CDDBUSELOCAL in the config file). +* If CDDBCOPYLOCAL is set to "y" we store copies of the CDDB entries, under + CDDBLOCALDIR (defaults to "~/.cddb). + +Modifications from 2.1.9 to 2.1.10: + +* Initial (still incomplete) MacOSX support is on the works. +* A new tool (curl) has been added for MacOSX compatibility, as HTTPGET + option. + +Options modified from 2.1.8 to 2.1.9: + +* KEEPWAVS option now sets the clean to "no". + +Options added/modified from 2.1.3 to 2.1.5: + +* Ogg/Speex added. Use "-o spx" to rip your audiobooks, for instance. + +Options added/modified from 2.1.1 to 2.1.3: + +* WGET has been substituted by HTTPGET. Now we support fetch as retrieval + program. +* KEEPWAVS has been introduced. Set it to "y" and the wav tracks will be + kept. +* CDDBPROTO is used to specify the protocol level in the CDDB retrieval. +* DAGRAB has been introduced as a cd ripper. + +Options added/modified from 2.0.3 to 2.1.x: + +* -b use batch processing. It uses normalize to adjust the volume of the + songs, and a -g gapless option from lame to remove gaps. Only available + for mp3+lame combination. +* a new "normalize" option has been added to -a, to normalize the volume. +* -o works now with a combination of the different outputs: ogg, mp3, flac. + Combine them separated by ",". Example: "-o ogg,flac". +* OUTPUTTYPE is no longer used for the output file type. From version 2.1 + abcde implements multiple-output and the file type is always appended at + the end of the file. The OUTPUT variable can be used in the + PLAYLISTFORMAT and OUTPUTFORMAT to create different directory structures + and playlist names for each of the output formats selected. +* DYEAR can be used as DiskYear value in CDDB data. If the data is not + supplied by the CDDB server, it can be added. + +Other options that changed from 1.x to 2.x: + +* -e doesn't exist anymore, abcde now presents you with all of the cddb data + and asks you if you want to edit it. If you don't want to be asked, + use -N or INTERACTIVE=n +* The output type defaults to Ogg/Vorbis. Specify -o mp3 or OUTPUTTYPE=mp3 + if you still want to output mp3's. +* -l 2 is now just -l, LOWDISK=2 should now be LOWDISK=y +* -V and -v are gone, abcde will now prompt you if you'd like to use Various + Artists handling, after showing you the cddb data. +* -P is now '-a playlist,clean', PLAYLISTONLY=y is now + ACTIONS=playlist,clean +* -p is now '-a playlist,move,clean', PLAYLIST=y is now + ACTIONS=playlist,move,clean +* cddb-tool has been cleaned up a little bit. 'get' is now 'query' and + 'read', and the tempfile handling has been removed. +* ID3COMMENT is now COMMENT. +* FreeDB is now the default CDDB database. + + +REQUIREMENTS +============ + +abcde requires the following backend tools to work: + +* An Ogg/Vorbis encoder (oggenc, the default, or vorbize) or: +* An MP3 encoder (lame, gogo, bladeenc, l3enc, etc). Any MP3 encoder that + takes two filenames on the command line, one for input, one for output, + will work. + You can get lame at: http://www.mp3dev.org/mp3/ + You can get gogo at: http://homepage1.nifty.com/herumi/gogo_e.html + You can get BladeEnc at: http://bladeenc.mp3.no/ + You can get a trial version of mp3enc at: + http://www.iis.fhg.de/amm/download/ or: +* FLAC encoder (flac) or: +* Ogg/Speex encoder (speexenc) +* normalize for volume normalization. +* CD Paranoia, an audio CD reading utility, +* Or cdda2wav, the audio CD reading utility cdparanoia was born from, +* Or dagrab, another audio CD reading utility. +* cd-discid, a CDDB DiscID reading program. Formerly bundled with abcde. + It's available in Debian or http://www.hispalinux.es/~data/files/cd-discid/ +* An HTTP retrieval program: wget, fetch (FreeBSD) or curl (MacOSX) +* id3, an id3 tagging program. Available at: http://lly.org/~rcw/id3/ +* id3v2, an id3 version 2.0 tagger. http://id3v2.sourceforge.net/ +* (optional) distmp3, a client/server for distributed mp3 encoding. + You can get distmp3 at http://wlug.westbo.se/medlprog/medlprog.html + +Potential problems: + +Having trouble getting cdparanoia to read from your drive as a user? +Add yourself to the cdrom group, change the permissions on your cdrom device +to 660, and if you have a SCSI cdrom drive, check the permissions on +/dev/sg* as well. + +Running out of disk space for .wav files but don't want to use -l? Put them +in a different location by adding WAVOUTPUTDIR=/some/other/path to your +/etc/abcde.conf or ~/.abcde.conf. + +If abcde seems to be ignoring your configuration options or not running +commands such as the encoder, you may have misquoted something. Config +options such as the following do not work: + +LAMEOPTS=-h -k + +Try this instead: + +LAMEOPTS='-h -k' + +Abcde's new mailing list is abcde@listas.hispalinux.es. So far has not +been actively used. +The posts from non-subscribers are moderated to prevent spam. + +Archives of the old list are publically available at: +http://lly.org/~rcw/abcde/list/current/threads.html + +Abcde's current page is at http://www.hispalinux.es/~data/abcde.php +Abcde's new homepage will be at http://abcde.hispalinux.es/. +Abcde's old homepage is at http://lly.org/~rcw/abcde/page/. +-- +Robert Woodcock +Jesus Climent diff --git a/TODO b/TODO new file mode 100644 index 0000000..16797b0 --- /dev/null +++ b/TODO @@ -0,0 +1,35 @@ +TODO: +---- +* move the wav files to a different dir if the user wants to keep the tracks +* read the TOC and CDTEXT files and store them +* read the complete CD to a single file, storing TOC seems a good idea to + recreate the index entries if we decide to burn the cd. +* Make concatenating CD1...Cdn sets into one album possible: Maybe a "start + with number for files" flag? + +* read_and_encode function that uses named pipes for further ripping/encoding + parallelization where possible +* read_and_encode_and_tag? :) +* Customizable post-read/encode/tag hooks + (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=114851) + +* Separate local/dist tagging: if local encoding, the tags are added on the + encoding phase. If remote, the tracks need tagging. + And also add the possibility to add this information via oggenc directly + instead of explicitly invoking vorbiscomment. + +* Maybe repair files when they have the same name in the original CD? + (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=205634) + +* Separate the different output encodings, so a user can read and encode one + format and then encode another one, later, from the same wavs. Right now, + the same status line is used for all formats, so a re-encoding is rejected + since abcde sees the encoding already finished. Same with tags and moves. + +* Support UTF-8 tags + +DONE: +---- +* FLAC support (http://flac.sourceforge.net/) +* Multiple ogg/mp3/flac output during the same session +* Track padding problem with single songs. diff --git a/abcde b/abcde new file mode 100755 index 0000000..7287760 --- /dev/null +++ b/abcde @@ -0,0 +1,2213 @@ +#!/bin/sh +# Copyright (c) 1998-2001 Robert Woodcock +# Copyright (c) 2003-2004 Jesus Climent +# This code is hereby licensed for public consumption under either the +# GNU GPL v2 or greater, or Larry Wall's Artistic license - your choice. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# Copyright for this work is to expire January 1, 2010, after which it +# shall be public domain. + +VERSION=2.1.20 + +usage () +{ +echo "This is abcde v$VERSION." +echo "Usage: abcde [options] [tracks]" +echo "Options:" +echo "-1 Encode the whole CD in a single file" +echo "-a Actions to perform (cddb,read,normalize,encode,tag,move,playlist,clean)" +echo "-b Batch mode: enable album normalization and nogap encoding" +echo "-c Specify a configuration file (overrides system and user config files)" +echo "-C Specify discid to resume from (only needed if you no longer have the cd)" +echo "-d Specify CDROM device to grab" +echo "-D Debugging mode (equivalent to sh -x abcde)" +#echo "-f Force the use of a local CDDB entry. Otherwise use an empty template" +echo "-h This help information" +#echo "-i Tag files while encoding, when possible (local only) -NWY-" +echo "-j Number of encoder processes to run at once" +echo "-k Keep the wav tracks for later use" +echo "-l Use low disk space algorithm" +echo "-L Use local CDDB storage directory" +echo "-n No lookup. Don't query CDDB, just create and use template" +echo "-N Noninteractive. Never prompt for anything" +echo "-m Modify playlist to include CRLF endings, to comply with some players" +echo "-o Output file type(s) (ogg,mp3,flac,spx). Defaults to ogg" +echo "-p Pad track numbers with 0's (if less than 10 tracks)" +echo "-r [host1,host2...] Also encode on these remote hosts" +#echo "-s Start the track numbering at a given number -NWY-" +echo "-S Set the CD speed (if possible)" +#echo "-t File types to preprocess (wav)" +#echo "-T Set postprocessing options" +echo "-v Show version number and exit" +echo "-V Be a bit more verbose about what is happening behind the scenes" +echo "-x Eject CD after all tracks are read" +echo "Tracks is a space-delimited list of tracks to grab." +echo "Ranges specified with hyphens are allowed." +} + +# Funtions to replace the need of seq, which is too distribution dependant. +f_seq_row () +{ + i=$1 + while [ $i -ne `expr $2 + 1` ] + do + echo $i + i=`expr $i + 1` + done +} + +f_seq_line () +{ + i=$1 + while [ $i -ne `expr $2 + 1` ] + do + printf $i" " + i=`expr $i + 1` + done + echo +} + +# checkstatus [blurb] +# Returns "0" if the blurb was found, returns 1 if it wasn't +# Puts the blurb content, if available, on stdout. +# Otherwise, returns "". +checkstatus () +{ + # Take the last line in the status file if there's multiple matches + PATTERN="^$1(=.*)?$" + BLURB=$(egrep $PATTERN "$ABCDETEMPDIR/status" | tail -n 1) + + if [ -z "$BLURB" ]; then + # No matches found + return 1 + else + # Matches found + # See if there's a = in it + if [ "$(echo $BLURB | grep -c =)" != "0" ]; then + echo "$(echo $BLURB | cut -f2- -d=)" + fi + return 0 + fi +} + +# checkerrors [blurb] +# Returns "0" if the blurb was found (meaning there was an error), +# returns 1 if it wasn't (yes this is a little backwards). +# Does not print the blurb on stdout. +# Otherwise, returns "". +checkerrors () +{ + if [ ! -e "$ABCDETEMPDIR/errors" ]; then + return 1 + fi + # Take the last line in the status file if there's multiple matches + PATTERN="^$1(:.*)?$" + BLURB="$(egrep $PATTERN $ABCDETEMPDIR/errors | tail -n 1)" + + if [ -z "$BLURB" ]; then + # negative, we did not have a negative... + return 1 + else + # affirmative, we had a negative... + return 0 + fi +} + +# run_command [blurb] [command...] +# Runs a command, silently if necessary, and updates the status file +run_command () +{ + BLURB="$1" + shift + # See if this is supposed to be silent + if [ "$(checkstatus encode-output)" = "loud" ]; then + "$@" >&2 + RETURN=$? + else + # Special case for SMP, since + # encoder output is never displayed, don't mute echos + if [ -z "$BLURB" -a "$MAXPROCS" != "1" ]; then + "$@" >&2 + RETURN=$? + else + "$@" >/dev/null 2>&1 + RETURN=$? + fi + fi + case "$1" in + normalize) + if [ "$RETURN" = "2" ]; then + # File was already normalized. + RETURN=0 + fi + ;; + esac + if [ "$RETURN" != "0" ]; then + # Put an error in the errors file. For various reasons we + # can't capture a copy of the program's output but we can + # log what we attempted to execute and the error code + # returned by the program. + if [ "$BLURB" ]; then + TWEAK="$BLURB: " + fi + echo "${TWEAK}returned code $RETURN: $@" >> "$ABCDETEMPDIR/errors" + return $RETURN # Do not pass go, do not update the status file + fi + if [ "$BLURB" ]; then + echo $BLURB >> "$ABCDETEMPDIR/status" + fi +} + +# relpath() and slash() are Copyright (c) 1999 Stuart Ballard and +# distributed under the terms of the GNU GPL v2 or later, at your option + +# Function to determine if a word contains a slash. +slash () +{ + case "$1" in + */*) return 0;; + *) return 1;; + esac +} + +# Function to give the relative path from one file to another. +# Usage: relpath fromfile tofile +# eg relpath music/Artist/Album.m3u music/Artist/Album/Song.mp3 +# (the result would be Album/Song.mp3) +# Output is relative path to $2 from $1 on stdout + +# This code has the following restrictions: +# Multiple ////s are not collapsed into single /s, with strange effects. +# Absolute paths and ../s are handled wrong in FR (but they work in TO) +# If FR is a directory it must have a trailing / + +relpath () +{ + FR="$1" + TO="$2" + + case "$TO" in + /*) ;; # No processing is needed for absolute paths + *) + # Loop through common prefixes, ignoring them. + while slash "$FR" && [ "$(echo "$FR" | cut -d/ -f1)" = "$(echo "$TO" | cut -d/ -f1)" ] + do + FR="$(echo "$FR" | cut -d/ -f2-)" + TO="$(echo "$TO" | cut -d/ -f2-)" + done + # Loop through directory portions left in FR, adding appropriate ../s. + while slash "$FR" + do + FR="$(echo "$FR" | cut -d/ -f2-)" + TO="../$TO" + done + esac + + echo $TO +} + +# This code splits the a Various Artist track name from one of the following +# forms: +# +# forward: Artist / Track +# forward-dash: Artist - Track +# reverse: Track / Artist +# reverse-dash: Track - Artist +# colon: Artist: Track +# trailing-paren: Artist (Track) +# +# variables used: +# VARIOUSARTISTS, VARIOUSARTISTSTYLE, TRACKNAME, TRACKARTIST +splitvarious () +{ + if [ "$VARIOUSARTISTS" = "y" ] && [ ! "$ONETRACK" = "y" ]; then + case "$VARIOUSARTISTSTYLE" in + forward) + DTITLEARTIST="$(echo $TRACKNAME | sed 's- / -~-g')" + TRACKARTIST="$(echo $DTITLEARTIST | cut -f1 -d~)" + TRACKNAME="$(echo $DTITLEARTIST | cut -f2 -d~)" + ;; + forward-dash) + DTITLEARTIST="$(echo $TRACKNAME | sed 's, - ,~,g')" + TRACKARTIST="$(echo $DTITLEARTIST | cut -f1 -d~)" + TRACKNAME="$(echo $DTITLEARTIST | cut -f2 -d~)" + ;; + reverse) + DTITLEARTIST="$(echo $TRACKNAME | sed 's- / -~-g')" + TRACKARTIST="$(echo $DTITLEARTIST | cut -f2 -d~)" + TRACKNAME="$(echo $DTITLEARTIST | cut -f1 -d~)" + ;; + reverse-dash) + DTITLEARTIST="$(echo $TRACKNAME | sed 's, - ,~,g')" + TRACKARTIST="$(echo $DTITLEARTIST | cut -f2 -d~)" + TRACKNAME="$(echo $DTITLEARTIST | cut -f1 -d~)" + ;; + colon) + DTITLEARTIST="$(echo $TRACKNAME | sed 's-: -~-g')" + TRACKARTIST="$(echo $DTITLEARTIST | cut -f1 -d~)" + TRACKNAME="$(echo $DTITLEARTIST | cut -f2 -d~)" + ;; + trailing-paren) + DTITLEARTIST="$(echo $TRACKNAME | sed 's,^\(.*\) (\(.*\)),\1~\2,')" + TRACKARTIST="$(echo $DTITLEARTIST | cut -f2 -d~)" + TRACKNAME="$(echo $DTITLEARTIST | cut -f1 -d~)" + ;; + esac + elif [ "$ONETRACK" = "y" ]; then + TRACKARTIST="Various" + else + TRACKARTIST=$DARTIST + fi +} + +# do_tag [tracknumber] +# id3 tags a filename +# variables used: +# TRACKS, TRACKNAME, TRACKARTIST, TAGGER, TAGGEROPTS, VORBISCOMMENT, METAFLAC, +# COMMENT, DALBUM, DARTIST, CDYEAR, CDGENRE (and temporarily) ID3TAGV +do_tag () +{ + COMMENTOUTPUT="$(eval echo ${COMMENT})" + run_command '' echo "Tagging track $1 of $TRACKS: $TRACKNAME..." + for OUTPUT in $(echo $OUTPUTTYPE | tr , \ ) + do + case "$OUTPUT" in + mp3) + # id3v2 v0.1.9 claims to have solved the -c bug, so we merge both id3 and id3v2 + run_command tagtrack-$1 $TAGGER $TAGGEROPTS -c "$COMMENTOUTPUT" \ + -A "$DALBUM" -a "$TRACKARTIST" -t "$TRACKNAME" -y "$CDYEAR" \ + -g "$CDGENRE" -T "$1/$TRACKS" "$ABCDETEMPDIR/track$1.$OUTPUT" + ;; + ogg) + case "$OGGENCODERSYNTAX" in + vorbize|oggenc) + # vorbiscomment can't do in-place modification, mv the file first + if [ -f "$ABCDETEMPDIR/track$1.$OUTPUT" -a ! -f "$ABCDETEMPDIR/track$1.uncommented.$OUTPUT" ]; then + mv "$ABCDETEMPDIR/track$1.$OUTPUT" "$ABCDETEMPDIR/track$1.uncommented.$OUTPUT" + fi + ( + # These are from http://www.xiph.org/ogg/vorbis/doc/v-comment.html + echo ARTIST="$TRACKARTIST" + echo ALBUM="$DALBUM" + echo TITLE="$TRACKNAME" + if [ -n "$CDYEAR" ]; then + echo DATE="$CDYEAR" + fi + if [ -n "$CDGENRE" ]; then + echo GENRE="$CDGENRE" + fi + echo TRACKNUMBER=$1 + if [ "$(eval echo ${COMMENT})" != "" ]; then + case "$COMMENTOUTPUT" in + *=*) echo "$COMMENTOUTPUT";; + *) echo COMMENT="$COMMENTOUTPUT";; + esac + fi + ) | run_command tagtrack-$1 $VORBISCOMMENT -w \ + "$ABCDETEMPDIR/track$1.uncommented.$OUTPUT" "$ABCDETEMPDIR/track$1.$OUTPUT" + # Doublecheck that the commented file was created successfully before wiping the original + if [ -f "$ABCDETEMPDIR/track$1.$OUTPUT" ]; then + rm -f "$ABCDETEMPDIR/track$1.uncommented.$OUTPUT" + else + mv "$ABCDETEMPDIR/track$1.uncommented.$OUTPUT" "$ABCDETEMPDIR/track$1.$OUTPUT" + fi + ;; + esac + ;; + flac) + ( + echo ARTIST="$TRACKARTIST" + echo ALBUM="$DALBUM" + echo TITLE="$TRACKNAME" + if [ -n "$CDYEAR" ]; then + echo DATE="$CDYEAR" + fi + if [ -n "$CDGENRE" ]; then + echo GENRE="$CDGENRE" + fi + if [ "$(eval echo ${COMMENT})" != "" ]; then + case "$COMMENTOUTPUT" in + *=*) echo "$COMMENTOUTPUT";; + *) echo COMMENT="$COMMENTOUTPUT";; + esac + fi + echo TRACKNUMBER=$1 + ) | run_command tagtrack-$1 $METAFLAC --import-vc-from=- --no-utf8-convert "$ABCDETEMPDIR/track$1.$OUTPUT" + ;; + spx) + run_command tagtrack-$1 true + ;; + esac + done +} + +# do_batch_encode +# variables used: +# OUTPUTTYPE, {FOO}ENCODERSYNTAX, ENCNICE, ENCODER, ENCODEROPTS +do_batch_encode () +{ + # The commands here don't go through run_command because they're never supposed to be silenced + echo "Batch encoding tracks: $TRACKQUEUE" + OUTPUT=$(echo $OUTPUTTYPE | grep "mp3" ) + case "$OUTPUT" in + mp3) + case "$MP3ENCODERSYNTAX" in + lame) + ( + cd "$ABCDETEMPDIR" + TRACKFILES= + for UTRACKNUM in $TRACKQUEUE + do + TRACKFILES="$TRACKFILES track$UTRACKNUM.wav" + done + nice $ENCNICE $MP3ENCODER $MP3ENCODEROPTS --nogap $TRACKFILES + RETURN=$? + if [ "$RETURN" != "0" ]; then + echo "batch-encode: $ENCODER returned code $RETURN" >> errors + else + for UTRACKNUM in $TRACKQUEUE + do + echo encodetrack-$UTRACKNUM >> status + done + fi + ) + ;; + esac + ;; + esac + # Other encoders fall through to normal encoding as the tracks + # have not been entered in the status file. +} + +# do_encode [tracknumber] [hostname] +# If no hostname is specified, encode locally +# variables used: +# TRACKS, TRACKNAME, TRACKARTIST, DISTMP3, DISTMP3OPTS, {FOO}ENCODERSYNTAX, OUTPUTTYPE, ENCODEROPTS, DALBUM, DARTIST, ENCNICE, CDYEAR, CDGENRE, COMMENT +do_encode () +{ + IN="$ABCDETEMPDIR/track$1.wav" + # We need IN to proceed. + if [ -s "$IN" ] ; then + for OUTPUT in $(echo $OUTPUTTYPE | tr , \ ) + do + OUT="$ABCDETEMPDIR/track$1.$OUTPUT" + run_command '' echo "Encoding track $1 of $TRACKS: $TRACKNAME..." + case "$OUTPUT" in + mp3) + case "$2" in + %local*%) + case "$MP3ENCODERSYNTAX" in + lame|gogo) run_command encodetrack-$OUTPUT-$1 nice $ENCNICE $MP3ENCODER $MP3ENCODEROPTS "$IN" "$OUT" ;; + bladeenc) run_command encodetrack-$OUTPUT-$1 nice $ENCNICE $MP3ENCODER $MP3ENCODEROPTS -quit "$IN" ;; + l3enc|xingmp3enc) run_command encodetrack-$OUTPUT-$1 nice $ENCNICE $MP3ENCODER "$IN" "$OUT" $MP3ENCODEROPTS ;; + mp3enc) run_command encodetrack-$OUTPUT-$1 nice $ENCNICE $MP3ENCODER -if "$IN" -of "$OUT" $MP3ENCODEROPTS ;; + esac + ;; + *) + run_command encodetrack-$OUTPUT-$1 nice $DISTMP3NICE $DISTMP3 $DISTMP3OPTS "$2" "$IN" "$OUT" >/dev/null 2>&1 + ;; + esac + ;; + ogg) + case "$2" in + %local*%) + case "$OGGENCODERSYNTAX" in + vorbize) run_command encodetrack-$OUTPUT-$1 nice $ENCNICE $OGGENCODER $OGGENCODEROPTS -w "$OUT" "$IN" ;; + oggenc) run_command encodetrack-$OUTPUT-$1 nice $ENCNICE $OGGENCODER $OGGENCODEROPTS -o "$OUT" "$IN" ;; + esac + ;; + *) + run_command encodetrack-$OUTPUT-$1 nice $DISTMP3NICE $DISTMP3 $DISTMP3OPTS "$2" "$IN" "$OUT" >/dev/null 2>&1 + ;; + esac + ;; + flac) + + case "$2" in + %local*%) + case "$FLACENCODERSYNTAX" in + flac) run_command encodetrack-$OUTPUT-$1 nice $ENCNICE $FLACENCODER $FLACENCODEROPTS -o "$OUT" "$IN" ;; + esac + ;; + + *) + echo -n "DISTMP3:" + echo "$DISTMP3 $DISTMP3OPTS $2 $IN $OUT >/dev/null 2>&1" + run_command encodetrack-$OUTPUT-$1 nice $DISTMP3NICE $DISTMP3 $DISTMP3OPTS "$2" "$IN" "$OUT" > /dev/null 2>&1 + ;; + esac + ;; + spx) + if [ "$(eval echo ${COMMENT})" != "" ]; then + case "$COMMENT" in + *=*) ;; + *) COMMENT="COMMENT=$COMMENT" ;; + esac + COMMENT="--comment \"$COMMENT\"" + fi + # Quick hack to avoid tagging Ogg/Speex, since there is no other way to tag than inline tagging + if [ ! "$DOTAG" = "y" ]; then + run_command encodetrack-$OUTPUT-$1 nice $ENCNICE $SPEEXENCODER $SPEEXENCODEROPTS --author "$TRACKARTIST" --title "$TRACKNAME" "$COMMENT" "$IN" "$OUT" + else + run_command encodetrack-$OUTPUT-$1 nice $ENCNICE $SPEEXENCODER $SPEEXENCODEROPTS "$IN" "$OUT" + fi + ;; + esac + done + # Only remove .wav if the encoding succeeded + if checkerrors "encodetrack-(.{3,4})-$1"; then + run_command encodetrack-$1 false + else + run_command encodetrack-$1 true + if [ ! "$KEEPWAVS" = "y" ] ; then + rm -f "$IN" + fi + fi + else + if [ "$(checkstatus encode-output)" = "loud" ]; then + echo "HEH! The file we were about to encode disappeared:" + echo ">> $IN" + fi + run_command encodetrack-$1 false + fi +} + +# do_batch_normalize +# variables used: +# NORMALIZER, NORMALIZEROPTS +do_batch_normalize () +{ + # The commands here don't go through run_command because they're never supposed to be silenced + echo "Batch normalizing tracks: $TRACKQUEUE" + ( + cd "$ABCDETEMPDIR" + BLURB= + TRACKFILES= + for UTRACKNUM in $TRACKQUEUE + do + TRACKFILES="$TRACKFILES track$UTRACKNUM.wav" + done + # XXX: Hard-coded batch option! + $NORMALIZER -b $NORMALIZEROPTS $TRACKFILES + RETURN=$? + if [ "$RETURN" != "0" ]; then + echo "batch-normalize: $NORMALIZER returned code $RETURN" >> errors + else + for UTRACKNUM in $TRACKQUEUE + do + echo normalizetrack-$UTRACKNUM >> status + done + fi + ) +} + +# do_normalize [tracknumber] +# variables used: +# TRACKS, TRACKNAME, NORMALIZER, NORMALIZEROPTS +do_normalize () +{ + IN="$ABCDETEMPDIR/track$1.wav" + if [ -e "$IN" ] ; then + run_command '' echo "Normalizing track $1 of $TRACKS: $TRACKNAME..." + run_command normalizetrack-$1 $NORMALIZER $NORMALIZEROPTS "$IN" + else + if [ "$(checkstatus encode-output)" = "loud" ]; then + echo "HEH! The file we were about to normalize disappeared:" + echo ">> $IN" + fi + run_command normalizetrack-$1 false "File $IN was not found" + fi +} + +# do_move [tracknumber] +# Deduces the outfile from environment variables +# Creates directory if necessary +# variables used: +# TRACKNUM, TRACKNAME, TRACKARTIST, DALBUM, OUTPUTFORMAT, CDGENRE, OUTPUTDIR +do_move () +{ + for OUTPUT in $(echo $OUTPUTTYPE | tr , \ ) + do + # Create ALBUMFILE, ARTISTFILE, TRACKFILE + # Munge filenames as follows: + # ' ' -> '_' + # '/' -> '_' + # ''' -> '' + # '?' -> '' + # Eat control characters + ALBUMFILE=$(mungefilename "$DALBUM") + ARTISTFILE=$(mungefilename "$TRACKARTIST") + TRACKFILE=$(mungefilename "$TRACKNAME") + GENRE=$(echo $CDGENRE | tr "[:upper:]" "[:lower:]") + # Supported variables for OUTPUTFORMAT are GENRE, ALBUMFILE, ARTISTFILE, TRACKFILE, and TRACKNUM. + if [ "$VARIOUSARTISTS" = "y" ]; then + OUTPUTFILE=$(eval echo $VAOUTPUTFORMAT) + else + OUTPUTFILE=$(eval echo $OUTPUTFORMAT) + fi + + TRACKNUM=${UTRACKNUM} + + # Check that the directory for OUTPUTFILE exists, if it doesn't, create it + OUTPUTFILEDIR=$(dirname "$OUTPUTDIR/$OUTPUTFILE") + # mkdir -p shouldn't return an error if the directory already exists + mkdir -p "$OUTPUTFILEDIR" + run_command movetrack-$1 mv "$ABCDETEMPDIR/track$1.$OUTPUT" "$OUTPUTDIR/$OUTPUTFILE.$OUTPUT" + done +} + +# do_playlist +# Create the playlist if wanted +# Variables used: +# PLAYLISTFORMAT, PLAYLISTDATAPREFIX, VAPLAYLISTFORMAT, VAPLAYLISTDATAPREFIX, +# VARIOUSARTISTS, OUTPUTDIR +do_playlist () +{ + for OUTPUT in $(echo $OUTPUTTYPE | tr , \ ) + do + # Create a playlist file for the playlist data to go into. + # We used to wipe it out if it existed. Now we request permision if interactive. + for LASTTRACK in $TRACKQUEUE; do :; done + ALBUMFILE=$(mungefilename "$DALBUM") + ARTISTFILE=$(mungefilename "$DARTIST") + GENRE=$(echo $CDGENRE | tr "[:upper:]" "[:lower:]") + if [ "$VARIOUSARTISTS" = "y" ] ; then + PLAYLISTFILE=$(eval echo $VAPLAYLISTFORMAT) + else + PLAYLISTFILE=$(eval echo $PLAYLISTFORMAT) + fi + FINALPLAYLISTDIR=$(dirname "$OUTPUTDIR/$PLAYLISTFILE") + mkdir -p "$FINALPLAYLISTDIR" + if [ -s "$OUTPUTDIR/$PLAYLISTFILE" ]; then + echo -n "Erase any existing playlist file? [y/n] (y): " >&2 + if [ "$INTERACTIVE" = "y" ]; then + read ERASEPLAYLIST + else + echo y >&2 + ERASEPLAYLIST=y + fi + [ "$ERASEPLAYLIST" != "n" ] && rm -f "$OUTPUTDIR/$PLAYLISTFILE" + fi + touch "$OUTPUTDIR/$PLAYLISTFILE" + for UTRACKNUM in $TRACKQUEUE + do + # Shares some code with do_move since the filenames have to match + CDDBTRACKNUM=$(expr $UTRACKNUM - 1) + TRACKNAME=$(grep ^TTITLE$CDDBTRACKNUM= "$CDDBDATA" | head -n 1 | cut -f2 -d= | tr -d \[:cntrl:\]) + splitvarious + TRACKFILE=$(mungefilename "$TRACKNAME") + ARTISTFILE=$(mungefilename "$TRACKARTIST") + TRACKNUM=${UTRACKNUM} + if [ "$VARIOUSARTISTS" = "y" ]; then + OUTPUTFILE=$(eval echo $VAOUTPUTFORMAT) + else + OUTPUTFILE=$(eval echo $OUTPUTFORMAT) + fi + if [ "$VARIOUSARTISTS" = "y" ]; then + if [ "$VAPLAYLISTDATAPREFIX" ] ; then + echo ${VAPLAYLISTDATAPREFIX}$OUTPUTFILE.$OUTPUT >> "$OUTPUTDIR/$PLAYLISTFILE" + else + relpath "$PLAYLISTFILE", "$OUTPUTFILE.$OUTPUT" >> "$OUTPUTDIR/$PLAYLISTFILE" + fi + else + if [ "$PLAYLISTDATAPREFIX" ]; then + echo ${PLAYLISTDATAPREFIX}$OUTPUTFILE.$OUTPUT >> "$OUTPUTDIR/$PLAYLISTFILE" + else + relpath "$PLAYLISTFILE", "$OUTPUTFILE.$OUTPUT" >> "$OUTPUTDIR/$PLAYLISTFILE" + fi + fi + done + ## this will convert the playlist to have CRLF line-endings, if specified + ## (some hardware players insist on CRLF endings) + if [ "$DOSPLAYLIST" = "y" ]; then + awk '{substr("\r",""); printf "%s\r\n", $0}' "$OUTPUTDIR/$PLAYLISTFILE" > "$ABCDETEMPDIR/PLAYLISTFILE.tmp" + rm "$OUTPUTDIR/$PLAYLISTFILE" && mv "$ABCDETEMPDIR/PLAYLISTFILE.tmp" "$OUTPUTDIR/$PLAYLISTFILE" + fi + echo "playlistcomplete" >> "$ABCDETEMPDIR/status" + done +} + +# do_discid +# This essentially the start of things +do_discid () +{ + # Query the CD to get the track info, unless the user specified -C + if [ -z "$DISCID" ]; then + echo -n "Getting CD track info... " + TRACKINFO=$($CDDISCID $CDROM) + # Make sure there's a CD in there by checking cd-discid's return code + if [ "$?" = "1" ]; then + echo "abcde error: CD could not be read. Perhaps there's no CD in the drive?" >&2 + exit 1 + fi + else + TRACKINFO=$(cat "$WAVOUTPUTDIR/abcde.$DISCID/discid") + fi + + # Get a full enumeration of tracks, sort it, and put it in the TRACKQUEUE. + # This needs to be done now because a section of the resuming code will need + # it later. + + # get the number of digits to pad TRACKNUM with - we'll use this later + if [ "$PADTRACKS" = "y" ] ; then + TRACKNUMPADDING=2 + fi + + TRACKS=$(echo $TRACKINFO | cut -f2 -d' ') + if [ -z "$TRACKQUEUE" ]; then + echo -n "Grabbing entire CD - tracks: " + if [ ! "$PADTRACKS" = "y" ] ; then + TRACKNUMPADDING=$(echo -n $TRACKS | wc -c | tr -d ' ') + fi + TRACKS=$(printf "%0.${TRACKNUMPADDING}d" $TRACKS) + X=0 + while [ "$X" -ne "$TRACKS" ] + do + X=$(printf "%0.${TRACKNUMPADDING}d" $(expr $X + 1)) + TRACKQUEUE=$(echo "$TRACKQUEUE" $X) + done + echo $TRACKQUEUE + else + # User-supplied track queue. + # Weed out non-numbers, whitespace, then sort and weed out duplicates + TRACKQUEUE=$(echo $TRACKQUEUE | sed 's-[^0-9 ]--g' | tr ' ' '\n' | grep -v ^$ | sort -n | uniq | tr '\n' ' ' | sed 's- $--g') + # Once cleaned, obtain the highest value in the trackqueue for number padding + for LASTTRACK in $TRACKQUEUE; do :; done + if [ ! "$PADTRACKS" = "y" ] ; then + TRACKNUMPADDING=$(echo -n $LASTTRACK | wc -c | tr -d ' ') + fi + # Now we normalize the trackqueue + for TRACK in $TRACKQUEUE ; do + TRACKNUM=$(printf %0.${TRACKNUMPADDING}d $(expr ${TRACK} + 0 )) + PADTRACKQUEUE=$(echo $PADTRACKQUEUE $TRACKNUM) + done + TRACKQUEUE=$PADTRACKQUEUE + echo Grabbing tracks: "$TRACKQUEUE" + fi + +# for LASTTRACK in $TRACKQUEUE; do :; done + + QUEUEDTRACKS=$(echo $TRACKQUEUE | wc -w | tr -d ' ') + + # We have the discid, create a temp directory after it to store all the temp + # info + + ABCDETEMPDIR="$WAVOUTPUTDIR/abcde.$(echo $TRACKINFO | cut -f1 -d' ')" + if [ -e "$ABCDETEMPDIR" ]; then + echo -n "abcde: attempting to resume from $ABCDETEMPDIR" + # It already exists, see if it's a directory + if [ ! -d "$ABCDETEMPDIR" ]; then + # This is a file/socket/fifo/device/etc, not a directory + # Complain and exit + echo >&2 + echo "abcde: file $ABCDETEMPDIR already exists and does not belong to abcde." >&2 + echo "Please investigate, remove it, and rerun abcde." >&2 + exit 1 + fi + echo -n . + # It's a directory, let's see if it's owned by us + if [ ! -O "$ABCDETEMPDIR" ]; then + # Nope, complain and exit + echo >&2 + echo "abcde: directory $ABCDETEMPDIR already exists and is not owned by you." >&2 + echo "Please investigate, remove it, and rerun abcde." >&2 + exit 1 + fi + echo . + # See if it's populated + if [ ! -f "$ABCDETEMPDIR/discid" ]; then + # Wipe and start fresh + echo "abcde: $ABCDETEMPDIR/discid not found. Abcde must remove and recreate" >&2 + echo -n "this directory to continue. Continue? [y/n] (n)" >&2 + if [ "$INTERACTIVE" = "y" ]; then + read ANSWER + else + echo y >&2 + ANSWER=y + fi + if [ "$ANSWER" != "y" ]; then + exit 1 + fi + rm -rf "$ABCDETEMPDIR" || exit 1 + mkdir "$ABCDETEMPDIR" + if [ "$?" -gt "0" ]; then + # Directory already exists or could not be created + echo "abcde: Temp directory $ABCDETEMPDIR could not be created." >&2 + exit 1 + fi + else + # Everything is fine. Check for ^encodetracklocation- + # and encode-output entries in the status file and + # remove them. These are not relevant across sessions. + if [ -f "$ABCDETEMPDIR/status" ]; then + mv "$ABCDETEMPDIR/status" "$ABCDETEMPDIR/status.old" + grep -v ^encodetracklocation- < "$ABCDETEMPDIR/status.old" \ + | grep -v ^encode-output > "$ABCDETEMPDIR/status" + fi + # Remove old error messages + if [ -f "$ABCDETEMPDIR/errors" ]; then + rm -f "$ABCDETEMPDIR/errors" + fi + fi + else + # We are starting from scratch + mkdir "$ABCDETEMPDIR" + if [ "$?" -gt "0" ]; then + # Directory already exists or could not be created + echo "abcde: Temp directory $ABCDETEMPDIR could not be created." >&2 + exit 1 + fi + cat /dev/null > "$ABCDETEMPDIR/status" + fi + + # Create the discid file + echo "$TRACKINFO" > "$ABCDETEMPDIR/discid" + + # Determine what actions are to be done from $ACTIONS and set the + # following environment variables for them: + DOCDDB=n + DOREAD=n + DONORMALIZE=n + DOPREPROCESS=n + DOENCODE=n + DOPOSTPROCESS=n + DOTAG=n + DOMOVE=n + DOPLAYLIST=n + DOCLEAN=n + + for ACTION in $(echo $ACTIONS | tr , \ ) + do + case $ACTION in + cddb) DOCDDB=y;; + read) DOREAD=y;; + normalize) DONORMALIZE=y; DOREAD=y;; + preprocess) DOPREPROCESS=y; DOREAD=y;; + encode) DOENCODE=y; DOREAD=y;; + postprocess) DOPREPROCESS=y; DOENCODE=y; DOREAD=y;; + tag) DOTAG=y; DOREAD=y; DOENCODE=y; DOCDDB=y;; + move) DOMOVE=y; DOTAG=y; DOREAD=y; DOENCODE=y; DOCDDB=y;; + playlist) DOCDDB=y; DOPLAYLIST=y;; + clean) DOCLEAN=y;; + esac + done +} + +# do_cddbparse +# Parses a CDDB file and outputs the title and the track names. +# Variables: CDDBFILE +do_cddbparse () +{ + CDDBPARSEFILE="$1" + # List out disc title/author and contents + if [ "$ONETRACK" = "y" ]; then + vecho "ONETRACK mode selected: displaying only the title of the CD..." + fi + echo "---- $(grep DTITLE "${CDDBPARSEFILE}" | cut '-d=' -f2- | tr -d \\r\\n ) ----" + if [ ! "$ONETRACK" = "y" ];then + for TRACK in $(f_seq_row 1 $TRACKS) + do + echo $TRACK: "$(grep ^TTITLE$(expr $TRACK - 1)= "${CDDBPARSEFILE}" | cut -f2- -d= | tr -d \\r\\n)" + done + fi +} + +# do_localcddb +# Check for a local CDDB file, and report success +do_localcddb () +{ + if checkstatus cddb-readcomplete && checkstatus cddb-choice >/dev/null; then :; else + + CDDBLOCALSUCCESS="n" + CDDBDISCID=$(echo $TRACKINFO | cut -d' ' -f1) + CDDBLOCALFILE="${CDDBLOCALDIR}/${CDDBDISCID}" + USELOCALRESP="y" + + # If the user has selected to check a local CDDB repo, we proceed with it + if [ "$CDDBUSELOCAL" = "y" ]; then + if [ -r "${CDDBLOCALFILE}" ]; then + # List out disc title/author and contents + do_cddbparse "${CDDBLOCALFILE}" + echo -n "Locally cached CDDB entry found, use it? [y/n] (y): " + if [ "$INTERACTIVE" = "y" ]; then + read USELOCALRESP + while [ "$USELOCALRESP" != "y" ] && [ "$USELOCALRESP" != "n" ] && [ "$USELOCALRESP" != "" ] ; do + echo -n 'Invalid selection. Please answer "y" or "n": ' + read USELOCALRESP + done + [ x"$USELOCALRESP" = "x" ] && USELOCALRESP="y" + else + echo "y">&2 + fi + if [ "$USELOCALRESP" = "y" ]; then + #echo "Using local copy of CDDB data" + cp "${CDDBLOCALFILE}" "$ABCDETEMPDIR/cddbread.1" + echo 999 > "$ABCDETEMPDIR/cddbquery" # Assuming 999 isn't used by CDDB + echo cddb-readcomplete >> "$ABCDETEMPDIR/status" + do_cddbparse "${CDDBLOCALFILE}" > "$ABCDETEMPDIR/cddbchoices" + echo cddb-choice=1 >> "$ABCDETEMPDIR/status" + CDDBLOCALSUCCESS="y" + else + #echo "Not using local copy of CDDB data" + CDDBLOCALSUCCESS="n" + fi + else + CDDBLOCALSUCCESS="n" + fi + fi + fi +} + +# do_cddbstat +do_cddbstat () +{ + # Perform CDDB protocol version check if it hasn't already been done + if checkstatus cddb-statcomplete; then :; else + if [ "$CDDBAVAIL" = "n" ]; then + ERRORCODE=no_query + echo 503 > "$ABCDETEMPDIR/cddbstat" + else + rc=1 + CDDBUSER=$(echo $HELLOINFO | cut -f1 -d'@') + CDDBHOST=$(echo $HELLOINFO | cut -f2- -d'@') + while test $rc -eq 1 -a $CDDBPROTO -ge 3; do + vecho "Checking CDDB server status..." + $CDDBTOOL stat $CDDBURL $CDDBUSER $CDDBHOST $CDDBPROTO > "$ABCDETEMPDIR/cddbstat" + RESPONSECODE=$(head -n 1 "$ABCDETEMPDIR/cddbstat" | cut -f1 -d' ') + case "$RESPONSECODE" in + 210) # 210 OK, status information follows (until terminating `.') + rc=0; + ;; + 501|*) # 501 Illegal CDDB protocol level: . + CDDBPROTO=`expr $CDDBPROTO - 1` + ;; + esac + done + if test $rc -eq 1; then + CDDBAVAIL="n" + fi + fi + echo cddb-statcomplete >> "$ABCDETEMPDIR/status" + fi +} + + +# do_cddbquery +do_cddbquery () +{ + CDDBDISCID=$(echo $TRACKINFO | cut -d' ' -f1) + CDDBLOCALFILE="${CDDBLOCALDIR}/${CDDBDISCID}" + + # Perform CDDB query if it hasn't already been done + if checkstatus cddb-querycomplete; then :; else + if [ "$CDDBAVAIL" = "n" ]; then + ERRORCODE=no_query + echo 503 > "$ABCDETEMPDIR/cddbquery" + # The default CDDBLOCALSUCCESS is "n" + # This part will be triggered if the user CDDB repo does not + # contain the entry, or if we are not trying to use the repo. + else + vecho "Querying the CDDB server..." + CDDBUSER=$(echo $HELLOINFO | cut -f1 -d'@') + CDDBHOST=$(echo $HELLOINFO | cut -f2- -d'@') + $CDDBTOOL query $CDDBURL $CDDBPROTO $CDDBUSER $CDDBHOST $TRACKINFO > "$ABCDETEMPDIR/cddbquery" + ERRORCODE=$? + case $ERRORCODE in + 0) # success + ;; + 12|13|14) + # no match found in database, + # wget/fetch error, or user requested not to use CDDB + # Make up an error code (503) that abcde + # will recognize in do_cddbread + # and compensate by making a template + echo 503 > "$ABCDETEMPDIR/cddbquery" + ;; + *) # strange and unknown error + echo ERRORCODE=$ERRORCODE + echo "abcde: $CDDBTOOL returned unknown error code" + ;; + esac + fi + echo cddb-querycomplete >> "$ABCDETEMPDIR/status" + fi +} + +# do_cddbread +do_cddbread () +{ + # If it's not to be used, generate a template. + # Then, display it (or them) and let the user choose/edit it + if checkstatus cddb-readcomplete; then :; else + vecho "Obtaining CDDB results..." + # If CDDB is to be used, interpret the query results and read all + # the available entries. + rm -f "$ABCDETEMPDIR/cddbchoices" + CDDBCHOICES=1 # Overridden by multiple matches + RESPONSECODE=$(head -n 1 "$ABCDETEMPDIR/cddbquery" | cut -f1 -d' ') + case "$RESPONSECODE" in + 200) + # One exact match, retrieve it + # 200 [section] [discid] [artist] / [title] + if checkstatus cddb-read-1-complete; then :; else + echo -n "Retrieving 1 CDDB match..." >> "$ABCDETEMPDIR/cddbchoices" + $CDDBTOOL read $CDDBURL $CDDBPROTO $CDDBUSER $CDDBHOST $(cut -f2,3 -d' ' "$ABCDETEMPDIR/cddbquery") > "$ABCDETEMPDIR/cddbread.1" + echo "done." >> "$ABCDETEMPDIR/cddbchoices" + echo cddb-read-1-complete >> "$ABCDETEMPDIR/status" + echo cddb-choice=1 >> "$ABCDETEMPDIR/status" + fi + # List out disc title/author and contents + echo ---- "$(cut '-d ' -f4- "$ABCDETEMPDIR/cddbquery")" ---- >> "$ABCDETEMPDIR/cddbchoices" + for TRACK in $(f_seq_row 1 $TRACKS) + do + echo $TRACK: "$(grep ^TTITLE$(expr $TRACK - 1)= "$ABCDETEMPDIR/cddbread.1" | cut -f2- -d= | tr -d \\r\\n)" >> "$ABCDETEMPDIR/cddbchoices" + done + echo >> "$ABCDETEMPDIR/cddbchoices" + ;; + 202|403|409|503) + # No match + case "$RESPONSECODE" in + 202) echo "No CDDB match." >> "$ABCDETEMPDIR/cddbchoices" ;; + 403|409) echo "CDDB entry is corrupt, or the handshake failed." >> "$ABCDETEMPDIR/cddbchoices" ;; + 503) echo "CDDB unavailable." >> "$ABCDETEMPDIR/cddbchoices" ;; + esac + $CDDBTOOL template $(cat "$ABCDETEMPDIR/discid") > "$ABCDETEMPDIR/cddbread.1" + # List out disc title/author and contents of template + echo ---- Unknown Artist / Unknown Album ---- >> "$ABCDETEMPDIR/cddbchoices" + UNKNOWNDISK=y + for TRACK in $(f_seq_row 1 $TRACKS) + do + echo $TRACK: "$(grep ^TTITLE$(expr $TRACK - 1)= "$ABCDETEMPDIR/cddbread.1" | cut -f2- -d= | tr -d \\r\\n)" >> "$ABCDETEMPDIR/cddbchoices" + done + echo >> "$ABCDETEMPDIR/cddbchoices" + echo cddb-read-1-complete >> "$ABCDETEMPDIR/status" + echo cddb-choice=1 >> "$ABCDETEMPDIR/status" + ;; + 210|211) + # Multiple exact, (possibly multiple) inexact matches + IN= + if [ "$RESPONSECODE" = "211" ]; then IN=in; fi + if [ "$(wc -l < $ABCDETEMPDIR/cddbquery | tr -d ' ')" -eq 3 ]; then + echo "One ${IN}exact match:" >> "$ABCDETEMPDIR/cddbchoices" + tail -n +2 "$ABCDETEMPDIR/cddbquery" | head -n 1 >> "$ABCDETEMPDIR/cddbchoices" + echo cddb-choice=1 >> "$ABCDETEMPDIR/status" + else + echo "Multiple ${IN}exact matches:" >> "$ABCDETEMPDIR/cddbchoices" + fi + #echo -n "Retrieving multiple matches... " + grep -v ^[.]$ "$ABCDETEMPDIR/cddbquery" | ( X=0 + read DISCINFO # eat top line + while read DISCINFO + do + X=$(expr $X + 1) + if checkstatus cddb-read-$X-complete; then :; else + $CDDBTOOL read $CDDBURL $CDDBPROTO $CDDBUSER $CDDBHOST $(echo $DISCINFO | cut -f1,2 -d' ') > "$ABCDETEMPDIR/cddbread.$X" + echo cddb-read-$X-complete >> "$ABCDETEMPDIR/status" + fi + # List out disc title/author and contents + echo \#$X: ---- "$DISCINFO" ---- >> "$ABCDETEMPDIR/cddbchoices" + for TRACK in $(f_seq_row 1 $TRACKS) + do + echo $TRACK: "$(grep ^TTITLE$(expr $TRACK - 1)= "$ABCDETEMPDIR/cddbread.$X" | cut -f2- -d= | tr -d \\r\\n)" >> "$ABCDETEMPDIR/cddbchoices" + done + echo >> "$ABCDETEMPDIR/cddbchoices" + done ) + #echo "done." + CDDBCHOICES=$(expr $(cat "$ABCDETEMPDIR/cddbquery" | wc -l) - 2) + ;; + 999) + # Using local copy. + for TRACK in $(f_seq_row 1 $TRACKS) + do + echo $TRACK: "$(grep ^TTITLE$(expr $TRACK - 1)= "$ABCDETEMPDIR/cddbread.1" | cut -f2- -d= | tr -d \\r\\n)" >> "$ABCDETEMPDIR/cddbchoices" + done + echo >> "$ABCDETEMPDIR/cddbchoices" + echo cddb-read-1-complete >> "$ABCDETEMPDIR/status" + echo cddb-choice=1 >> "$ABCDETEMPDIR/status" + ;; + esac + echo "cddb-readcomplete" >> "$ABCDETEMPDIR/status" + fi +} + +# do_cddbedit +do_cddbedit () +{ + if checkstatus cddb-edit >/dev/null; then + CDDBDATA="$ABCDETEMPDIR/cddbread.$(checkstatus cddb-choice)" + VARIOUSARTISTS="$(checkstatus variousartists)" + VARIOUSARTISTSTYLE="$(checkstatus variousartiststyle)" + return 0 + fi + if [ "$INTERACTIVE" = "y" ]; then + # We should show the CDDB results both when we are not using the local CDDB repo + # or when we are using it but we could not find a proper match + if [ "$CDDBUSELOCAL" = "y" ] && [ ! "$CDDBLOCALSUCCESS" = "y" ] || [ ! "$CDDBUSELOCAL" = "y" ]; then + # Display the $ABCDETEMPDIR/cddbchoices file created above + # Pick a pager so that if the tracks overflow the screen the user can still view everything + if [ -r "$ABCDETEMPDIR/cddbchoices" ]; then + CDDBCHOICES=$(expr $(cat "$ABCDETEMPDIR/cddbquery" | wc -l) - 2) + CHOICE=$(checkstatus cddb-choice) + if [ -n "$CHOICE" ] ; then + case $CDDBCHOICES in + 1) cat "$ABCDETEMPDIR/cddbchoices" ;; + *) + echo "Selected: #$CHOICE" + do_cddbparse "$ABCDETEMPDIR/cddbread.$CHOICE" + ;; + esac + else + # The user has a choice to make, display the info in a pager if necessary + if [ $(cat "$ABCDETEMPDIR/cddbchoices" | wc -l) -ge 24 ]; then + # Use the debian sensible-pager wrapper to pick the pager + # user has requested via their $PAGER environment variable + if [ -x "/usr/bin/sensible-pager" ]; then + /usr/bin/sensible-pager "$ABCDETEMPDIR/cddbchoices" + elif [ -x "$PAGER" ]; then + # That failed, try to load the preferred editor, starting + # with their PAGER variable + $PAGER "$ABCDETEMPDIR/cddbchoices" + # If that fails, check for less + elif [ -x /usr/bin/less ]; then + /usr/bin/less -f "$ABCDETEMPDIR/cddbchoices" + # more should be on all UNIX systems + elif [ -x /bin/more ]; then + /bin/more "$ABCDETEMPDIR/cddbchoices" + else + # No bananas, just cat the thing + cat "$ABCDETEMPDIR/cddbchoices" >&2 + fi + else + # It's all going to fit in one page, cat it + cat "$ABCDETEMPDIR/cddbchoices" >&2 + fi + + # I'll take CDDB read #3 for $400, Alex + echo -n "Which entry would you like abcde to use? [1-$CDDBCHOICES]: " >&2 + read CDDBCHOICE + # Make sure we get a valid choice + CDCHOICENUM=$(echo $CDDBCHOICE | xargs printf %d 2>/dev/null) + while [ $CDCHOICENUM -lt 1 ] || [ $CDCHOICENUM -gt $CDDBCHOICES ]; do + echo "Invalid selection. Please choose a number between 1 and $CDDBCHOICES." >&2 + echo -n "Selection [1-$CDDBCHOICES]: " >&2 + read CDDBCHOICE + CDCHOICENUM=$(echo $CDDBCHOICE | xargs printf %d 2>/dev/null) + done + echo "Selected: #$CDCHOICENUM ($(grep ^DTITLE= $ABCDETEMPDIR/cddbread.$CDCHOICENUM | cut -f2- -d= | tr -d \\r\\n))" >&2 + do_cddbparse "$ABCDETEMPDIR/cddbread.$CDCHOICENUM" + echo "cddb-choice=$CDCHOICENUM" >> "$ABCDETEMPDIR/status" + fi + fi + else + # We need some code to show the selected option when local repository is selected and we have found a match + echo "Using cached CDDB match..." + # Display the $ABCDETEMPDIR/cddbchoices file created above + # Pick a pager so that if the tracks overflow the screen the user can still view everything + if [ -r "$ABCDETEMPDIR/cddbchoices" ]; then + CDDBCHOICES=$(expr $(cat "$ABCDETEMPDIR/cddbquery" | wc -l) - 2) + CHOICE=$(checkstatus cddb-choice) + if [ "$USELOCALRESP" = "y" ]; then :; else + if [ -n "$CHOICE" ] ; then + case $CDDBCHOICES in + 1) cat "$ABCDETEMPDIR/cddbchoices" ;; + *) + echo "Selected: #$CHOICE" + do_cddbparse "$ABCDETEMPDIR/cddbread.$CHOICE" + ;; + esac + fi + fi + fi + fi + else + # We're noninteractive - pick the first choice. + # But in case we run a previous instance and selected a choice, use it. + if [ -r "$ABCDETEMPDIR/cddbchoices" ]; then + # Show the choice if we are not using the locally stored one + # or when the local search failed to find a match. + PREVIOUSCHOICE=$(checkstatus cddb-choice) + if [ "$CDDBUSELOCAL" = "y" ] && [ "$CDDBLOCALSUCCESS" = "n" ] || [ ! "$CDDBUSELOCAL" = "y" ]; then + #if [ "$PREVIOUSCHOICE" ]; then + cat "$ABCDETEMPDIR/cddbchoices" + #fi + fi + if [ ! -z "$PREVIOUSCHOICE" ] ; then + CDCHOICENUM=$PREVIOUSCHOICE + else + CDCHOICENUM=1 + echo "cddb-choice=$CDCHOICENUM" >> "$ABCDETEMPDIR/status" + fi + echo "Selected: #$CDCHOICENUM ($(grep ^DTITLE= $ABCDETEMPDIR/cddbread.$CDCHOICENUM | cut -f2- -d= | tr -d \\r\\n))" >&2 + fi + fi + + # sanity check + if checkstatus cddb-choice >/dev/null; then :; else + echo "abcde: internal error: cddb-choice not recorded." >&2 + exit 1 + fi + CDDBDATA="$ABCDETEMPDIR/cddbread.$(checkstatus cddb-choice)" + echo -n "Edit selected CDDB data? [y/n] (" + if [ "$INTERACTIVE" = "y" ]; then + if [ "$UNKNOWNDISK" = "y" ]; then + echo -n "y): " >&2 + read EDITCDDB + [ "$EDITCDDB" != "n" ] && EDITCDDB=y + else + echo -n "n): " >&2 + read EDITCDDB + fi + else + echo "n): n" >&2 + EDITCDDB=n + fi + if [ "$EDITCDDB" = "y" ]; then + CDDBDATAMD5SUM=$($MD5SUM "$CDDBDATA" | cut -d " " -f 1); + + # Use the debian sensible-editor wrapper to pick the editor that the + # user has requested via their $EDITOR environment variable + if [ -x "/usr/bin/sensible-editor" ]; then + /usr/bin/sensible-editor "$CDDBDATA" + elif [ -n "$EDITOR" ]; then + if [ -x $(which "${EDITOR%%\ *}") ]; then + # That failed, try to load the preferred editor, starting + # with their EDITOR variable + eval $(echo "$EDITOR") "$CDDBDATA" + fi + # If that fails, check for a vi + elif [ -x /usr/bin/vi ]; then + /usr/bin/vi "$CDDBDATA" + # nano should be on all (modern, i.e., sarge) debian systems + elif [ -x /usr/bin/nano ]; then + /usr/bin/nano "$CDDBDATA" + # mg should be on all OpenBSD systems + elif [ -x /usr/bin/mg ]; then + /usr/bin/mg "$CDDBDATA" + # bomb out + else + echo "No editor available. Check your EDITOR environment variable." >&2 + fi + # delete editor backup file if it exists + if [ -w "$CDDBDATA~" ]; then + rm -f "$CDDBDATA~" + fi + fi + + # Some heuristics first. Look at Disc Title, and if it starts with + # "Various", then we'll assume Various Artists + if [ "$(grep ^DTITLE= "$CDDBDATA" | cut -f2 -d= | egrep -ci '^(various|soundtrack|varios|sonora|ost)')" != "0" ]; then + echo "Looks like a Multi-Artist CD" >&2 + VARIOUSARTISTS=y + else + echo -n "Is the CD multi-artist? [y/n] (n): " >&2 + if [ "$INTERACTIVE" = "y" ]; then + read VARIOUSARTISTS + else + echo n >&2 + VARIOUSARTISTS=n + fi + fi + if [ "$VARIOUSARTISTS" = "y" ] && [ ! "$ONETRACK" = "y" ]; then + # Set a default + DEFAULTSTYLE=1 + # Need NUMTRACKS before cddb-tool will return it: + NUMTRACKS=$(grep -E '^TTITLE[0-9]+=' "$CDDBDATA" | wc -l) + if [ "$(grep -c "^TTITLE.*\/" "$CDDBDATA")" -gt "$(expr $NUMTRACKS / 2 )" ]; then + # More than 1/2 tracks contain a "/", so guess forward + DEFAULTSTYLE=1 + elif [ "$(grep -c "^TTITLE.*\-" "$CDDBDATA")" -gt "$(expr $NUMTRACKS / 2 )" ]; then + # More than 1/2 contain a "-", so guess forward-dash + DEFAULTSTYLE=2 + elif [ "$(grep -c "^TTITLE.*(.*)" "$CDDBDATA")" -gt "$(expr $NUMTRACKS / 2 )" ]; then + # More than 1/2 contain something in parens, so guess trailing-paren + DEFAULTSTYLE=6 + fi + + echo "1) Artist / Title" >&2 + echo "2) Artist - Title" >&2 + echo "3) Title / Artist" >&2 + echo "4) Title - Artist" >&2 + echo "5) Artist: Title" >&2 + echo "6) Title (Artist)" >&2 + echo "7) This is a single-artist CD" >&2 + echo -n "Which style of multiple artist entries is it? [1-7] ($DEFAULTSTYLE): " >&2 + if [ "$INTERACTIVE" = "y" ]; then + read VARIOUSARTISTSTYLE + else + echo $DEFAULTSTYLE >&2 + VARIOUSARTISTSTYLE=$DEFAULTSTYLE + fi + VARIOUSARTISTSTYLE=$(echo 0$VARIOUSARTISTSTYLE | xargs printf %d) + # If they press Enter, then the default style (0) was chosen + while [ $VARIOUSARTISTSTYLE -lt 0 ] || [ $VARIOUSARTISTSTYLE -gt 7 ]; do + echo "Invalid selection. Please choose a number between 1 and 7." + echo -n "Selection [1-7]: " + read VARIOUSARTISTSTYLE + VARIOUSARTISTSTYLE=$(echo 0$VARIOUSARTISTSTYLE | xargs printf %d) + done + if [ "$VARIOUSARTISTSTYLE" = "0" ]; then + VARIOUSARTISTSTYLE=$DEFAULTSTYLE + fi + echo "Selected: $VARIOUSARTISTSTYLE" + case "$VARIOUSARTISTSTYLE" in + 1) # Artist / Title + VARIOUSARTISTSTYLE=forward + ;; + 2) # Artist - Title + VARIOUSARTISTSTYLE=forward-dash + ;; + 3) # Title / Artist + VARIOUSARTISTSTYLE=reverse + ;; + 4) # Title - Artist + VARIOUSARTISTSTYLE=reverse-dash + ;; + 5) # Artist: Title + VARIOUSARTISTSTYLE=colon + ;; + 6) # Title (Artist) + VARIOUSARTISTSTYLE=trailing-paren + ;; + 7) # Single Artist + VARIOUSARTISTS=n + ;; + esac + fi + + echo "variousartists=$VARIOUSARTISTS" >> "$ABCDETEMPDIR/status" + echo "variousartiststyle=$VARIOUSARTISTSTYLE" >> "$ABCDETEMPDIR/status" + + if [ "$EDITCDDB" = "y" ] && [ "$UNINTENTIONALLY_ANGER_THE_FREEDB_PEOPLE" = "y" ]; then + if [ $CDDBDATAMD5SUM != "" ] && [ $CDDBDATAMD5SUM != $($MD5SUM "$CDDBDATA" | cut -d " " -f 1) ]; then + # This works but does not have the necessary error checking + # yet. If you are familiar with the CDDB spec + # (see http://www.freedb.org/src/latest/DBFORMAT) + # and can create an error-free entry on your own, then put + # UNINTENTIONALLY_ANGER_THE_FREEDB_PEOPLE=y in your + # abcde.conf to enable it. Put CDDBSUBMIT=email@address in + # your abcde.conf to change the email address submissions are + # sent to. + + # submit the modified file, if they want + if [ "$NOSUBMIT" != "y" ]; then + echo -n "Do you want to submit this entry to $CDDBSUBMIT? [y/n] (n): " + read YESNO + while [ "$YESNO" != "y" ] && [ "$YESNO" != "n" ] && [ "$YESNO" != "Y" ] && \ + [ "$YESNO" != "N" ] && [ "$YESNO" != "" ] + do + echo -n 'Invalid selection. Please answer "y" or "n": ' + read YESNO + done + if [ "$YESNO" = "y" ] || [ "$YESNO" = "Y" ]; then + echo -n "Sending..." + $CDDBTOOL send "$CDDBDATA" $CDDBSUBMIT + echo "done." + fi + fi + fi + fi + # Make sure the cache directory exists + mkdir -p $CDDBLOCALDIR + # Cache edited CDDB entry in the user's cddb dir + if [ "$CDDBCOPYLOCAL" = "y" ] || [ "$COPYCDDBLOCAL" = "Y" ]; then + cat "$CDDBDATA" | tail -n $(expr $(cat "$CDDBDATA" | wc -l ) - 1 ) > ${CDDBLOCALDIR}/$(echo "$TRACKINFO" | cut -d' ' -f1) + fi + + echo "cddb-edit" >> "$ABCDETEMPDIR/status" +} + +# do_cdread_one [lasttrack] [firsttrack] +# +# Reads the CD in a single track. Live performances, concerts, mixes,... benefit from this. +do_cdread_one () +{ + # The commands here don't go through run_command because they're never supposed to be silenced + # return codes need to be doublechecked anyway, however + LASTTRACKNUMBER=$1 + FIRSTTRACKNUMBER=$2 + WAVDATA="$ABCDETEMPDIR/track$FIRSTTRACKNUMBER.wav" + echo "Grabbing the CD to a single track..." >&2 + case "$CDROMREADERSYNTAX" in + cdparanoia) nice $READNICE $CDROMREADER -d $CDROM "1-" "$WAVDATA" >&2 ;; + cdda2wav) + if [ "$OSFLAVOUR" = "OSX" ] ; then + # Hei, we have to unmount the device before running anything like cdda2wav in OSX + disktool -u ${CDROM#/dev/} 0 + # Also, in OSX the cdrom device for cdda2wav changes... + CDDA2WAVCDROM="IODVDServices" + elif [ "$OSFLAVOUR" = "FBSD" ] ; then + CDDA2WAVCDROM="$CDROMID" + else + if [ "$CDROMID" = "" ]; then + CDDA2WAVCDROM="$CDROM" + else + CDDA2WAVCDROM="$CDROMID" + fi + fi + nice $READNICE $CDROMREADER -D $CDDA2WAVCDROM -t 1+$LASTTRACKNUM "$WAVDATA" >&2 + ;; + dagrab) nice $READNICE $CDROMREADER -d $CDROM -f $WAVDATA -v $UTRACKNUM >&2 ;; + cddafs) + # Find the track's mounted path + REALTRACKNUM=$(expr $UTRACKNUM + 0) + FILEPATH=$(mount | grep "$CDROM on" | sed 's/^[^ ]* on \([^(]*\) (.*/\1/') + FILEPATH=$(find "$FILEPATH" | grep "/$REALTRACKNUM "); + # If the file exists, copy it + if [ -e "$FILEPATH" ] ; then + nice $READNICE $CDROMREADER "$FILEPATH" "$WAVDATA" >&2 + else + false + fi ;; + debug) nice $READNICE $CDROMREADER -d $CDROM -w $UTRACKNUM-[:1] "$WAVDATA" >&2 ;; + esac + RETURN=$? + if [ "$RETURN" != "0" ]; then + # Thank goodness errors is only machine-parseable up to the + # first colon, otherwise this woulda sucked + echo "readtrack-$FIRSTTRACKNUMBER: $CDROMREADER returned code $RETURN" >> "$ABCDETEMPDIR/errors" + return $RETURN + else + echo readtrack-$FIRSTTRACKNUMBER >> "$ABCDETEMPDIR/status" + fi +} + +# do_cdread [tracknumber] +# +do_cdread () +{ + # The commands here don't go through run_command because they're never supposed to be silenced + # return codes need to be doublechecked anyway, however + UTRACKNUM=$1 + CDDBTRACKNUM=$(expr $UTRACKNUM - 1) + WAVDATA="$ABCDETEMPDIR/track$UTRACKNUM.wav" + OUTDATA="$ABCDETEMPDIR/track$UTRACKNUM.$OUTPUTTYPE" + if [ -r "$CDDBDATA" ]; then + TRACKNAME=$(grep ^TTITLE$CDDBTRACKNUM= "$CDDBDATA" | head -n 1 | cut -f2 -d= | tr -d \[:cntrl:\]) + echo "Grabbing track $UTRACKNUM: $TRACKNAME..." >&2 + else + echo "Grabbing track $UTRACKNUM..." >&2 + fi + case "$CDROMREADERSYNTAX" in + cdparanoia) nice $READNICE $CDROMREADER -d $CDROM $UTRACKNUM "$WAVDATA" >&2 ;; + cdda2wav) + if [ "$OSFLAVOUR" = "OSX" ] ; then + # Hei, we have to unmount the device before running anything like cdda2wav in OSX + disktool -u ${CDROM#/dev/} 0 + # Also, in OSX the cdrom device for cdda2wav changes... + CDDA2WAVCDROM="IODVDServices" + elif [ "$OSFLAVOUR" = "FBSD" ] ; then + CDDA2WAVCDROM="$CDROMID" + else + if [ "$CDROMID" = "" ]; then + CDDA2WAVCDROM="$CDROM" + else + CDDA2WAVCDROM="$CDROMID" + fi + fi + nice $READNICE $CDROMREADER -D $CDDA2WAVCDROM -t $UTRACKNUM "$WAVDATA" >&2 + ;; + dagrab) nice $READNICE $CDROMREADER -d $CDROM -f $WAVDATA -v $UTRACKNUM >&2 ;; + cddafs) + # Find the track's mounted path + REALTRACKNUM=$(expr $UTRACKNUM + 0) + FILEPATH=$(mount | grep "$CDROM on" | sed 's/^[^ ]* on \([^(]*\) (.*/\1/') + FILEPATH=$(find "$FILEPATH" | grep "/$REALTRACKNUM "); + # If the file exists, copy it + if [ -e "$FILEPATH" ] ; then + nice $READNICE $CDROMREADER "$FILEPATH" "$WAVDATA" >&2 + else + false + fi ;; + debug) nice $READNICE $CDROMREADER -d $CDROM -w $UTRACKNUM-[:1] "$WAVDATA" >&2 ;; + esac + RETURN=$? + if [ "$RETURN" != "0" ]; then + # Thank goodness errors is only machine-parseable up to the + # first colon, otherwise this woulda sucked + echo "readtrack-$UTRACKNUM: $CDROMREADER returned code $RETURN" >> "$ABCDETEMPDIR/errors" + return $RETURN + else + echo readtrack-$UTRACKNUM >> "$ABCDETEMPDIR/status" + fi +} + +do_cdspeed () +{ + if "$CDSPEED" "$CDSPEEDOPTS" "$CDSPEEDVALUE" >/dev/null ; then + vecho "Setting CD speed to ${CDSPEEDVALUE}x" + else + echo "abcde: unable to set the device speed" >&2 + fi +} + +# vecho [message] +# +# vecho outputs a message if EXTRAVERBOSE is selected +vecho () +{ +if [ x"$EXTRAVERBOSE" != "x" ]; then + echo $@ +fi +} + +# Start of execution + +# Builtin defaults +CDDBURL="http://freedb.freedb.org/~cddb/cddb.cgi" +CDDBSUBMIT=freedb-submit@freedb.org +CDDBPROTO=5 +HELLOINFO="$(whoami)@$(hostname)" +INTERACTIVE=y +CDROMREADERSYNTAX=cdparanoia +OUTPUTTYPE=ogg +ENCODERSYNTAX=default + +MP3ENCODERSYNTAX=default +OGGENCODERSYNTAX=default +FLACENCODERSYNTAX=default +SPEEXENCODERSYNTAX=default + +OUTPUTFORMAT='${ARTISTFILE}-${ALBUMFILE}/${TRACKNUM}.${TRACKFILE}' +# Use the following VAOUTPUTFORMAT to revert to 2.0.x VA format: +#VAOUTPUTFORMAT=${OUTPUTFORMAT} +VAOUTPUTFORMAT='Various-${ALBUMFILE}/${TRACKNUM}.${ARTISTFILE}-${TRACKFILE}' +ONETRACKOUTPUTFORMAT='${ARTISTFILE}-${ALBUMFILE}/${ALBUMFILE}' +VAONETRACKOUTPUTFORMAT='Various-${ALBUMFILE}/${ALBUMFILE}' +PLAYLISTFORMAT='${ARTISTFILE}-${ALBUMFILE}.${OUTPUT}.m3u' +PLAYLISTDATAPREFIX='' +VAPLAYLISTFORMAT='${ARTISTFILE}-${ALBUMFILE}.${OUTPUT}.m3u' +VAPLAYLISTDATAPREFIX='' +DOSPLAYLIST=n +COMMENT='' +ID3TAGV=2 +ENCNICE=10 +READNICE=10 +DISTMP3NICE=10 +VARIOUSARTISTS=n +VARIOUSARTISTSTYLE=forward +NORMALIZERSYNTAX=default +KEEPWAVS=n +PADTRACKS=n +CDDBCOPYLOCAL="n" +CDDBLOCALDIR="$HOME/.cddb" +CDDBUSELOCAL="n" + +# If using scsi devices, cdda2wav needs a CDROMID, instead of a device node +# i.e. CDROMID="1,0,0" +CDROMID="" + +# program paths - defaults to checking your $PATH +# mp3 +LAME=lame +GOGO=gogo +BLADEENC=bladeenc +L3ENC=l3enc +XINGMP3ENC=xingmp3enc +MP3ENC=mp3enc +# ogg +VORBIZE=vorbize +OGGENC=oggenc +# flac +FLAC=flac +# speex +SPEEXENC=speexenc + +ID3=id3 +ID3V2=id3v2 +CDPARANOIA=cdparanoia +CDDA2WAV=cdda2wav +DAGRAB=dagrab +CDDAFS=cp +CDDISCID=cd-discid +CDDBTOOL=cddb-tool +EJECT=eject +MD5SUM=md5sum +DISTMP3=distmp3 +VORBISCOMMENT=vorbiscomment +METAFLAC=metaflac +NORMALIZE=normalize +CDSPEED=eject + +# Options for programs called from abcde +# mp3 +LAMEOPTS= +GOGOOPTS= +BLADEENCOPTS= +L3ENCOPTS= +XINGMP3ENCOPTS= +MP3ENCOPTS= +# ogg +VORBIZEOPTS= +OGGENCOPTS= +# flac +FLACOPTS= +# speex +SPEEXENCOPTS= + +ID3OPTS= +ID3V2OPTS= +CDPARANOIAOPTS= +CDDA2WAVOPTS= +DAGRABOPTS= +CDDAFSOPTS="-f" +CDDBTOOLOPTS= +EJECTOPTS= +DISTMP3OPTS= +NORMALIZEOPTS= +CDSPEEDOPTS="-x" +CDSPEEDVALUE= + +# Default to one process if -j isn't specified +MAXPROCS=1 + +# List of actions to perform - by default, run to completion +ACTIONS=cddb,read,encode,tag,move,clean + +# User-redefinable functions +# Custom filename munging: +mungefilename () +{ + echo "$@" | sed s,:,\ -,g | tr \ / __ | tr -d \'\"\?\[:cntrl:\] +} + +# Pre-read execution: +pre_read () +{ +: +} + +# Asume fetch if under FreeBSD. curl is used for Mac OS X. wget is used for Linux/OpenBSD/NetBSD. +# Let's use these checkings to determine the OS flavour, which will be used later +if [ X$(uname) = "XFreeBSD" ] ; then + HTTPGET=fetch + NEEDCDROMID=y + OSFLAVOUR=FBSD +elif [ X$(uname) = "XDarwin" ] ; then + HTTPGET=curl + OSFLAVOUR=OSX + # We should have disktool in OSX, but let's be sure... + NEEDDISKTOOL=y +elif [ X$(uname) = "XOpenBSD" ] ; then + HTTPGET=wget + MD5SUM=md5 +else + HTTPGET=wget +fi + +# If CDDBAVAIL is set to n, no CDDB read is done +# If USEID3 is set to n, no ID3 tagging is done +CDDBAVAIL=y +USEID3=y + +if [ -z "$OUTPUTDIR" ]; then + OUTPUTDIR=$(pwd) +fi + +if [ -z "$WAVOUTPUTDIR" ]; then + WAVOUTPUTDIR="$OUTPUTDIR" +fi + +# Load system defaults +if [ -r /etc/abcde.conf ]; then + . /etc/abcde.conf +fi +# Load user preference defaults +if [ -r $HOME/.abcde.conf ]; then + . $HOME/.abcde.conf +fi + +# By this time, we need some HTTPGETOPTS already defined. +# If the user has defined its own, we should not be empty. + +if [ "$HTTPGETOPTS" = "" ] ; then + case $HTTPGET in + wget) HTTPGETOPTS="-q -O -";; + curl) HTTPGETOPTS="-f -s";; + fetch)HTTPGETOPTS="-q -o -";; + *) echo "abcde warning: HTTPGET in non-standard and HTTPGETOPTS are not defined." >&2 ;; + esac +fi + +# If the CDROM has not been set yet, find a suitable one. +# If this is a devfs system, default to /dev/cdroms/cdrom0 +# instead of /dev/cdrom +if [ "$CDROM" = "" ] ; then + if [ -e /dev/cdroms/cdrom0 ]; then + CDROM=/dev/cdroms/cdrom0 + elif [ -e /dev/cdrom ]; then + CDROM=/dev/cdrom + elif [ -e /dev/cd0c ]; then + CDROM=/dev/cd0c + elif [ -e /dev/acd0c ]; then + CDROM=/dev/acd0c + elif [ -e /dev/disk1 ]; then + CDROM=/dev/disk1 + fi +fi + +# Parse command line options +#while getopts 1a:bc:C:d:Dhj:klLnNo:pr:S:t:T:vVx opt ; do +while getopts 1a:bc:C:d:Dhj:klLnNo:pr:S:vVx opt ; do + case "$opt" in + 1) ONETRACK=y ;; + a) ACTIONS="$OPTARG" ;; + b) BATCH=y ;; + c) if [ -e "$OPTARG" ] ; then . "$OPTARG" ; else echo "abcde error: config file \"$OPTARG\" cannot be found." >&2 ; exit 1 ; fi ;; + C) DISCID="${OPTARG#abcde.}" ;; + d) CDROM="$OPTARG" ;; + D) set -x ;; + h) usage; exit ;; + f) FORCECDDBUSELOCAL=y ;; + i) INLINETAG=y ;; + j) MAXPROCS="$OPTARG" ;; + k) KEEPWAVS=y ;; + l) LOWDISK=y ;; + L) CDDBUSELOCAL="y" ;; + n) CDDBAVAIL="n" ;; + N) INTERACTIVE="n" ;; + m) DOSPLAYLIST=y ;; + o) OUTPUTTYPE="$OPTARG" ;; + p) PADTRACKS="y" ;; + r) REMOTEHOSTS="$OPTARG" ;; + s) STARTTRACKNUMBER="$OPTARG" ;; + S) CDSPEEDVALUE="$OPTARG" ;; + t) PREPROCESSFORMATS="$OPTARG" + PREPROCESS=y ;; + T) POSTPROCESSFORMATS="$OPTARG" ;; + v) + echo "This is abcde v$VERSION." + echo "Usage: abcde [options] [tracks]" + echo "abcde -h for extra help" + exit + ;; + V) EXTRAVERBOSE="y" ;; + x) EJECTCD="y" ;; + ?) usage; exit ;; + esac +done + +shift $(($OPTIND - 1)) + +if [ "$ONETRACK" = "y" ] ; then + if [ $# -gt 0 ]; then + vecho "ONETRACK mode selected: grabbing all tracks..." + fi +else + while [ $# -gt 0 ]; do + # Range parsing code courtesy of Vincent Ho + RSTART=$(echo $1 | cut -f1 -d-) + REND=$(echo $1 | cut -f2 -d-) + if [ "$RSTART" = "$REND" ]; then + NEWTRACKS="$RSTART" + else + NEWTRACKS=$(f_seq_line $RSTART $REND) + fi + TRACKQUEUE=$(echo "$TRACKQUEUE" "$NEWTRACKS") + + shift + done +fi + +# At this point a CDROM has to be defined, so we check it exists. +if [ "$CDROM" != "" ] ; then + if [ "$CDROMREADERSYNTAX" = "cdda2wav" ] && [ "$NEEDCDROMID" = "y" ] ; then + if [ "$OSFLAVOUR" = "FBSD" ]; then + if ! echo "$CDROMID" | grep "^[0-9],[0-9],[0-9]$" >/dev/null 2>&1 ; then + echo "abcde error: CDROMID not in the right format for $CDROMREADERSYNTAX" + echo "Use \"cdrecord -scanbus\" to obtain a adecuate ID an set CDROMID accordingly" + exit 1 + fi + fi + elif [ ! -e $CDROM ] ; then + echo "abcde error: CDROM device cannot be found." >&2 + exit 1 + fi +else + echo "abcde error: CDROM has not been defined or cannot be found" >&2 + exit 1 +fi + +# Decide if we can continue. TO_REMOVE as soon as we find out about dagrab +if [ "$ONETRACK" = "y" ]; then + case "$CDROMREADERSYNTAX" in + dagrab|debug) echo "abcde error: ONETRACK reading is not suported with "$CDROMREADERSYNTAX" yet" + exit 1 ;; + esac + if [ "$BATCH" = "y" ]; then + echo "abcde error: BATCH mode is not compatible with ONETRACK mode" + fi +fi + +# Decide which CDROM reader we're gonna use +case "$CDROMREADERSYNTAX" in + cdparanoia|debug) + CDROMREADER="$CDPARANOIA" + CDROMREADEROPTS="$CDPARANOIAOPTS" + ;; + cdda2wav) + CDROMREADER="$CDDA2WAV" + CDROMREADEROPTS="$CDDA2WAVOPTS" + ;; + dagrab) + CDROMREADER="$DAGRAB" + CDROMREADEROPTS="$DAGRABOPTS" + ;; + cddafs) + CDROMREADER="$CDDAFS" + CDROMREADEROPTS="$CDDAFSOPTS" + ;; +esac + +# There's only one normalize... +case "$NORMALIZERSYNTAX" in + default|normalize) + NORMALIZER="$NORMALIZE" + NORMALIZEROPTS="$NORMALIZEOPTS" + ;; +esac + +# If nothing has been specified, use oggenc for oggs and lame for mp3s and flac for flacs and speexenc for speex + +# Getting ready for multiple output changes +for OUTPUT in $(echo $OUTPUTTYPE | tr , \ ) +do + case $OUTPUT in + ogg) [ "$OGGENCODERSYNTAX" = "default" ] && OGGENCODERSYNTAX=oggenc + echo $ACTIONS | grep tag > /dev/null 2>&1 && NEEDCOMMENTER=y + ;; + mp3) [ "$MP3ENCODERSYNTAX" = "default" ] && MP3ENCODERSYNTAX=lame + echo $ACTIONS | grep tag > /dev/null 2>&1 && NEEDTAGGER=y + ;; + flac) [ "$FLACENCODERSYNTAX" = "default" ] && FLACENCODERSYNTAX=flac + echo $ACTIONS | grep tag > /dev/null 2>&1 && NEEDMETAFLAC=y + ;; + spx) [ "$SPEEXENCODERSYNTAX" = "default" ] && SPEEXENCODERSYNTAX=speexenc ;; + *) echo "abcde error: Invalid OUTPUTTYPE defined" >&2 + exit 1 + ;; + esac +done + +# decide which encoder +case "$MP3ENCODERSYNTAX" in + lame) + MP3ENCODEROPTS="$LAMEOPTS" + MP3ENCODER="$LAME" + ;; + gogo) + MP3ENCODEROPTS="$GOGOOPTS" + MP3ENCODER="$GOGO" + ;; + bladeenc) + MP3ENCODEROPTS="$BLADEENCOPTS" + MP3ENCODER="$BLADEENC" + ;; + l3enc) + MP3ENCODEROPTS="$L3ENCOPTS" + MP3ENCODER="$L3ENC" + ;; + xingmp3enc) + MP3ENCODEROPTS="$XINGMP3ENCOPTS" + MP3ENCODER="$XINGMP3ENC" + ;; + mp3enc) + MP3ENCODEROPTS="$MP3ENCOPTS" + MP3ENCODER="$MP3ENC" + ;; +esac +case "$OGGENCODERSYNTAX" in + vorbize) + OGGENCODEROPTS="$VORBIZEOPTS" + OGGENCODER="$VORBIZE" + ;; + oggenc) + OGGENCODEROPTS="$OGGENCOPTS" + OGGENCODER="$OGGENC" + ;; +esac +case "$FLACENCODERSYNTAX" in + flac) + FLACENCODEROPTS="$FLACOPTS" + FLACENCODER="$FLAC" + ;; +esac +case "$SPEEXENCODERSYNTAX" in + speexenc) + SPEEXENCODEROPTS="$SPEEXENCOPTS" + SPEEXENCODER="$SPEEXENC" + ;; +esac + +# and which tagger + +if [ "$ID3TAGV" = "1" ]; then + TAGGER="$ID3" + TAGGEROPTS="$ID3OPTS" +else + TAGGER="$ID3V2" + TAGGEROPTS="$ID3V2OPTS" +fi + +# Clean up nice options (either use '-n NICELEVEL or -NICELEVEL') + +if [ "$ENCNICE" ]; then + ENCNICE="-n $ENCNICE" +fi +if [ "$READNICE" ]; then + READNICE="-n $READNICE" +fi +if [ "$DISTMP3NICE" ]; then + DISTMP3NICE="-n $DISTMP3NICE" +fi + +# Don't check for stuff if it's not needed +if [ "$REMOTEHOSTS" ]; then NEEDDISTMP3=y; fi +if echo $ACTIONS | grep normalize > /dev/null 2>&1 ; then NEEDNORMALIZER=y; fi +if [ "$EJECTCD" = "y" ]; then NEEDEJECT=y; fi +if echo $ACTIONS | grep cddb > /dev/null 2>&1 ; then NEEDHTTPGET=y ; fi + +if [ X"$CDSPEEDVALUE" != "X" ]; then + case "$CDROMREADERSYNTAX" in + cdparanoia|debug) CDROMREADEROPTS="$CDPARANOIAOPTS -S $CDSPEEDVALUE" ;; + *) NEEDCDSPEED=y ;; + esac +fi + + +# Make sure a buncha things exist +for X in $CDROMREADER $CDDISCID ${NEEDTAGGER+$TAGGER} $MP3ENCODER \ + $OGGENCODER $FLACENCODER $SPEEXENCODER ${NEEDHTTPGET+$HTTPGET} \ + ${NEEDDISTMP3+$DISTMP3} ${NEEDCOMMENTER+$VORBISCOMMENT} \ + ${NEEDMETAFLAC+$METAFLAC} ${NEEDNORMALIZER+$NORMALIZER} \ + ${NEEDEJECT+$EJECT} ${NEEDDISKTOOL+disktool} \ + ${NEEDCDSPEED+$CDSPEED} +do + # Cut off the command-line options we just added in + X=$(echo $X | cut -d' ' -f2) + if [ "$(which $X)" = "" ]; then + echo "abcde error: $X is not in your path." >&2 + exit 1 + elif [ ! -x $(which $X) ]; then + echo "abcde error: $X is not executable." >&2 + exit 1 + fi +done + +CDROMREADER="$CDROMREADER $CDROMREADEROPTS" +CDDBTOOL="$CDDBTOOL $CDDBTOOLOPTS" +HTTPGET="$HTTPGET $HTTPGETOPTS" + +# One thousand seven hundred lines in, we can start doing stuff with things + +# List of valid actions: cddb,playlist,read,normalize,encode,tag,move + +# Export needed things so they can be read in this subshell +export CDDBTOOL ABCDETEMPDIR TRACKQUEUE LOWDISK EJECTCD EJECT EJECTOPTS +export CDROM CDDBDATA REMOTEHOSTS MAXPROCS HTTPGET MD5SUM + +# User-definable function to set some things. Use it for +# - closing the CD tray with eject -t +# - set the CD speed value with eject -x +vecho -n "Executing customizable pre-read function... " + +pre_read # Execute the user-defined pre-read funtion. Close the CD with it. + +vecho "done." + +do_discid # Get ABCDETEMPDIR created and status file initialized + +if [ "$DOCDDB" = "y" ]; then + if [ $CDDBUSELOCAL = "y" ]; then + do_localcddb + fi + if [ ! "$CDDBLOCALSUCCESS" = "y" ] ; then + do_cddbstat + do_cddbquery + do_cddbread + fi + do_cddbedit + + eval $($CDDBTOOL parse "$CDDBDATA") +fi + +# Before reading tracks, we set the speed of the device + +if [ X"$CDSPEEDVALUE" != "X" ]; then + case "$CDROMREADERSYNTAX" in + cdparanoia|debug) : ;; + *) do_cdspeed ;; + esac +fi + +# Create playlist if needed (backgroundable) and start reading in tracks + +( +if [ "$ONETRACK" = "y" ]; then :; else + if [ "$DOPLAYLIST" = "y" ]; then + echo Creating playlist... >&2 + do_playlist + fi +fi + +# For the lowdisk option, only one program is running at once so the encoder +# can be unsilenced right away. +if [ "$LOWDISK" = "y" ] || [ "$ONETRACK" = "y" ]; then + echo "encode-output=loud" >> "$ABCDETEMPDIR/status" +fi + +if [ "$ONETRACK" = "y" ]; then + FIRSTTRACK=$( echo $TRACKQUEUE | awk '{print $1}' ) + TRACKS="$FIRSTTRACK" + for UTRACKNUM in $TRACKQUEUE; do :;done + if checkstatus readtrack-$FIRSTTRACK; then :; else + do_cdread_one $UTRACKNUM $FIRSTTRACK + fi +else + for UTRACKNUM in $TRACKQUEUE + do + if [ "$DOREAD" = "y" ]; then + if checkstatus readtrack-$UTRACKNUM; then :; else + do_cdread $UTRACKNUM + if [ "$?" != "0" ]; then + # CD read failed - don't give the goahead to + # the encoder + echo NO + exit + fi + fi + fi + if [ "$BATCH" = "y" ]; then + : + else + echo NEXTTRACK # Get the encoder machine churning again + if [ "$DOREAD" = "y" ]; then + if [ "$LOWDISK" = "y" ] && [ "$DOENCODE" = "y" ]; then + until checkstatus encodetrack-$UTRACKNUM + do + if checkerrors encodetrack-$UTRACKNUM; then + break + fi + sleep 2 + done + fi + fi + fi + done +fi + +# Now that we're done the encoding can be loud again - +# if we're not using SMP. +if [ "$MAXPROCS" = "1" ]; then + echo "encode-output=loud" >> "$ABCDETEMPDIR/status" +fi + +# All tracks read, start encoding. +if [ "$BATCH" = "y" ] || [ "$ONETRACK" = "y" ]; then + echo NEXTTRACK +fi + +# We are now finished with the cdrom - it can be safely ejected. Note that +# abcde will not have completed yet. +if [ "$EJECTCD" = "y" ] && [ -x $(which $EJECT) ]; then + # We check if the disk we are processing is actually the disk inside the + # CD tray. If not, we do not eject the CD, since it might be so that the + # user ejected it manually. + #CURRENTTRACKINFO=$($CDDISCID $CDROM) + #if if [ "$?" != "1" ] && [ "$CURRENTTRACKINFO" = "$TRACKINFO" ] ; then + # More FreeBSD bits. + if [ X"$(uname)" = X"FreeBSD" ] ; then + # FreeBSD eject uses the EJECT environment variable to name the CDROM + # but in this script EJECT is in the envionment and names the program + eject=$EJECT + unset EJECT + # The FreeBSD eject needs "adc0" not "/dev/adc0c" + cd="$(echo $CDROM | sed -e 's=.*/==;s=[a-h]$==;')" + $eject $EJECTOPTS $cd + elif [ X"$(uname)" = X"Darwin" ] ; then + disktool -e ${CDROM#/dev/} 0 + else + $EJECT $EJECTOPTS $CDROM + fi + #fi +fi + +) | ( + +# In batch mode, we want all tracks to be read first. +if [ "$BATCH" = "y" ]; then + read GOAHEAD # For blocking - will contain either "NO" or "NEXTTRACK" + if [ "$GOAHEAD" = "NO" ]; then break; fi + for LASTTRACK in $TRACKQUEUE; do :; done + if checkstatus readtrack-$LASTTRACK; then + if [ "$DONORMALIZE" = "y" ]; then + if checkstatus normalizetrack-$LASTTRACK; then :; else do_batch_normalize; fi + if checkerrors batch-normalize; then exit; fi + fi + if [ "$DOENCODE" = "y" ]; then + if checkstatus encodetrack-$LASTTRACK; then :; else do_batch_encode; fi + if checkerrors batch-encode; then exit; fi + fi + fi +fi + +# If we are using ONETRACK, we can proceed with the normal encoding using just the $FIRSTTRACK as TRACKQUEUE +if [ "$ONETRACK" = "y" ] ; then + FIRSTTRACK=$( echo $TRACKQUEUE | awk '{print $1}') + TRACKQUEUE=$FIRSTTRACK + TRACKS="$FIRSTTRACK" +fi + +# Do the encoding, including parallelization of remote encoding +# Figure out where each track is going to be encoded +ENCODELOCATIONS="$(echo $REMOTEHOSTS | tr , ' ')" +if [ "$MAXPROCS" != "0" ]; then + for NUM in $(f_seq_row 1 "$MAXPROCS") + do + ENCODELOCATIONS="$ENCODELOCATIONS %local$NUM%" + done +fi +# Strip whitespace +ENCODELOCATIONS=$(echo $ENCODELOCATIONS) +for UTRACKNUM in $TRACKQUEUE +do + # Wait for our cue + read GOAHEAD # For blocking - will contain either "NO" or "NEXTTRACK" + if [ "$GOAHEAD" = "NO" ]; then break; fi + # find out where this track is to be encoded + if [ "$DOENCODE" = "y" ]; then + # Make sure we have a place to encode this, if not, exit stage right + if [ -z "$ENCODELOCATIONS" ]; then + continue + fi + PROCEED= + until [ $PROCEED ] + do + for LOCATION in $ENCODELOCATIONS + do + PREVIOUSTRACK="$(checkstatus encodetracklocation-$LOCATION)" + # check first if a track has ever been assigned to this location + if [ -z "$PREVIOUSTRACK" ]; then PROCEED=y; break; fi + # If it errored out, rebuild $ENCODELOCATIONS without this location in it + if checkerrors encodetrack-$PREVIOUSTRACK; then + for TEMPLOCATION in $ENCODELOCATIONS + do + if [ "$TEMPLOCATION" != "$LOCATION" ]; then + TEMPENCODELOCATIONS="$TEMPENCODELOCATIONS $TEMPLOCATION" + fi + done + ENCODELOCATIONS=$(echo $TEMPENCODELOCATIONS) + ABORT=y + PROCEED=y + break + fi + # We're still here, this location must have been previously assigned, + # and last completed without error - check if it's done with the + # previous track yet + if checkstatus encodetrack-$PREVIOUSTRACK; then PROCEED=y; break; fi + done + # all locations are working, wait and try again later + if [ ! $PROCEED ]; then sleep 3; fi + done + # Record the location we're about to encode the next track at + echo "encodetracklocation-$LOCATION=$UTRACKNUM" >> "$ABCDETEMPDIR/status" + fi + # Don't proceed with the rest of the loop if we can't encode + if [ "$ABORT" ]; then continue; fi + # Set TRACKNUM, TRACKNAME + if [ -e "$CDDBDATA" ]; then + if [ "$ONETRACK" = "y" ]; then + TRACKNAME="$DALBUM" + TRACKNUM="$FIRSTTRACK" + splitvarious + else +# TRACKNUM=$(printf %0.${TRACKNUMPADDING}d $(expr ${UTRACKNUM} + 0)) + TRACKNUM=$UTRACKNUM + CDDBTRACKNUM=$(expr $UTRACKNUM - 1) + TRACKNAME=$(grep ^TTITLE$CDDBTRACKNUM= "$CDDBDATA" | head -n 1 | cut -f2 -d= | tr -d \[:cntrl:\]) + splitvarious + fi + fi + # You can't encode a file which needs to be normalized before finishing + # You can't tag a file before it's finished encoding - + # thus all of this is backgrounded together + ( + if [ "$DONORMALIZE" = "y" ]; then + if checkstatus readtrack-$UTRACKNUM; then + if checkstatus normalizetrack-$UTRACKNUM; then :; else do_normalize $UTRACKNUM; fi + fi + fi + if [ "$DOENCODE" = "y" ]; then + if checkstatus readtrack-$UTRACKNUM; then + #if checkstatus encodetrack-$UTRACKNUM; then :; else do_encode $UTRACKNUM $LOCATION; fi + if [ "$DONORMALIZE" = "y" ]; then + if checkstatus normalizetrack-$UTRACKNUM; then + if checkstatus encodetrack-$UTRACKNUM; then :; else do_encode $UTRACKNUM $LOCATION $OUTPUT; fi + fi + else + if checkstatus encodetrack-$UTRACKNUM; then :; else do_encode $UTRACKNUM $LOCATION $OUTPUT; fi + fi + fi + fi + if [ "$DOTAG" = "y" ]; then + if checkstatus encodetrack-$UTRACKNUM; then + if checkstatus tagtrack-$UTRACKNUM; then :; else do_tag $UTRACKNUM; fi + fi + fi + if [ "$DOMOVE" = "y" ]; then + if checkstatus tagtrack-$UTRACKNUM; then + if checkstatus movetrack-$UTRACKNUM; then :; else do_move $UTRACKNUM; fi + fi + fi + ) & +done +# Go through it again and make sure there's no distmp3 stragglers, otherwise +# we'll delete the files they're working on +if [ "$DOENCODE" = "y" ]; then + PROCEED= + until [ $PROCEED ] + do + PROCEED=y + for LOCATION in $ENCODELOCATIONS + do + CHECKTRACK="$(checkstatus encodetracklocation-$LOCATION)" + # "How can he give us a status update, if he's DEAD?" + if checkstatus encodetrack-$CHECKTRACK; then + continue + fi + # Nothing to see here please go quietly back to your homes + if [ -z "$CHECKTRACK" ]; then continue; fi + # You're still here? Maybe there is something... + if checkstatus encodetrack-$CHECKTRACK; then :; else PROCEED= ; break; fi + done + # hold up + if [ ! $PROCEED ]; then sleep 5; fi + done +fi +# If the above didn't catch the stragglers, this will +wait +# Check to see if run_command logged any errors +if [ -f "$ABCDETEMPDIR/errors" ]; then + echo "The following commands failed to run:" + cat "$ABCDETEMPDIR/errors" + # Don't clean up + DOCLEAN=n +fi +if [ "$KEEPWAVS" = "y" ];then + # Don't clean up + DOCLEAN=n +fi +if [ "$DOCLEAN" = "y" ]; then + # Wipe all the evidence + # Gimme gimme gimme some more time! + sleep 5 + rm -rf "$ABCDETEMPDIR" + echo "Finished." +else + echo "Finished. Not cleaning $ABCDETEMPDIR." +fi +) +exit 0 diff --git a/abcde.1 b/abcde.1 new file mode 100644 index 0000000..634e914 --- /dev/null +++ b/abcde.1 @@ -0,0 +1,355 @@ +.TH ABCDE 1 +.SH NAME +abcde \- Grab an entire CD and compress it to Ogg/Vorbis, MP3, FLAC or Ogg/Speex format. +.SH SYNOPSIS +.B abcde +.I [options] [tracks] +.SH DESCRIPTION +Ordinarily, the process of grabbing the data off a CD and encoding it, then +tagging or commenting it, is very involved. +.BR abcde +is designed to automate this. It will take an entire CD and convert it into +a compressed audio format - Ogg/Vorbis, MPEG Audio Layer III, Free Lossless +Audio Codec (FLAC) or Ogg/Speex. With one command, it will: +.TP +.B * +Do a CDDB query over the Internet to look up your CD or use a locally stored CDDB entry +.TP +.B * +Grab a track from your CD +.TP +.B * +Compress it to Ogg/Vorbis, MP3, FLAC and/or Ogg/Speex format +.TP +.B * +Comment or ID3 tag it +.TP +.B * +Give it an intelligible filename +.TP +.B * +Delete the intermediate WAV file (or save it for later use) +.TP +.B * +Repeat until finished +.SH OPTIONS +.TP +.B \-1 +Encode the whole CD in a single file. The resulting file uses the CD title +for tagging. +.TP +.B \-a [actions] +Comma-delimited list of actions to perform. Can be one or more of: +cddb, read, normalize, encode, tag, move, playlist, clean. Normalize +and encode imply read. Tag implies cddb, read, encode. Move implies +cddb, read, encode, tag. Playlist implies cddb. The default is to +do all actions except normalize and playlist. +.TP +.B \-b +Enable batch mode normalization. See the BATCH configuration variable. +.TP +.B \-c [filename] +Specifies an additional configuration file to parse. Configuration options +in this file override those in /etc/abcde.conf or $HOME/.abcde.conf. +.TP +.B \-C [discid] +Allows you to resume a session for +.I discid +when you no longer have the CD available (abcde will automatically resume if +you still have the CD in the drive). You must have already finished at +least the "read" action during the previous session. +.TP +.B \-d [devicename] +CD\-ROM block device that contains audio tracks to be read. +.TP +.B \-D +Capture debugging information (you'll want to redirect this \- try 'abcde \-D +2>logfile') +.TP +.B \-j [number] +Start [number] encoder processes at once. Useful for SMP systems. Overrides +the MAXPROCS configuration variable. Set it to "0" when using distmp3 to avoid +local encoding processes. +.TP +.B \-k +Keep the wav files after encoding. +.TP +.B \-l +Use the low-diskspace algorithm. See the LOWDISK configuration variable. +.TP +.B \-L +Use a local CDDB repository. See CDDBLOCALDIR variable. +.TP +.B -n +Do not query CDDB database. Create and use a template. Edit the template to +provide song names, artist(s), ... +.TP +.B -N +Non interactive mode. Do not ask anything from the user. Just go ahead. +.TP +.B -m +Create DOS-style playlists, modifying the resulting one by adding CRLF line +endings. Some hardware players insist on having those to work. +.TP +.B \-o [filetype] +Select output type. Can be "ogg", "mp3", "flac" or "spx". Specify a +comma-delimited list of output types to obtain all specified types. See +the OUTPUTTYPE configuration variable. +.TP +.B \-p +Pads track numbers with 0\'s. +.TP +.B \-r [hosts...] +Remote encode on this comma-delimited list of machines using distmp3. See +the REMOTEHOSTS configuration variable. +.TP +.B \-S [speed] +Set the speed of the CD drive. Needs CDSPEED and CDSPEEDOPTS set properly +and both the program and device must support the capability. +.TP +.B \-v +Show the version and exit +.TP +.B \-V +Be a bit more verbose. On slow networks the CDDB requests might give the +sensation nothins is happening. +.TP +.B \-x +Eject the CD when all tracks have been read. See the EJECTCD configuration +variable. +.TP +.B \-h +Get help information. +.TP +.B [tracks] +A list of tracks you want abcde to process. If this isn't specified, abcde +will process the entire CD. Accepts ranges of track numbers - +"abcde 1-5 7 9" will process tracks 1, 2, 3, 4, 5, 7, and 9. +.SH OUTPUT +Each track is, by default, placed in a separate file named after the track +in a subdirectory named after the artist under the current directory. Each +file is given an extension identifying its compression format, '.ogg', +\'.mp3', '.flac', or '.spx'. +This can be modified using the OUTPUTFORMAT and VAOUTPUTFORMAT +variables in your abcde.conf. +.SH CONFIGURATION +abcde sources two configuration files on startup - /etc/abcde.conf and +$HOME/.abcde.conf, in that order. +.TP +The configuration variables have to be set as follows: +.TP +.B VARIABLE=value +.TP +Except when "value" needs to be quoted or otherwise interpreted. If other +variables within "value" are to be expanded upon reading the configuration +file, then double quotes should be used. If they are only supposed to be +expanded upon use (for example OUTPUTFORMAT) then single quotes must be used. +.TP +All sh escaping/quoting rules apply. +.TP +Here is a list of options abcde recognizes: +.TP +.B CDDBURL +Specifies a server to use for CDDB lookups. +.TP +.B OGGENCODERSYNTAX +Specifies the style of encoder to use for the Ogg/Vorbis encoder. Valid options +are \'oggenc\' (default for Ogg/Vorbis) and \'vorbize\'. +This affects the default location of the binary, +the variable to pick encoder command-line options from, and where the options +are given. +.TP +.B MP3ENCODERSYNTAX +Specifies the style of encoder to use for the MP3 encoder. Valid options are +\'lame\' (default for MP3), \'gogo\', \'bladeenc\', \'l3enc\' and \'mp3enc\'. +Affects the same way as explained above for Ogg/Vorbis. +.TP +.B FLACENCODERSYNTAX +Specifies the style of encoder to use for the FLAC encoder. At this point only +\'flac\' is available for FLAC encoding. +.TP +.B SPEEXENCODERSYNTAX +Specifies the style of encoder to use for Speex encoder. At this point only +\'speexenc\' is available for Ogg/Speex encoding. +.TP +.B NORMALIZERSYNTAX +Specifies the style of normalizer to use. Valid options are \'default\' +and \'normalize'\ (and both run \'normalize\'), since we only support it, ATM. +.TP +.B HELLOINFO +Specifies the Hello information to send to the CDDB server. The CDDB +protocol requires you to send a valid username and hostname each time you +connect. The format of this is username@hostname. +.TP +.B CDDBLOCALDIR +Specifies a directory where we store a local CDDB repository. The entries must +be standard CDDB entries, with the filename being the DISCID value. Other +CD playing and ripping programs (like Grip) store the entries under ~/.cddb +and we can make use of those entries. +.TP +.B CDDBCOPYLOCAL +Store local copies of the CDDB entries under the $CDDBLOCALDIR directory. +.TP +.B CDDBUSELOCAL +Actually use the stored copies of the CDDB entries. Can be overriden using the +"-L" flag (if is CDDBUSELOCAL in "n"). If an entry is found, we always give +the choice of retrieving a CDDB entry from the internet. +.TP +.B OUTPUTDIR +Specifies the directory to place completed tracks/playlists in. +.TP +.B WAVOUTPUTDIR +Specifies the temporary directory to store .wav files in. Abcde may use up +to 700MB of temporary space for each session (although it is rare to use +over 100MB for a machine that can encode music as fast as it can read it). +.TP +.B OUTPUTFORMAT +Specifies the format for completed Ogg/Vorbis, MP3, FLAC or Ogg/Speex filenames. +Variables are included +using standard shell syntax. Allowed variables are GENRE, ALBUMFILE, ARTISTFILE, +TRACKFILE, and TRACKNUM. Default is +\'${ARTISTFILE}/${TRACKFILE}.${OUTPUTTYPE}\'. +Make sure to use single quotes around this variable. TRACKNUM is +automatically zero-padded. +.TP +.B OUTPUTTYPE +Specifies the encoding format to output, as well as the default extension and +encoder. Defaults to "ogg". Valid settings are "ogg" (Ogg/Vorbis), "mp3" +(MPEG-1 Audio Layer 3), "flac" (Free Lossless Audio Codec) and "spx" +(Ogg/Speex). Values like "ogg,mp3" encode the tracks in both Ogg/Vorbis and MP3 +formats. +.P +For each value in OUTPUTTYPE, abcde expands a different process for encoding, +tagging and moving, so you can use the format placeholder, OUTPUT, to create +different subdirectories to hold the different types. The variable OUTPUT will +be 'ogg', 'mp3', 'flac' and/or 'spx', depending on the OUTPUTTYPE you define. +For example +.P +OUTPUTFORMAT='${OUTPUT}/${ARTISTFILE}/${ALBUMFILE}/${TRACKNUM}._${TRACKFILE}' +.TP +.B VAOUTPUTFORMAT +Just like OUTPUTFORMAT but for Various Artists discs. Default is whatever +OUTPUTFORMAT is set to. +.TP +.B PATHNAMES +The following configuration file options specify the pathnames of their +respective utilities: LAME, GOGO, BLADEENC, L3ENC, XINGMP3ENC, MP3ENC, +VORBIZE, OGGENC, FLAC, SPEECENC, ID3, ID3V2, CDPARANOIA, CDDA2WAV, HTTPGET, +CDDISCID, CDDBTOOL, EJECT, NORMALIZE, DISTMP3, VORBISCOMMENT, and CDSPEED. +.TP +.B COMMAND-LINE OPTIONS +If you wish to specify command-line options to any of the programs abcde +uses, set the following configuration file options: LAMEOPTS, GOGOOPTS, +BLADEENCOPTS, L3ENCOPTS, XINGMP3ENCOPTS, MP3ENCOPTS, VORBIZEOPTS, +OGGENCOPTS, FLACOPTS, SPEEXOPTS, ID3OPTS, ID3V2OPTS, CDPARANOIAOPTS, +CDDA2WAVOPTS, HTTPGETOPTS, CDDBTOOLOPTS, EJECTOPTS, DISTMP3OPTS, +NORMALIZEOPTS, CDSPEEDOPTS, and CDSPEEDVALUE. +.TP +.B CDROM +If set, it points to the CD-Rom device which has to be used for audio +extraction. Abcde tries to guess the right device, but it may fail. +.TP +.B MAXPROCS +Defines how many encoders to run at once. This makes for huge speedups +on SMP systems. You should run one encoder per CPU at once for maximum +efficiency, although more doesn't hurt very much. Set it "0" when using +mp3dist to avoid getting encoding processes in the local host. +.TP +.B LOWDISK +If set to y, conserves disk space by encoding tracks immediately after +reading them. This is substantially slower than normal operation but +requires several hundred MB less space to complete the encoding of an +entire CD. Use only if your system is low on space and cannot encode as +quickly as it can read. +.TP +.B BATCH +If set to y, enables batch mode normalization, which preserves relative +volume differences between tracks of an album. Also enables nogap encoding +when using the \'lame\' encoder. +.TP +.B KEEPWAVS +It defaults to no, so if you want to keep those wavs ripped from your CD, +set it to "y". You can use the "-k" switch in the command line. The default +behaviour with KEEPWAVS set is the keep the temporary directory and the wav +files even you have requested the "clean" action. +.TP +.B PADTRACKS +If set to "y", it adds 0's to the file numbers to complete a two-number +holder. Usefull when encoding tracks 1-9. +.TP +.B PLAYLISTFORMAT +Specifies the format for completed playlist filenames. Works like the +OUTPUTFORMAT configuration variable. Default is +\'${ARTISTFILE}_\-_${ALBUMFILE}.m3u\'. +Make sure to use single quotes around this variable. +.TP +.B PLAYLISTDATAPREFIX +Specifies a prefix for filenames within a playlist. Useful for http +playlists, etc. +.TP +.B COMMENT +Specifies a comment to embed in the ID3 or Ogg comment field of each +finished track. Can be up to 28 characters long. Supports the same +syntax as OUTPUTFORMAT. Does not currently support ID3v2. +.TP +.B REMOTEHOSTS +Specifies a comma-delimited list of systems to use for remote encoding using +distmp3. Equivalent to -r. +.TP +.B mungefilename +mungefilename() is an abcde shell function that can be overridden via +abcde.conf. It takes CDDB data as $1 and outputs the resulting filename on +stdout. It defaults to eating control characters, apostrophes and +question marks, translating spaces and forward slashes to underscores, and +translating colons to an underscore and a hyphen. +.br +If you modify this function, it is probably a good idea to keep the forward +slash munging (UNIX cannot store a file with a '/' char in it) as well as +the control character munging (NULs can't be in a filename either, and +newlines and such in filenames are typically not desirable). +.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. +.SH BACKEND TOOLS +abcde requires the following backend tools to work: +.TP +.B * +An Ogg/Vorbis, MP3, FLAC or Ogg/Speex encoder (oggenc, vorbize, lame, gogo, bladeenc, l3enc, mp3enc, flac, speexenc) +.TP +.B * +An audio CD reading utility (cdparanoia, cdda2wav, dagrab) +.TP +.B * +cd-discid, a CDDB DiscID reading program. +.TP +.B * +An HTTP retrieval program: wget, fetch (FreeBSD) or curl (Mac OS X, among others). +.TP +.B * +(for MP3s) id3 or id3v2, id3 v1 and v2 tagging programs. +.TP +.B * +(optional) distmp3, a client/server for distributed mp3 encoding. +.TP +.B * +(optional) normalize, a WAV file volume normalizer. +.SH "SEE ALSO" +.BR cdparanoia (1), +.BR cdda2wav (1), +.BR dagrab (1), +.BR normalize (1), +.BR oggenc (1), +.BR vorbize (1), +.BR flac (1), +.BR speexenc(1), +.BR id3 (1), +.BR wget (1), +.BR fetch (1), +.BR cd-discid (1), +.BR distmp3 (1), +.BR distmp3host (1), +.BR curl(1) +.SH AUTHOR +Robert Woodcock +Jesus Climent diff --git a/abcde.conf b/abcde.conf new file mode 100644 index 0000000..4a35f60 --- /dev/null +++ b/abcde.conf @@ -0,0 +1,248 @@ +# System defaults for abcde version 2.1.x +# Nothing in this file is uncommented by default. +# +# If you wish to override these system-wide settings, create your own +# .abcde.conf file in your home directory. + +# If you wish to use a different CDDB server, edit this line. +# If you just wanted to use a proxy server, just set your http_proxy +# environment variable - wget will use it correctly. +#CDDBURL="http://freedb.freedb.org/~cddb/cddb.cgi" + +# The CDDB protocol requires hello information, including a valid username +# and hostname. If you feel paranoid about giving away such info, edit this +# line - the format is username@hostname. +#HELLOINFO="`whoami`@`hostname`" + +# This controls the email address CDDB changes are submitted to. +#CDDBSUBMIT=freedb-submit@freedb.org + +# The following options control whether or not fetched CDDB entries +# are cached locally in $CDDBLOCALDIR +#CDDBCOPYLOCAL="n" +#CDDBLOCALDIR="$HOME/.cddb" + +# Select here if you want to use the locally stored CDDB entries. +# This is useful if you do a lot of editing to those CDDB entries. +# Also, other tools like Grip store CDDB entries under $HOME/.cddb, +# so they can be reused when ripping CDs. +#CDDBUSELOCAL="n" + +# Specify the style of encoder to use here - +# oggenc, vorbize - for OGGENCODERSYNTAX +# lame, gogo, bladeenc, l3enc, xingmp3enc, mp3enc - for MP3ENCODERSYNTAX +# flac - the only supported for FLACENCODERSYNTAX at the moment. +# default is a valid option for oggenc, lame and flac. +# Currently this affects the default location of the binary, the variable +# to pick encoder command-line options from, and where the options are +# given. +# 'default' will currently choose oggenc or lame depending on OUTPUTTYPE. +#MP3ENCODERSYNTAX=default +#OGGENCODERSYNTAX=default +#FLACENCODERSYNTAX=default +#SPEEXENCODERSYNTAX=default + +# Specify the syntax of the normalize binary here - so far only 'normalize' +# is supported. +#NORMALIZERSYNTAX=default + +# CD reader program to use - currently recognized options are 'cdparanoia', +# 'cdda2wav', 'dagrab' and 'cddafs' (Mac OS X only). +#CDROMREADERSYNTAX=cdparanoia + +# Keep the wav files after encoding. Set it to "y" and remove "clean" from +# the list of default actions, since we purge the temp directory as default. +#KEEPWAVS=n + +# Track padding: force abcde to pad tracks using 0, so every song uses a two +# digit entry. If set to "y", even a single song encoding outputs a file like +# 01.my_song.ext +#PADTRACKS=n + +# Specify 'nice'ness of the encoder, the CD reader and the distmp3 proc. +# This is a relative 'nice'ness (that is, if the parent process is at a +# nice level of 12, and the ENCNICE is set to 3, then the encoder will +# run with an absolute nice value of 15. Note also, that setting these +# to be empty will result in some default niceness increase (4 in tcsh +# and 10 using the bsdutils' nice). +#ENCNICE=10 +#READNICE=10 +#DISTMP3NICE=10 + +# Paths of programs to use +#LAME=lame +#GOGO=gogo +#BLADEENC=bladeenc +#L3ENC=l3enc +#XINGMP3ENC=xingmp3enc +#MP3ENC=mp3enc +#VORBIZE=vorbize +#OGGENC=oggenc +#FLAC=flac +#SPEEXENC=speexenc +#ID3=id3 +#ID3V2=id3v2 +#CDPARANOIA=cdparanoia +#CDDA2WAV=cdda2wav +#CDDAFS=cp +#CDDISCID=cd-discid +#CDDBTOOL=cddb-tool +#EJECT=eject +#MD5SUM=md5sum +#DISTMP3=distmp3 +#VORBISCOMMENT=vorbiscomment +#NORMALIZE=normalize +#CDSPEED=eject + +# Options to call programs with: + +# If HTTPGET is modified, the HTTPGETOPTS options should also be defined +# accordingly. If HTTPGET is changed, the default options will be set, +# if HTTPGETOPTS is empty or not defined. +#HTTPGET=wget +# for fetch (FreeBSD): HTTPGETOPTS="-q -o -" +# for wget: HTTPGETOPTS="-q -O -" +# for curl (MacOSX): HTTPGETOPTS="-f -s" +#HTTPGETOPTS="-q -O -" + +# MP3: +#LAMEOPTS= +#GOGOOPTS= +#BLADEENCOPTS= +#L3ENCOPTS= +#XINGMP3ENCOPTS= +#MP3ENCOPTS= + +# Ogg: +#VORBIZEOPTS= +#OGGENCOPTS= + +# FLAC: +#FLACOPTS= + +# Speex: +#SPEEXENCOPTS= + +#ID3OPTS= +#ID3V2OPTS= +#CDPARANOIAOPTS= +#CDDA2WAVOPTS= +#CDDAFSOPTS="-f" +#CDDBTOOLOPTS= +#EJECTOPTS= +#DISTMP3OPTS= +#NORMALIZEOPTS= +#CDSPEEDOPTS="-x" +#CDSPEEDVALUE="" + +# Actions to take +# Comma-separated list of one or more of the following: +# cddb,read,normalize,encode,tag,move,playlist,clean +# encode implies read +# normalize implies read +# tag implies cddb,read,encode +# move implies cddb,read,encode,tag +# playlist implies cddb +# The default action list is defined in the following comment. +#ACTIONS=cddb,read,encode,tag,move,clean + +# CDDB options +# If NOSUBMIT is set to y, then abcde will never prompt asking if you +# wish to submit your edited cddb file. +#NOSUBMIT=n +# If NOCDDBQUERY is set to y, then abcde will never even try to access +# the CDDB server; running abcde will automatically drop you into a +# blank cddb file to edit at your leisure. This is the same as the +# -n option. NOCDDBQUERY=y implies NOSUBMIT=y. +#NOCDDBQUERY=n + +# CD device you want to read from +#CDROM=/dev/cdrom + +# If you'd like to make a default location that overrides the current +# directory for putting mp3's, uncomment this. +#OUTPUTDIR=`pwd` + +# Or if you'd just like to put the temporary .wav files somewhere else +# you can specify that here +#WAVOUTPUTDIR=`pwd` + +# OUTPUTTYPE can be either "ogg", "mp3", "flac" or "spx", or a combination +# of them separated with ",": "ogg,mp3". +#OUTPUTTYPE=ogg + +# Output filename format - change this to reflect your inner desire to +# organize things differently than everyone else :) +# You have the following variables at your disposal: +# OUTPUT, GENRE, ALBUMFILE, ARTISTFILE, TRACKFILE, and TRACKNUM. +# Make sure to single-quote this variable. abcde will automatically create +# the directory portion of this filename. +# NOTICE: OUTPUTTYPE has been deprecated in the OUTPUTFORMAT string. +# Since multiple-output was integrated we always append the file type +# to the files. Remove it from your user defined string if you are getting +# files like ".ogg.ogg". +#OUTPUTFORMAT='${ARTISTFILE}-${ALBUMFILE}/${TRACKNUM}.${TRACKFILE}' + +# Like OUTPUTFORMAT but for Various Artists discs. +#VAOUTPUTFORMAT='${ARTISTFILE}/${TRACKFILE}' + +# Define how many encoders to run at once. This makes for huge speedups +# on SMP systems. Defaults to 1. Equivalent to -j. +#MAXPROCS=2 + +# Support for systems with low disk space: +# n: Default parallelization (read entire CD in while encoding) +# y: No parallelization (rip, encode, rip, encode...) +#LOWDISK=n + +# Set the playlist file location format. Uses the same variables and format +# as OUTPUTFORMAT. If the playlist is specified to be in a subdirectory, it +# will be created for you and the playlist will reference files from that +# subdirectory. +#PLAYLISTFORMAT='${ARTISTFILE}-${ALBUMFILE}.${OUTPUT}.m3u' +# If you want to prefix every filename in a playlist with an arbitrary +# string (such as 'http://you/yourstuff/'), use this option +#PLAYLISTDATAPREFIX='' + +#Like PLAYLIST{FORMAT,DATAPREFIX} but for Various Artists discs: +#VAPLAYLISTFORMAT='${ARTISTFILE}-${ALBUMFILE}.${OUTPUT}.m3u' +#VAPLAYLISTDATAPREFIX='' + +#This will give the playlist CR-LF line-endings, if set to "y". +#(some hardware players insist on CR-LF line-endings +#DOSPLAYLIST=n + +# Custom filename munging: +# By default, abcde will do the following to CDDB data to get a useful +# filename: +# * 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 +# To change that, redefine the mungefilename function. +# mungefilename recieves the CDDB data (artist, track, title, whatever) +# as $1 and outputs it on stdout. +#mungefilename () +#{ +# echo "$@" | sed s,:,\ -,g | tr \ / __ | tr -d \'\"\?\[:cntrl:\] +#} + +# Custom pre-read function +# By default it does nothing. +# You can set some things to get abcde funtion in better ways: +# * Close the CD tray using eject -t (if available in eject and supported by +# your CD device. +# * Set the CD speed. You can also use the built-in options, but you can also +# set it here. In Debian, eject -x and cdset -x do the job. +#pre_read () +#{ +#: +#} + +# If you'd like to have abcde eject the cdrom after all the tracks have been +# read, uncomment the following line. +#EJECTCD=y + +# To encode on the remote machines foo, bar, baz, quux, and qiix, as well as +# on the local machine (requires distmp3 to be installed on local machine and +# distmp3host to be installed and running on all remote machines - see README) +#REMOTEHOSTS=foo,bar,baz,quux,qiix diff --git a/cddb-tool b/cddb-tool new file mode 100755 index 0000000..b760e26 --- /dev/null +++ b/cddb-tool @@ -0,0 +1,239 @@ +#!/bin/sh + +# Copyright (C) 1999 Nathaniel Smith +# Copyright (C) 1999, 2000, 2001 Robert Woodcock +# Copyright (C) 2003 Jesus Climent +# This code is hereby licensed for public consumption under either the +# GNU GPL v2 or greater, or Larry Wall's Artistic License - your choice. +# +# You should have recieved a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +# Copyright for this work is to expire January 1, 2010, after which it +# shall be public domain. + +# TODO: +# - Add more error checking + +# KNOWN BUGS: +# - Not much error checking, esp. of arguments +# - Submitted via: line is created by template, when it really should be in send. +# Oh well. + +VERSION=0.4.5 +NAME=cddb-tool + +#return codes +BAD_SYNTAX_ERR=10 # invalid CDDB file +NO_TMP_ERR=11 # can't create a temp file +NO_MATCH_ERR=12 # try submitting one +LOOKUP_ERR=13 # problem connecting to cddb server +EMPTY_QUERY_RESPONSE=14 # query response = "", (probably no net connection) + +# assume a reasonable default if $HTTPGET is undefined +if [ "$HTTPGET" = "" ]; then + if [ X"$(uname)" = X"FreeBSD" ] ; then + HTTPGET=fetch + HTTPGETOPTS=${HTTPGETOPTS:="-q -o -"} + elif [ X"$(uname)" = X"Darwin" ] ; then + HTTPGET=curl + HTTPGETOPTS=${HTTPGETOPTS:="-f -s"} + else + HTTPGET=wget + HTTPGETOPTS=${HTTPGETOPTS:="-q -O -"} + fi +fi + +HTTPGET="$HTTPGET $HTTPGETOPTS" + +usage() { + cat << EOF +$NAME version $VERSION +usage: one of: + $0 parse file + $0 template disc-id tracks + $0 send file address + $0 read server proto user host disc-id genre + $0 query server proto user host disc-id tracks + $0 stat serverurl user host proto + $0 help +EOF +} + +help() { + cat << EOF +$NAME version $VERSION +A toolbox for doing cddb related stuff + +Usage: $0 command [command_options] + +Commands: + parse file + Get data out of a cddb file - dumps to stdout in a form + source'able by the shell + + send file address + Mails a CDDB file to a specified address, using correct format. + Category should be one of blues, classical, country, data, folk, + jazz, newage, reggae, rock, soundtrack, or misc. + template disc-id tracks + Generates a template (empty) cddb file to stdout. The command + line should be essentially the output of cd-discid. + query server proto user host disc-id tracks + Looks up disc on server (should be of form "http://host/~cddb/cddb.cgi") + remainder of command line is in the same form as that returned + by the cd-discid program. + read server proto user host disc-id genre + CDDB file is dumped to stdout. File will contain an extra + #CATEGORY= line, which leaves it a valid CDDB file but which will + be recognized by parse and send commands. Uses wget, so if you + need to use a proxy then just configure wget to do so. user and + host will be used for identifying ourselves to the CDDB server. + stat serverurl user host proto + Check server status with given protocol. This can be used to check + if the server supports given protocol. Most common values for proto + should be 5 and 3. With 3 you will not get DYEAR and DGENRE fields + in response. + help + Display this. +EOF +} + +f_seq () +{ + i=$1 + while [ $i -ne `expr $2 + 1` ] + do + echo $i + i=`expr $i + 1` + done +} + +COMMAND=$1 +shift +case $COMMAND in +parse) # takes 1 argument, a filename, and dumps out a sh parseable version + CDDBFILE="$1" + + set -e + # names chosen to match usage in abcde code + DISCID=$(grep ^DISCID= "$CDDBFILE" | cut -f2 -d= | tr -d \[:cntrl:\]) + DARTISTALBUM=$(grep ^DTITLE= "$CDDBFILE" | cut -f2- -d= | tr -d \\n | sed 's- / -~-g' | tr -d \[:cntrl:\]) + DARTIST=$(echo "$DARTISTALBUM" | cut -f1 -d~ | sed 's,\\,\\\\,g;s,\([\"\$\`]\),\\\1,g' | tr -d \[:cntrl:\]) + DALBUM=$(echo "$DARTISTALBUM" | cut -f2 -d~ | sed 's,\\,\\\\,g;s,\([\"\$\`]\),\\\1,g' | tr -d \[:cntrl:\]) + CDDBGENRE=$(grep '^#CATEGORY=' "$CDDBFILE" | cut -f2- -d=) + if grep "^DYEAR" "$CDDBFILE" 2>&1 > /dev/null ; then + CDYEAR=$(grep "^DYEAR" "$CDDBFILE" | cut -f2- -d= | tr -d \[:cntrl:\]) + elif grep YEAR "$CDDBFILE" 2>&1 > /dev/null ; then + CDYEAR=$(grep "YEAR" "$CDDBFILE" | grep -v "DYEAR" | awk 'BEGIN{FS="YEAR:"}{print $2}' | awk '{print $1}') + else + CDYEAR="" + fi + CDGENRE=$(grep '^DGENRE=' "$CDDBFILE" | cut -f2- -d= | tr -d \[:cntrl:\]) + + set +e + echo DISCID="\"$DISCID\"" + echo DALBUM="\"$DALBUM\"" + echo DARTIST="\"$DARTIST\"" + echo CDDBGENRE="\"$CDDBGENRE\"" + echo CDYEAR="\"$CDYEAR\"" + echo CDGENRE="\"$CDGENRE\"" + NUMTRACKS=$(grep -E '^TTITLE[0-9]+=' "$CDDBFILE" | wc -l) + CURRTRACK=0 + while [ "$CURRTRACK" -lt $NUMTRACKS ]; do + CURRTRACKM1=$CURRTRACK # Track minus 1 (cddb numbers from 0) + CURRTRACK=$(expr $CURRTRACK + 1) + echo -n "TRACK${CURRTRACK}=\"" + grep ^TTITLE${CURRTRACKM1}= "$CDDBFILE" | cut -f2 -d= | sed 's,\\,\\\\,g;s,\([\"\$\`]\),\\\1,g' | tr -d \[:cntrl:\] + echo \" + done + ;; + +template) + DISCID="$@" + DISCNUM=$1 + echo '# xmcd CD database file' + echo '#' + echo '# Track frame offsets:' + NUMTRACKS=$2 + for x in $(f_seq 3 $(expr $NUMTRACKS + 2)) + do + printf "#\t$(echo "$DISCID" | cut -f$x -d' ')\n" + done + x=$(expr $x + 1) + LENGTH=$(echo "$DISCID" | cut -f$x -d' ') + echo "#" + echo "# Disc length: $LENGTH seconds" + echo "#" + echo "# Submitted via: $NAME $VERSION" + echo "#" + echo "#blues,classical,country,data,folk,jazz,newage,reggae,rock,soundtrack,misc" + echo "#CATEGORY=misc" + echo DISCID="$DISCNUM" + echo "DTITLE=Unknown Artist / Unknown Album" + echo "DYEAR=" + echo "DGENRE=" + # TTITLE0 -- TTITLEn + for x in $(f_seq 1 $NUMTRACKS) + do + echo "TTITLE$(expr $x - 1)=Track $x" + done + echo "EXTD=" + # EXTT0 -- EXTTn + for x in $(f_seq 1 $NUMTRACKS) + do + echo "EXTT$(expr $x - 1)=" + done + echo "PLAYORDER=" + ;; + +send) # cddb-tool send filename email@address + FILE="$1" + ADDRESS="$2" + DISCID=$(grep ^DISCID= "$FILE" | cut -f2 -d= | tr -d \[:cntrl:\]) + CDDBGENRE=$(grep '^#CATEGORY=' "$FILE" | cut -f2- -d=) + grep -v "^#CATEGORY=" "$FILE" | mail -s "cddb $CDDBGENRE $DISCID" "$ADDRESS" + ;; + +query) # cddb-tool query serverurl proto user host discid... + SERVER="$1" + PROTO="$2" + USER="$3" + HOST="$4" + HELLOINFO="$USER+$HOST+$NAME+$VERSION" + shift 4 + TRACKINFO="$@" + TRACKINFOPLUS=$(echo $TRACKINFO | tr ' ' '+') + RESULTS=$($HTTPGET "$SERVER?cmd=cddb+query+$TRACKINFOPLUS\&hello=$HELLOINFO\&proto=$PROTO") || exit $LOOKUP_ERR + echo $RESULTS | tr '\r' '\n' | tr -s '\n' | sed 's/^ //g' + ;; + +read) # cddb-tool read serverurl proto user host genre discnumber + SERVER="$1" + PROTO="$2" + USER="$3" + HOST="$4" + CATEGORY="$5" + DISCID="$6" + HELLOINFO="$USER+$HOST+$NAME+$VERSION" + $HTTPGET $CDDBDATA "$SERVER?cmd=cddb+read+$CATEGORY+$DISCID\&hello=$HELLOINFO\&proto=$PROTO" 2>/dev/null + ;; + +stat) # cddb-tool stat serverurl user host proto + SERVER="$1" + USER="$2" + HOST="$3" + PROTO="$4" + HELLOINFO="$USER+$HOST+$NAME+$VERSION" + $HTTPGET $CDDBDATA "$SERVER?cmd=stat&hello=$HELLOINFO\&proto=$PROTO" 2>/dev/null + ;; + +help) # help + help + ;; + +*) # usage + usage + ;; +esac diff --git a/cddb-tool.1 b/cddb-tool.1 new file mode 100644 index 0000000..3154905 --- /dev/null +++ b/cddb-tool.1 @@ -0,0 +1,97 @@ +.TH CDDB-TOOL 1 +.SH NAME +cddb-tool \- Get CDDB information +.SH SYNOPSIS +.B cddb-tool parse +.I file [-i|-d|-a|-t] [num|-c|-p] + +.B cddb-tool template disc-id tracks + +.B cddb-tool send +.I [file] address + +.B cddb-tool query +.I server user host disc-id tracks + +.B cddb-tool read +.I server user host disc-id genre + +.B cddb-tool help + +.SH DESCRIPTION +cddb-tool is a backend tool for abcde. It is passed information from +cd-discid and uses it look up the CD title, artist, and track information +on the cddb database (http://freedb.freedb.org) on the internet. +.SH COMMANDS +.B parse +.I [file] option + +Get data out of a cddb file (use "-" for stdin). +Options (use one and only one): +.RS +.TP +.B id +prints disc id +.TP +.B album +prints album title +.TP +.B track num +prints title of track num +.TP +.B +artist +prints artist +.TP +.B category +prints category +.TP +.B cddbgenre +synonym for category +.TP +.B all +parse file and dumps to stdout in a form sourceable by the shell +.RE + +.B send +.I [file] address + +Mails file file (or stdin of no file specified) +to specified address, using correct format. Category should +be one of blues, classical, country, data, fold, jazz, newage, +reggae, rock, soundtrack, misc. + +.B template +.I [disc-id] [tracks] + +Generates a template (empty) cddb file to stdout. The command +line should be essentially the output of cd-discid. + +.B query +.I [server] [user] [host] [disc-id] [tracks] + +Looks up disc on server (should be of form "http://host/cddb/cddb.cgi") +remainder of command line is in the same form as that returned +by the cd-discid program. Uses wget, so if you need to use a proxy +then just configure wget to do so. user and host will be used for +identifying ourselves to the CDDB server. Outputs response code and entries +with matching CDDB entries, if successful, from the CDDB server. + + +.B read +.I [server] [user] [host] [disc-id] [genre] + +Dumps CDDB entry to stdout. File will contain an extra #CATEGORY= +line, which leaves it a valid CDDB file but which will be recognized +by parse and send commands. Uses wget, so if you need to use a proxy +then just configure wget to do so. user and host will be used for +identifying ourselves to the CDDB server. + +.B help + +Prints usage information. + +.SH AUTHOR +Nathaniel Smith , maintained as part of abcde by +Robert Woodcock . Manual page compiled from help information +by Robert Woodcock. diff --git a/changelog b/changelog new file mode 100644 index 0000000..9fac8ff --- /dev/null +++ b/changelog @@ -0,0 +1,844 @@ +abcde 2.1.19 + + * Encoding the whole CD in one file is now possible. Use "-1" as a flag + (Closes: #126267). + + -- Jesus Climent Fri, 9 Apr 2004 17:04:58 +0000 + +abcde 2.1.18 + + * Do not release in a hurry. The eject program is not needed if CDSPEEDVALUE + is not set and no EJECT action is performed (Closes: #242506) + + -- Jesus Climent Thu, 8 Apr 2004 05:18:49 +0000 + +abcde 2.1.17 + + * Dud! Those missing quotes are going to kill me. Quotes restored and + (Closes: #242508). + + -- Jesus Climent Wed, 7 Apr 2004 06:30:31 +0000 + +abcde 2.1.16 + + * New setting for the CD speed. Some drives have a higher failure ratio when + spinning at high speed. + * Added a pre-read function for preparations. Uses include closing the CD + tray (Closes: #137548). + * Added COMMENT part in OggFlac metadata. + * Documentation update: README, abcde.1 + * Do not tag GENRE and DATE in Ogg/Vorbis if CDDB does not provide them + (Closes: #235531). + * Solved bug with batch encoding, thanks to Travis McKay. + * When *DATAPREFIX was set, the playlist creation was made without newline. + * Added >&2 redirection to visualize the "Erase playlist" question + (Closes: #241221). + * Added the option "-m" to modify the resulting playlist, to contain CRLF at + the end of every line, letting some hardware players which insist with + DOS-style files to use them. Also, added DOSPLAYLIST as a config option. + * When using a selected, localy cached CDDB entry, we forgot to show the + selection when asking the user for editing the choice. Now we show it. + * Improved the logic in the order of events when using a local CDDB repo. + + -- Jesus Climent Tue, 6 Apr 2004 05:29:38 +0000 + +abcde 2.1.15 + + * EDITOR is called now evaluating the variable, so it works with full path + and arguments. + * Patch for making md5sum a variable (since some systems use a different + name). + * Correction by "huf" . The test code in line 376 + needed some quotes. + * The PADDING code and some CDDB funcions were *really* messy. Now it looks + cleaner, works faster and some not needed network operations are no + longer performed when we are working with local CDDB repositories. + * Added "-V" for extra verbosity (on slow networks the user might be waiting + and wondering is somethins is happening). + * Solved a bug with the non-interactive code. + + -- Jesus Climent Mon, 16 Feb 2004 00:13:12 +0000 + +abcde 2.1.14 + + * Missing quotes restored (Closes: #228648). + + -- Jesus Climent Tue, 20 Jan 2004 06:43:04 +0000 + +abcde 2.1.13 + + * Solved the problem with re-runs of multiple choices not showing all the + choices (Closes: #228405) (this was a quick one) + * We now show the selected CDDB entry on a second run, instead of all of + them (not that one should stop abcde, but just in case). This way + consecutive interrupted runs obtain the same results. + + -- Jesus Climent Sun, 18 Jan 2004 22:42:15 +0000 + +abcde 2.1.12 + + * Check if normalizer is found in the PATH (Closes: #228014) + * Added (commented) bits to check if the CD being processed is the CD on the + tray, so that if differs we do not eject it. + * Store locally the CDDB information, under $HOME/.cddb since it is being + used by Grip (at least). PATH is user defined (Closes: #88048) + * If you are using cdda2wav and SCSI drives, you can set CDROMID for the + SCSI drive, since it differs from the cd-discid CDROM parameter + (Closes: #121987). + * MacOSX keeps on failing because the OS mounts the CD before we finish + ripping it... or something else. Please, test test test the code, and + report your findings. Pretty please. I have not been able to make it work + with the reports I have received. + + -- Jesus Climent Fri, 16 Jan 2004 12:06:07 +0000 + +abcde 2.1.11 + + * Urgent fixes for the FreeBSD and MacOSX bits. When using cdda2wav, the + CDROM variable must be modified depending on the device interface. By now + we will not try to be very smart. + * Added a test for HTTPGETOPTS since it cannot be empty for the default + HTTPGET options. + * Quick release to fix a problem with the CDROM detection code. + (Closes: #226647) + * Cleaned a bashism. Thanks to Klaus Ethgen (Closes: #226782). + * Rewrote some parts of the cdda2wav code. Since I do not have a machine + where cdda2wav works, I cannot test the code. The modifications have been + done following user reports. If you use cdda2wav and abcde does not work + for you, please, contact me and we will try to sort things out. Thanks. + + -- Jesus Climent Thu, 8 Jan 2004 21:36:23 +0000 + +abcde 2.1.10 + + * INLINETAG and STARTTRACKNUMBER flags added. + * CDROM checking is now done with a bit more wiselly (Closes: #219768) + * HTTPGET is only requested is "cddb" action is performed. + * Workout the possibility of cdparanoia erasing our wav files + (Closes: #172694) + * The default answer for editing CDDB data is now "y" if the disk is + unknown. If not, the default is "n". Requested by Ricky Buchanan. + * Now we do not erase silently any previous $PLAYLISTFILE left behind by a + previous CD ripping (Closes: #220753) + * Write info file with cdda2wav (Closes: #187702). + I do not use cdda2wav myself (me is cd-paranoid) so if anyone using + cdda2wav has a problem with this, please, report. + * CDROM comes in 1,0,0 kind of format for cdda2wav ripper. Corrected with a + quick patch. Kudos go to Mikhail Manuilov for + noticing. + * Merged bits to make abcde work under MacOSX. Thanks to Evan Jones. + * Merged bits to avoid FreeDB people anger and to cut down the "abcde." part + of the discid. Now you can set the "-C" command with the directory name. + Kudos go to Bart Samwel. + * Added some info bits to the config file about normalize, requested by + Ricky Buchanan. + * Added some testing for the wav file before normalizing, to check that the + file is actually there. + + -- Jesus Climent Mon, 5 Jan 2004 14:43:59 +0000 + +abcde 2.1.9 + + * The "First snow in Finland" release. + * One head was missing a "-n" + * Not use relative links when PLAYLISTDATAPREFIX is set (Closes: #165368) + * Stupid use of $OUTPUTTYPE in flac tagging (Closes: #218625) + + -- Jesus Climent Sun, 2 Nov 2003 09:05:17 +0000 + +abcde 2.1.8 + + * Small typo corrected (Closes: #217149) + * KEEPWAVS now sets the "clean" action to "no", so the wavs are kept. + (Closes: #216551) + * Quick release fixing a couple of bugs introduced by the padding patch + (Closes: #215962) + * Control: Build-Depends-Indep: moved to Build-Depends:, as per + http://www.debian.org/doc/debian-policy/ch-relationships.html#s-sourcebinarydeps + (Closes: #214200) + + -- Jesus Climent Thu, 23 Oct 2003 09:49:01 +0000 + +abcde 2.1.7 + + * The "Engineer" release. Yeah! I graduated! + * Patch applied to solve the track submission interface issues. Kudos to + Marc HE Brockschmidt, again (Closes: #126289) + * Small bug related with DISTMP3NICE solved. Kudos to Wilbert Alberts. + (Closes: #213756) + * Padding now creates the list with padded numbers. Test patch. This should + solve the problem with delayed tagging a single file. + + -- Jesus Climent Fri, 13 Oct 2003 09:50:09 +0000 + +abcde 2.1.6 + + * Removed a nasty bug where even if the encode failed, the track was marked + as successfully encoded (Closes: #208391) + * Various Artists has now its own PLAYLIST format (Closes: #137432) + * metaflac path corrected (Closes: #206110) + * Hopefully this version repairs the comment part for Ogg/Vorbis files. + * If nothing breaks, 2.2 will be released as soon as the KNOWNBUG is solved. + * Removed all the inline tagging since it breaks the action chain, except + in Ogg/Speex. Need to check if "vorbiscomment" can be used for it. + (Closes: #206311) + * Added DISTMP3NICE variable, to nice the distmp3 program (Closes: #208398) + + -- Jesus Climent Thu, 4 Sep 2003 10:53:09 +0000 + +abcde 2.1.5 + + * Small fixes and patches. + + GENRE can be used for OUTPUTFORMAT and PLAYLISTFORMAT + + id3v2 should work now with -c for comments (Closes: #199949) + + small bug with batch encoding + + Variables are exported before the CDDB functions are called, so they + should use the right variables for the HTTPGET command. + + Tagging also use TRACKS and CDGENRE for MP3 files (kudos to Dirk + Ruediger) + + FLAC encoding now uses dismp3 to encode remotelly (kudos to Taylor and + Kevin Cramer). HANDLE WITH CARE ;) + Also FLAC now uses CDGENRE and CDYEAR for tagging. + * tail/head change: -1 has been deprecated. Noted by Stephan Kulow. + * Ogg/Speex support added, for speech encoding (Closes #204635) + * Documentation update (Closes: #198825) + * Patch for "=" in the name applied (Closes: #197199) + + -- Jesus Climent Thu, 14 Aug 2003 16:45:29 +0000 + +abcde 2.1.4 + + * Small bug fixes: + + COMMENT should work now. + + Aesthetic padding on the total amount of tracks. + + CDROM typo + + CDROM is now checked after reading the user defined entries. + * Remove trailing args from $EDITOR when checking -x: Closes #179222. + + -- Jesus Climent Sun, 18 May 2003 18:47:36 +0000 + +abcde 2.1.3 + + * Makefile was missing cddb-tool.1. + * Introduced dagrab as CD ripping utility. + * cddb-tool seq calls converted to functions. No more distro dependencies. + * WGET* variables converted to HTTPGET* variables. FreeBSD can safelly use + fetch. + * More FreeBSD specific bits: CDROM and EJECT changes. + * Typo in abcde.conf + * Added CDDBPROTO for specifying the protocol level of the cddb query. + * CDDB protocol upgraded to 5. CDYEAR and CDGENRE are now used for CD + tagging. + * COMMENT is now used for inline tagging with oggenc (my mistake it was + missing): Closes: #191475. + + -- Jesus Climent Sat, 10 May 2003 07:49:22 +0000 + +abcde 2.1.2 + + * Documentation updates: Closes: #186230. + * Usual set of bug fixes and corrections. + * Default behaviour of VAOUTPUTFORMAT output changed to avoid multiple + directories for a same album. I think the format is more logical, and you + can always split the files once they are created. + * Padding track wavs with 0 so if you want to burn those wavs just cdrecord + *.wav will do it. Use "-p" to force it when encoding a small (<9) number + of files (Closes: #111627). + * Added "KEEPWAVS" as a variable to keep those wavs. Default is "no". Can + use also "-k" in the command line. (Closes: #160372). + This probably should be changed with an option to move the wav files to + another directory instead of just keep de abcde. directory. + * Added documentation comments about OUTPUTTYPE (Closes: #184963). + * abcde.conf cleanup: (Closes: #186230, #187400). + + -- Jesus Climent Tue, 25 Mar 2003 16:39:25 +0200 + +abcde 2.1.1 + + * New release. + + -- Jesus Climent Mon, 17 Mar 2003 08:52:01 +0200 + +abcde 2.1.0-3 + + * Since abcde does not depend on eject, an execution test ([-x]) was added, + but that means abcde needs a test for eject in the patch if -x is passed: + Closes: #184151. + * Merged some more bits from Marc 'HE' Brockschmidt: Closes: #126289. + * A bit of more info in abcde.conf: Closes: #184963. + * cddb-tool version updated to 0.4.2 + + -- Jesus Climent Fri, 14 Mar 2003 18:00:03 +0000 + +abcde 2.1.0-2 + + * Old version string left behind. Updated. + * Few more doc update bits. + * Patches from Marc 'HE' Brockschmidt: Closes: #149499. + * Small patch from Norbert Preining to support multiple output in the output + directory. + * cddb-tool parses CDYEAR with the help of awk: Closes: #114848. + * cddb-tool does not globe "*" characters anymore: Closes: #157448. + + -- Jesus Climent Fri, 7 Mar 2003 + +abcde 2.1.0 + * The infamous "Works for me(TM)" and "Time to release" release. + + We preppend track number now: Closes: #128966. + + Itegrate flac: Closes: #126311. + + Multi-format encode: Closes: #148934. + + Gapless lame encoding: Closes: #172696. + + CDROM documented: Closes: #182403. + * Applied OpenBSD patches to make the script more portable. Thanks to Han + Boetes. + * Documentation fixes: closes: #100844, #136741. + * NetBSD patches applied: + - EXPERIMENTAL Normalize and Batch support. + - EXPERIMENTAL FLAC support. + * EXPERIMENTAL multiple output support: + + multiple output and error checking + + multiple lists support + * Default output file changed to have the $track_number in the begining. + * abcde takeover. + + -- Jesus Climent Fri, 28 Feb 2003 + +abcde 2.0.3 + * The Fixed-Yet?-How-About-Now?-What-About-Now?-Now? Release + * SMP fixed, mad props to Steve Madsen, closes: #69828, #111806 + * Minor code cleanups thanks to Adam Heath + * Multiple inexact match results are generated in a safe manner + thanks to Nick Martin, closes: #126025 + * Removed cddb-tool template generation bashism, thanks to Greg + Norris, closes: #126327 + * Windows can't handle double quotes in filenames either. + The default mungefilename now removes them, closes: #127643 + * Using -C with WAVOUTPUTDIR fixed, closes: #127728 + * Resuming various artists discs fixed, closes: #127731 + + -- Robert Woodcock Sun, 27 Jan 2002 + +abcde 2.0.2 + * The One-More-Time-With-Feeling Release + * Bladeenc really works this time. Honest. closes: #121988 + + -- Robert Woodcock Mon, 3 Dec 2001 + +abcde 2.0.1 + + * The I-Don't-Listen-To-Sssca Release + * Example abcde.conf fixes, closes: #111580 + * So much for bladeenc's l3enc compatibility, closes: #110863 + * CDDB submit fixes (to enable CDDB submitting, put + UNINTENTIONALLY_ANGER_THE_FREEDB_PEOPLE=y in your abcde.conf), + closes: #111478, #111500 + * Minor mungefilename() cleanup + * Small manpage fix + * Works with oggenc when POSIXLY_CORRECT is defined, thanks to Juhapekka + Tolvanen + * Quote remote locations when calling distmp3 + * Allow remote encoding of oggs + * Only remove wav files if the encoding succeeded + * No-local-encoding via -j 0 fixed, thanks to Hans-Joachim Baader + * CD read errors are trapped/resumed cleanly now thanks to Pete, + closes: #111618 + * devfs device check fix, thanks to Clint Adams + * Check for seq command - some BSD's have jot instead and abcde can't + use that yet + * Various Artists playlist generation fixed, thanks to William Lash + + -- Robert Woodcock Tue, 6 Nov 2001 + +abcde 2.0 + + * The Psychiatrist-Says-I'm-Stable-Again Release + * Renamed to 2.0 + * Minor documentation updates + + -- Robert Woodcock Wed, 15 Aug 2001 + +abcde 1.9.10 + + * The Waiter-There's-A-Proof-In-My-Pudding Release + * Fixed some quoting issues preventing abcde from using a temp directory + containing spaces, closes: #89682 + * Now purges encodetracklocation notes from the status file when resuming. + * -a playlist now implies -a cddb + * Manpage and default config file updates, closes: #78726, #100841, #100845 + * Applied checkstatus patch by Itai Zukerman, fixes certain track number + status checking situations, closes: #93395 + * Check to see if things run through run_command return a nonzero error + code and present the command and error code to the user later, + closes: #93485 + * Devfs fixup - If /dev/cdrom doesn't exist, try /dev/cdroms/cdrom0, + closes: #101933 + * If a background process returned an error, log it. If it was an encode + process, abandon that encode location and don't wait for the encode + process to finish. Display the commandlines that resulted in error exits + with their exit codes before aborting. + * do_tag handles vorbis commenting failures idempotently + * -n works again + * Resumes encoding if all files have ripped, closes: #101843 + * do_cddbedit code checks to see if it's already been run + + -- Robert Woodcock Wed, 1 Aug 2001 + +abcde 1.9.9 + + * The Not-Quite-Last-In-The-Development-Series Release + * I broke ID3v1 comments in 1.9.8, it's fixed now, thanks to Christian + Beyerlein for noticing this + + -- Robert Woodcock Tue, 13 Mar 2001 + +abcde 1.9.8 + + * The Groundshaking Release + * Now defaults to using FreeDB instead of Gracenote. Pricks. + * New VAOUTPUTFORMAT variable for those who like their various artists + discs named in a different format + * Accomodates the fact that OpenBSD xargs does not eat whitespace, thanks + to Marcus Daniel for discovering this + * New scheduler for distmp3, thanks to David Bergeron + * xingmp3enc support, thanks to Brian Gannon + * Stripped down cddb-tool a little bit so that abcde no longer requires + mktemp + * New -C option to let people continue where they left off if they no + longer have the CD handy + * ID3COMMENT is now COMMENT + * Ogg commenting is now done separately so resuming doesn't break it + * More documentation updates + + -- Robert Woodcock Sat, 10 Mar 2001 + +abcde 1.9.7 + + * The Overcast Partial Eclipse Release + * Supports ID3v2 + * Various Artists heuristics patch by Kevin Everets + * New -c option to specify an extra configuration file + * Does not try to check if a tagger exists unless OUTPUTTYPE=mp3 + * cddb-tool template output fixes + * Yet more documentation updates + * Avoids id3v2's -c option for now + * Adds support for another Various Artists format, "Artist: Title", thanks + to Wolfgang Borgert + * Fixed typo that was breaking remote encoding support + * Hitting control-c while there's nothing in the foreground no longer + causes abcde to delete all its work upon exit + + -- Robert Woodcock Sun, 7 Jan 2001 + +abcde 1.9.6 + + * The Squishy Release + * Updated getopts call to remove obsoleted options + * More documentation fixes, closes: #77957 + * Single inexact match spurious question fix + * Fixed encoder trigger timing when using -l, closes: #77854 + + -- Robert Woodcock Sun, 26 Nov 2000 + +abcde 1.9.5 + +* The "Run Towards Trick Or Treaters With Scissors" Release +* Some documentation updates +* mungefilename quoting fix +* Implemented -a, which replaces -p, -P, and a number of other things + + -- Robert Woodcock Mon, 30 Oct 2000 + +abcde 1.9.4 + +* The "Run With Scissors" Release +* Various Artists support by Kevin Everets +* Specifying track numbers on the command line should work again, bash was + getting a wee bit confuzzled with the way I had things before. +* A couple more error output changes and miscellaneous fixes +* OUTPUTDIR works again + + -- Robert Woodcock Thu, 28 Sep 2000 + +abcde 1.9.3 + +* The ugh Release +* Brown Paper Bag fix for mp3enc users +* Recreated the rest of the variable environment in do_playlist, fixes + TRACKNUM availability for real this time, closes: #72535 + + -- Robert Woodcock Tue, 26 Sep 2000 + +abcde 1.9.2 + +* The "Very Long Changelog Entries Can Become Addicting" Release. +* Switched default output type to ogg, default encoder to oggenc +* Since 1.9.x prompts for CDDB edits by default there is now a -N switch + for non-interactivity. +* Handles cddb entries with random sprinklings of CR's and LF's +* You can now specify niceness for the reader and encoders, thanks to + Kevin Everets +* -j 0 will now disable local encoding, thanks to Antonio Fiol + +* Vorbize should actually work now, thanks to Kevin Everets and James + LewisMoss +* Oggenc/Vorbize commenting support +* Made TRACKNUM available for playlist generation +* Fleshed out the TODO list a bit more +* mungefilename() now translates ':' to ' -' by default. Rationale: You + can't put ':' on a FAT filesystem. It also wreaks havoc with Samba. + + -- Robert Woodcock Mon, 25 Sep 2000 + +abcde 1.9.1 + +* The "Don't Fraun" Release. +* Fixed a half-dozen minor buglets +* A little less debug output, a lot more normal output +* Resuming operation works better now +* Patched up offline usage again +* Broke OUTPUTFORMAT - if you plan on ever using Ogg support, and you've + overridden the OUTPUTFORMAT default, change the ".mp3" to + ".${OUTPUTTYPE}" +* Beginnings of Ogg Vorbis support (vorbize and oggenc) - warning: + completely untested + + -- Robert Woodcock Thu, 17 Aug 2000 + +abcde 1.9 + +* The "" Release. +* Completely redone tmpfile handling, abcde can now continue where you left + off. closes: #42970, #50883, #66668 +* Restructured program execution scheduling around central status file +* Moved cddb-tool interactivity to abcde, 'cddb-tool get' no longer exists, + it is now 'cddb-tool query' and 'cddb-tool read'. +* Removed -e, -v, and -V, since abcde will now prompt you if you want to + edit or otherwise muck with the data after you have a chance to see it. + + -- Robert Woodcock Thu, 22 Jun 2000 + +abcde 1.1.1 + +* The "That wasn't chicken" release. +* Remote distributed encoding had a bad bug in 1.1 - work to be done + remotely was duplicated locally (everything still turned out ok - there + was just no speedup). Fixed that. +* Restructured encode_and_tag function. + + -- Robert Woodcock Sun, 07 May 2000 + +abcde 1.1 + +* The "We heard Mr. Garrison say them a couple of times" Release. +* New -r and REMOTEHOSTS option to use distmp3 to encode to multiple + hosts at once. +* Command-line track range specification (f.e. "abcde 1-12" + (Thanks: Vincent Ho) +* Now displays minutes/seconds for each track while displaying track titles + at the start + + -- Robert Woodcock Tue, 18 Apr 2000 + +abcde 1.0.6 + +* The "Inspected by #17" Release. +* New EJECTCD option to eject the CD after all tracks are read (thanks: + Hrafnkell F Hlodversson) + + -- Robert Woodcock Sun, 2 Apr 2000 + +abcde 1.0.5 + +* The "...So we can both watch X-Files..." Release. +* Quoting fix for setups without space->underscore filename munging +* README file URL fixes/updates + + -- Robert Woodcock Thu, 16 Mar 2000 + +abcde 1.0.4 + +* CDPARANOIAOPTS and CDDA2WAVOPTS should work now. + + -- Robert Woodcock Sun, 20 Feb 2000 + +abcde 1.0.3 + +* The "This Space Intentionally Left Blank" Release +* Support for reverse and dashed Various Artists discs +* More elegant way of passing backtick data +* Replaced all `foo` commands with $(foo) +* Custom filename munging, closes: #38448 + + -- Robert Woodcock Wed, 9 Feb 2000 + +abcde 1.0.2 + +* Now eats backticks in CDDB input (thanks to Steve Beattie) +* mp3enc support (thanks to Richard Jelinek and Chris Ruvolo), closes: #56189 +* cddb-tool more gracefully handles no net connection for those with + local caching name servers +* Fixed HELLOINFO documentation bug, closes: #56189 + + -- Robert Woodcock Wed, 26 Jan 2000 + +abcde 1.0.1 + +* The "s/ever/ Three Days/" Release +* Now properly handles double-quotes in Artist and Album data + (thanks to Clint Adams), closes: #54888 + + -- Robert Woodcock Thu, 13 Jan 2000 + +abcde 1.0 + +* The "But a 1.0 is Forever" Release +* Backed out cddb-tool quoting change, closes: #54005 +* Now strips carriage returns from CDDB data, closes: #53815 +* Added ID3COMMENT config option + + -- Robert Woodcock Mon, 10 Jan 2000 + +abcde 0.8.9 + +* The "Get it Before the World Implodes" Release +* Added -D (debugging option, outputs debugging information to stderr). + Very useful for submitting bug reports, hint hint hint :) + Just do 'abcde -D 2>logfile' and include logfile in your bug report. +* Now uses id3's new -T option to embed track numbers in ID3 tags. +* Fixed cddb-tool output for FreeDB submissions, closes: #51986. + Thanks to Clint Adams for spotting the problem +* New -v switch for Various Artist CD's (thanks to Magenta Hari Nezumi) + closes: #43581 +* Fixed minor cddb-tool manpage buglet +* Fixed cddb-tool output for shell quoting, thanks to Philipp Meier. + closes: #52469 + + -- Robert Woodcock Fri, 31 Dec 1999 + +abcde 0.8.8 + +* Added gogo explainations to manpages and example config file +* Added code by Stuart Ballard to intelligently use + relative paths for playlist files +* Added PLAYLISTDATAPREFIX config option for those who wish to prefix their + playlist data with things like URL's +* Fixed bug added in 0.8 where the multiple inexact match choice selection + would be hidden to the user (cddb-tool wasn't sending all user output to + stderr as it should). + + -- Robert Woodcock Sun, 28 Nov 1999 + +abcde 0.8.7 + +* Removed parallelization of silent encoder processes + + -- Robert Woodcock Tue, 16 Nov 1999 + +abcde 0.8.6 + +* Removed bashisms (again :) + + -- Robert Woodcock Sun, 14 Nov 1999 + +abcde 0.8.5 + +* Fixed some output issues regarding background encoding that cropped up in + 0.8.3 + + -- Robert Woodcock Sun, 7 Nov 1999 + +abcde 0.8.4 + +* New name. A Better CD Encoder. cdgrab was already taken - the original + cdgrab name belongs to a CDDA reading program for DOS dating back to + 1993. It's still in use and active development, so I'm changing the + name of cdgrab instead. See this URL for a description of the original + cdgrab: http://www.scn.rain.com/pub/cdrom/cdgrab.txt + + Your old /etc/cdgrab.conf and/or ~/.cdgrab.conf can simply be + renamed to /etc/abcde.conf and ~/.abcde.conf. + + The program name is now 'abcde'. + + -- Robert Woodcock Tue, 2 Nov 1999 + +cdgrab 0.8.3 + +* cdgrab 0.7 through 0.8.2 would leave around cdgrab.xxxxxx + tempfiles with -j. Fixed that. +* Fixed quoting issues regarding spaces in output files + + -- Robert Woodcock Thu, 28 Oct 1999 + +cdgrab 0.8.2 + +* Supports the 'gogo' mp3 encoder +* cddb-tool escapes double quotes when sourcing its temp files +* Added cddb-tool manpage + + -- Robert Woodcock Sun, 10 Oct 1999 + +cdgrab 0.8.1 + +* Cleared up some bashisms from the patches merged in 0.8 + + -- Robert Woodcock Sun, 19 Sep 1999 + +cdgrab 0.8 + +* Fixed a bug where if multiple tracks (but not the entire CD) was + specificed explicitly, cdgrab would loop forever after the first track +* Now uses Debian's sensible-editor wrapper if available +* Merged in patches from Nathaniel J Smith that puts cddb lookup + functionality in a separate script, cddb-tool +* Adds WAVOUTPUTDIR environment variable for those running out of space in + OUTPUTDIR. + + -- Robert Woodcock Thu, 26 Aug 1999 + +cdgrab 0.7.7 + +* Yet another quick fix to finish what 0.7.6 started - cdgrab should now + handle multiple inexact matches as well. (Thanks again to Robert Macaulay) + + -- Robert Woodcock Thu, 12 Aug 1999 + +cdgrab 0.7.6 + +* Another quick bugfix release - hopefully this will handle inexact matches + properly now. (Thank you Robert Macaulay :) + + -- Robert Woodcock Mon, 9 Aug 1999 + +cdgrab 0.7.5 + +* Quick bugfix release - with any luck I can start on 0.8 soon :) +* **** YOU WILL NEED TO EDIT CDGRAB.CONF **** if you use lame as + /usr/bin/lamer. The default program name is now 'lame' as of lame v3.0. + If you don't want to touch your lame installation, put the following in + your cdgrab.conf: "LAME=lamer" +* Omits -w from cdparanoia commands +* Depends on cdparanoia-bin or cdparanoia now - this accomodates the recent + cdparanoia package namechange. +* Fixed a stealth-whitespace typo at line 495. Thanks go to Gregory T. + Norris for tracking this down. + + -- Robert Woodcock Tue, 13 Jul 1999 + +cdgrab 0.7.4 + +* Now only uses the first match from a CDDB datafile for the track + information, this works around a cddb glitch some of you may have + hit last month +* Default config file now gets version number from program. +* added 'debug' option to CDROMREADERSYNTAX to get cdparanoia to only rip + the first 5 seconds of a track. This is very useful to those debugging + cdgrab, makes things go much faster. This will also prevent me releasing + another 0.7.2 :) +* Now puts options last on the encoder command line if you are using + bladeenc or l3enc, this should allow the proper use of these encoders + with additional commandline options (thanks to Justin Hugh Daly for + pointing this out) +* m3u PLAYLIST SUPPORT! Check out the new -p and -P options! + + -- Robert Woodcock Mon, 7 Jun 1999 + +cdgrab 0.7.3 + +* Fixes wget calling method +* -l/LOWDISK documented +* Fixes the lowdisk #2 option so it exits cleanly +* Lets you enter track info for CDs without CDDB matches now + + -- Robert Woodcock Sun, 23 May 1999 + +cdgrab 0.7.2 + +* Woops, left some debugging code in 0.7.1 - if you have truckloads of 80kb + mp3's, try this :) + + -- Robert Woodcock Sun, 16 May 1999 + +cdgrab 0.7.1 + +* LOWDISK/-l option added for those who don't have the disk space to run a + parallelized session. +* MAXPROCS added to config file +* CDDB handling revisited - cdgrab should now properly handle CD's with + multiple or inexact CDDB entries. + + -- Robert Woodcock Fri, 14 May 1999 + +cdgrab 0.7 + +* Parallelizes ripping and encoding - this may take substantially more disk + space temporarily (up to 500MB or so depending on how fast your CPU is + compared to your cdrom drive) but cdgrab will be done with your CD + much more quickly. +* Allows for SMP optimizations (multiple encoders running at once) with the + new -j option +* Output fix for TOC printing +* cd-discid split off into it's own package + + -- Robert Woodcock Fri, 7 May 1999 + +cdgrab 0.6.2 + +* Fixes encoder and cdrom reader option-passing bug + + -- Robert Woodcock Sun, 4 Apr 1999 + +cdgrab 0.6.1 + +* Adds the -H option (don't create .inf files) when calling cdda2wav +* Removed a bashism from the usage function + + -- Robert Woodcock Mon, 29 Mar 1999 + +cdgrab 0.6 + +* Tacks a .wav extension to the wave data temporary file to make bladeenc + happy. +* Munges /'s to _'s now instead of eating them +* Adds command-line option configuration options for backend programs +* Properly zero-pads the TRACKNUM variable + + -- Robert Woodcock Sun, 28 Mar 1999 + +cdgrab 0.5 + +* Added support for inexact or multiple CDDB matches +* Properly bombs out if CDDB can't come up with a match + (without CDDB, you might as well use cdparanoia -B) + + -- Robert Woodcock Thu, 18 Mar 1999 + +cdgrab 0.4 + +* Added ALBUMFILE, fixed manpage reference to it +* Deletes editor backups from 'cdgrab -e' automagically + (I wish mutt did this :) +* Bombs out if there's no CD in the drive +* Bombs out if any necessary external programs don't exist +* Encourages people to use brackets for OUTPUTFORMAT variables to + handle formats like Artist/TrackName_Number.mp3 + + -- Robert Woodcock Tue, 16 Mar 1999 + +cdgrab 0.3 + +* Fixed one thinko in user preferences loading and another in the tagger +* New option syntax - if you used to specify a cdrom device through the + command line, use 'cdgrab -d device' now to get the same result. +* Allows you to edit CDDB response data before using it (-e) +* Added support for getting a user-specified selection of tracks +* Added support for user-specified output file formats + + -- Robert Woodcock Wed, 10 Mar 1999 + +cdgrab 0.2 + +* Initial release + + -- Robert Woodcock Sun, 21 Feb 1999 + diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..070cc8b --- /dev/null +++ b/debian/changelog @@ -0,0 +1,850 @@ +abcde (2.1.20-1) unstable; urgency=low + + * + + -- Jesus Climent Sun, 20 Jun 2004 11:54:18 +0000 + +abcde (2.1.19-1) unstable; urgency=low + + * Encoding the whole CD in one file is now possible. Use "-1" as a flag + (Closes: #126267). + + -- Jesus Climent Fri, 9 Apr 2004 17:04:58 +0000 + +abcde (2.1.18-1) unstable; urgency=low + + * Do not release in a hurry. The eject program is not needed if CDSPEEDVALUE + is not set and no EJECT action is performed (Closes: #242506) + + -- Jesus Climent Thu, 8 Apr 2004 05:18:49 +0000 + +abcde (2.1.17-2) unstable; urgency=low + + * HUH! the version number in the abcde executable was wrong. + + -- Jesus Climent Wed, 7 Apr 2004 21:01:50 +0000 + +abcde (2.1.17-1) unstable; urgency=low + + * Dud! Those missing quotes are going to kill me. Quotes restored and + (Closes: #242508). + + -- Jesus Climent Wed, 7 Apr 2004 06:30:31 +0000 + +abcde (2.1.16-1) unstable; urgency=low + + * New setting for the CD speed. Some drives have a higher failure ratio when + spinning at high speed. + * Added a pre-read function for preparations. Uses include closing the CD + tray (Closes: #137548). + * Added COMMENT part in OggFlac metadata. + * Documentation update: README, abcde.1 + * Do not tag GENRE and DATE in Ogg/Vorbis if CDDB does not provide them + (Closes: #235531). + * Solved bug with batch encoding, thanks to Travis McKay. + * When *DATAPREFIX was set, the playlist creation was made without newline. + * Added >&2 redirection to visualize the "Erase playlist" question + (Closes: #241221). + * Added the option "-m" to modify the resulting playlist, to contain CRLF at + the end of every line, letting some hardware players which insist with + DOS-style files to use them. Also, added DOSPLAYLIST as a config option. + * When using a selected, localy cached CDDB entry, we forgot to show the + selection when asking the user for editing the choice. Now we show it. + * Improved the logic in the order of events when using a local CDDB repo. + + -- Jesus Climent Tue, 6 Apr 2004 05:29:38 +0000 + +abcde (2.1.15-1) unstable; urgency=low + + * EDITOR is called now evaluating the variable, so it works with full path + and arguments. + * Patch for making md5sum a variable (since some systems use a different + name). + * Correction by "huf" . The test code in line 376 + needed some quotes. + * The PADDING code and some CDDB funcions were *really* messy. Now it looks + cleaner, works faster and some not needed network operations are no + longer performed when we are working with local CDDB repositories. + * Added "-V" for extra verbosity (on slow networks the user might be waiting + and wondering is somethins is happening). + * Solved a bug with the non-interactive code. + + -- Jesus Climent Mon, 16 Feb 2004 00:13:12 +0000 + +abcde (2.1.14-1) unstable; urgency=low + + * Missing quotes restored (Closes: #228648). + + -- Jesus Climent Tue, 20 Jan 2004 06:43:04 +0000 + +abcde (2.1.13-1) unstable; urgency=low + + * Solved the problem with re-runs of multiple choices not showing all the + choices (Closes: #228405) (this was a quick one) + * We now show the selected CDDB entry on a second run, instead of all of + them (not that one should stop abcde, but just in case). This way + consecutive interrupted runs obtain the same results. + + -- Jesus Climent Sun, 18 Jan 2004 22:42:15 +0000 + +abcde (2.1.12-1) unstable; urgency=low + + * Check if normalizer is found in the PATH (Closes: #228014) + * Added (commented) bits to check if the CD being processed is the CD on the + tray, so that if differs we do not eject it. + * Store locally the CDDB information, under $HOME/.cddb since it is being + used by Grip (at least). PATH is user defined (Closes: #88048) + * If you are using cdda2wav and SCSI drives, you can set CDROMID for the + SCSI drive, since it differs from the cd-discid CDROM parameter + (Closes: #121987). + * MacOSX keeps on failing because the OS mounts the CD before we finish + ripping it... or something else. Please, test test test the code, and + report your findings. Pretty please. I have not been able to make it work + with the reports I have received. + + -- Jesus Climent Fri, 16 Jan 2004 12:06:07 +0000 + +abcde (2.1.11-1) unstable; urgency=low + + * Urgent fixes for the FreeBSD and MacOSX bits. When using cdda2wav, the + CDROM variable must be modified depending on the device interface. By now + we will not try to be very smart. + * Added a test for HTTPGETOPTS since it cannot be empty for the default + HTTPGET options. + * Quick release to fix a problem with the CDROM detection code. + (Closes: #226647) + * Cleaned a bashism. Thanks to Klaus Ethgen (Closes: #226782). + * Rewrote some parts of the cdda2wav code. Since I do not have a machine + where cdda2wav works, I cannot test the code. The modifications have been + done following user reports. If you use cdda2wav and abcde does not work + for you, please, contact me and we will try to sort things out. Thanks. + + -- Jesus Climent Thu, 8 Jan 2004 21:36:23 +0000 + +abcde (2.1.10-1) unstable; urgency=low + + * INLINETAG and STARTTRACKNUMBER flags added. + * CDROM checking is now done with a bit more wiselly (Closes: #219768) + * HTTPGET is only requested is "cddb" action is performed. + * Workout the possibility of cdparanoia erasing our wav files + (Closes: #172694) + * The default answer for editing CDDB data is now "y" if the disk is + unknown. If not, the default is "n". Requested by Ricky Buchanan. + * Now we do not erase silently any previous $PLAYLISTFILE left behind by a + previous CD ripping (Closes: #220753) + * Write info file with cdda2wav (Closes: #187702). + I do not use cdda2wav myself (me is cd-paranoid) so if anyone using + cdda2wav has a problem with this, please, report. + * CDROM comes in 1,0,0 kind of format for cdda2wav ripper. Corrected with a + quick patch. Kudos go to Mikhail Manuilov for + noticing. + * Merged bits to make abcde work under MacOSX. Thanks to Evan Jones. + * Merged bits to avoid FreeDB people anger and to cut down the "abcde." part + of the discid. Now you can set the "-C" command with the directory name. + Kudos go to Bart Samwel. + * Added some info bits to the config file about normalize, requested by + Ricky Buchanan. + * Added some testing for the wav file before normalizing, to check that the + file is actually there. + + -- Jesus Climent Mon, 5 Jan 2004 14:43:59 +0000 + +abcde (2.1.9-1) unstable; urgency=low + + * The "First snow in Finland" release. + * One head was missing a "-n". N-less heads should be cut already. + * Not use relative links when PLAYLISTDATAPREFIX is set (Closes: #165368) + * Stupid use of $OUTPUTTYPE in flac tagging (Closes: #218625) + * Small typo in KEEPWAVS check (Closes: #216551) + * "Dirty" hack provided by Ben Finney to get rid of the tags in Ogg/Speex + encoding, when the user does not specify it as an action (lol! someone is + using Ogg/Speex :) (Closes: #219070) + * metaflac path was hardcoded. Now it must be in the path. + * TAGGER, VORBISCOMMENT and METAFLAC information tools are now dependent upon + "tag" action. There is no need to have them if we are not going to + comment. + * A bunch of small fixes, all along. + + -- Jesus Climent Wed, 5 Nov 2003 15:29:13 +0000 + +abcde (2.1.8-3) unstable; urgency=low + + * Small typo corrected (Closes: #217149) + + -- Jesus Climent Thu, 23 Oct 2003 09:49:01 +0000 + +abcde (2.1.8-2) unstable; urgency=low + + * KEEPWAVS now sets the "clean" action to "no", so the wavs are kept. + (Closes: #216551) + + -- Jesus Climent Sun, 19 Oct 2003 16:25:53 +0000 + +abcde (2.1.8-1) unstable; urgency=low + + * Quick release fixing a couple of bugs introduced by the padding patch + (Closes: #215962) + + -- Jesus Climent Thu, 16 Oct 2003 17:08:12 +0000 + +abcde (2.1.7-2) unstable; urgency=low + + * Control: Build-Depends-Indep: moved to Build-Depends:, as per + http://www.debian.org/doc/debian-policy/ch-relationships.html#s-sourcebinarydeps + (Closes: #214200) + + -- Jesus Climent Tue, 14 Oct 2003 12:21:13 +0000 + +abcde (2.1.7-1) unstable; urgency=low + + * The "Engineer" release. Yeah! I graduated! + * Patch applied to solve the track submission interface issues. Kudos to + Marc HE Brockschmidt, again (Closes: #126289) + * Small bug related with DISTMP3NICE solved. Kudos to Wilbert Alberts. + (Closes: #213756) + * Padding now creates the list with padded numbers. Test patch. This should + solve the problem with delayed tagging a single file. + + -- Jesus Climent Mon, 13 Oct 2003 20:32:16 +0000 + +abcde (2.1.6-1) unstable; urgency=low + + * Removed a nasty bug where even if the encode failed, the track was marked + as successfully encoded (Closes: #208391) + * Various Artists has now its own PLAYLIST format (Closes: #137432) + * metaflac path corrected (Closes: #206110) + * Hopefully this version repairs the comment part for Ogg/Vorbis files. + * If nothing breaks, 2.2 will be released as soon as the KNOWNBUG is solved. + * Removed all the inline tagging since it breaks the action chain, except + in Ogg/Speex. Need to check if "vorbiscomment" can be used for it. + (Closes: #206311) + * Added DISTMP3NICE variable, to nice the distmp3 program (Closes: #208398) + + -- Jesus Climent Thu, 4 Sep 2003 10:53:09 +0000 + +abcde (2.1.5-1) unstable; urgency=low + + * Small fixes and patches. + + GENRE can be used for OUTPUTFORMAT and PLAYLISTFORMAT + + id3v2 should work now with -c for comments (Closes: #199949) + + small bug with batch encoding + + Variables are exported before the CDDB functions are called, so they + should use the right variables for the HTTPGET command. + + Tagging also use TRACKS and CDGENRE for MP3 files (kudos to Dirk + Ruediger) + + FLAC encoding now uses dismp3 to encode remotelly (kudos to Taylor and + Kevin Cramer). HANDLE WITH CARE ;) + Also FLAC now uses CDGENRE and CDYEAR for tagging. + * Debian specific: + + Standards to 3.6.0. No changes needed. + + Changed Build-Depends to -Indep, since this is a POSIX shell script. + * tail/head change: -1 has been deprecated. Noted by Stephan Kulow. + * Ogg/Speex support added, for speech encoding (Closes #204635) + * Documentation update (Closes: #198825) + * Patch for "=" in the name applied (Closes: #197199) + + -- Jesus Climent Thu, 14 Aug 2003 16:45:29 +0000 + +abcde (2.1.4-1) unstable; urgency=low + + * Small bug fixes: + + COMMENT should work now. + + Aesthetic padding on the total amount of tracks. + + CDROM typo + + CDROM is now checked after reading the user defined entries. + * Remove trailing args from $EDITOR when checking -x: Closes #179222. + + -- Jesus Climent Sun, 18 May 2003 18:47:36 +0000 + +abcde (2.1.3-1) unstable; urgency=low + + * Makefile was missing cddb-tool.1. + * Introduced dagrab as CD ripping utility. + * cddb-tool seq calls converted to functions. No more distro dependencies. + * WGET* variables converted to HTTPGET* variables. FreeBSD can safelly use + fetch. + * More FreeBSD specific bits: CDROM and EJECT changes. + * Typo in abcde.conf + * Added CDDBPROTO for specifying the protocol level of the cddb query. + * CDDB protocol upgraded to 5. CDYEAR and CDGENRE are now used for CD + tagging. Patches from FreeBSD guys. + * COMMENT is now used for inline tagging with oggenc (my mistake it was + missing): Closes: #191475. + + -- Jesus Climent Sat, 10 May 2003 07:49:22 +0000 + +abcde (2.1.2-1) unstable; urgency=low + + * Documentation updates: Closes: #186230. + * Usual set of bug fixes and corrections. + * Default behaviour of VAOUTPUTFORMAT output changed to avoid multiple + directories for a same album. I think the format is more logical, and you + can always split the files once they are created. + * Padding track wavs with 0 so if you want to burn those wavs just cdrecord + *.wav will do it. Use "-p" to force it when encoding a small (<9) number + of files (Closes: #111627). + * Added "KEEPWAVS" as a variable to keep those wavs. Default is "no". Can + use also "-k" in the command line. (Closes: #160372). + This probably should be changed with an option to move the wav files to + another directory instead of just keep de abcde. directory. + * Added documentation comments about OUTPUTTYPE (Closes: #184963). + * abcde.conf cleanup: (Closes: #186230, #187400). + + -- Jesus Climent Tue, 25 Mar 2003 16:39:25 +0200 + +abcde (2.1.1-1) unstable; urgency=low + + * New upstream release. + + -- Jesus Climent Mon, 17 Mar 2003 08:52:01 +0200 + +abcde (2.1.0-3) unstable; urgency=low + + * Since abcde does not depend on eject, an execution test ([-x]) was added, + but that means abcde needs a test for eject in the patch if -x is passed: + Closes: #184151. + * Merged some more bits from Marc 'HE' Brockschmidt: Closes: #126289. + * A bit of more info in abcde.conf: Closes: #184963. + * cddb-tool version updated to 0.4.2 + + -- Jesus Climent Fri, 14 Mar 2003 18:00:03 +0000 + +abcde (2.1.0-2) unstable; urgency=low + + * Old version string left behind. Updated. + * Few more doc update bits. + * Patches from Marc 'HE' Brockschmidt: Closes: #149499. + * Small patch from Norbert Preining to support multiple output in the output + directory. + * cddb-tool parses CDYEAR with the help of awk: Closes: #114848. + * cddb-tool does not globe "*" characters anymore: Closes: #157448. + + -- Jesus Climent Fri, 7 Mar 2003 06:41:32 +0000 + +abcde (2.1.0-1) unstable; urgency=low + + * The "Time To Release" version. + * We close: + + We preppend track number now: Closes: #128966. + + Itegrate flac: Closes: #126311. + + Multi-format encode: Closes: #148934. + + Gapless lame encoding: Closes: #172696. + + CDROM documented: Closes: #182403. + + -- Jesus Climent Thu, 6 Mar 2003 14:45:51 +0000 + +abcde (2.0.4-0.3) unstable; urgency=low + + * Applied OpenBSD patches to make the script more portable. Thanks to Han + Boetes. + + -- Jesus Climent Fri, 28 Feb 2003 11:27:15 +0200 + +abcde (2.0.4-0.2) unstable; urgency=low + + * There was a "echo" line producing a strange output on the cd_read + procedure. + + -- Jesus Climent Fri, 28 Feb 2003 00:41:33 +0100 + +abcde (2.0.4-0.1) unstable; urgency=low + + * abcde takeover. + * The infamous "Works for me(TM)" release. + * Documentation fixes: closes: #100844, #136741. + * NetBSD patches applied: + - EXPERIMENTAL Normalize and Batch support. + - EXPERIMENTAL FLAC support. + * EXPERIMENTAL multiple output support: + + multiple output and error checking + + multiple lists support + * Default output file changed to have the $track_number in the begining. + + -- Jesus Climent Thu, 27 Feb 2003 19:19:18 +0200 + +abcde (2.0.3-1) unstable; urgency=low + + * The Fixed-Yet?-How-About-Now?-What-About-Now?-Now? Release + * SMP fixed, mad props to Steve Madsen, closes: #69828, #111806 + * Minor code cleanups thanks to Adam Heath + * Multiple inexact match results are generated in a safe manner + thanks to Nick Martin, closes: #126025 + * Removed cddb-tool template generation bashism, thanks to Greg + Norris, closes: #126327 + * Windows can't handle double quotes in filenames either. + The default mungefilename now removes them, closes: #127643 + * Using -C with WAVOUTPUTDIR fixed, closes: #127728 + * Resuming various artists discs fixed, closes: #127731 + + -- Robert Woodcock Sun, 27 Jan 2002 21:36:48 -0800 + +abcde (2.0.2-1) unstable; urgency=low + + * The One-More-Time-With-Feeling Release + * Bladeenc really works this time. Honest. closes: #121988 + + -- Robert Woodcock Mon, 3 Dec 2001 19:32:12 -0800 + +abcde (2.0.1-1) unstable; urgency=low + + * The I-Don't-Listen-To-Sssca Release + * Example abcde.conf fixes, closes: #111580 + * So much for bladeenc's l3enc compatibility, closes: #110863 + * CDDB submit fixes (to enable CDDB submitting, put + UNINTENTIONALLY_ANGER_THE_FREEDB_PEOPLE=y in your abcde.conf), + closes: #111478, #111500 + * Minor mungefilename() cleanup + * Small manpage fix + * Works with oggenc when POSIXLY_CORRECT is defined, thanks to Juhapekka + Tolvanen + * Quote remote locations when calling distmp3 + * Allow remote encoding of oggs + * Only remove wav files if the encoding succeeded + * No-local-encoding via -j 0 fixed, thanks to Hans-Joachim Baader + * CD read errors are trapped/resumed cleanly now thanks to Pete, + closes: #111618 + * devfs device check fix, thanks to Clint Adams + * Check for seq command - some BSD's have jot instead and abcde can't + use that yet + * Various Artists playlist generation fixed, thanks to William Lash + + -- Robert Woodcock Tue, 6 Nov 2001 18:34:25 -0800 + +abcde (2.0-1) unstable; urgency=low + + * The Psychiatrist-Says-I'm-Stable-Again Release + * Renamed to 2.0 + * Minor documentation updates + + -- Robert Woodcock Wed, 15 Aug 2001 15:26:54 -0700 + +abcde (1.9.10-1) unstable; urgency=low + + * The Waiter-There's-A-Proof-In-My-Pudding Release + * Fixed some quoting issues preventing abcde from using a temp directory + containing spaces, closes: #89682 + * Now purges encodetracklocation notes from the status file when resuming. + * -a playlist now implies -a cddb + * Manpage and default config file updates, closes: #78726, #100841, #100845 + * Applied checkstatus patch by Itai Zukerman, fixes certain track number + status checking situations, closes: #93395 + * Check to see if things run through run_command return a nonzero error + code and present the command and error code to the user later, + closes: #93485 + * Devfs fixup - If /dev/cdrom doesn't exist, try /dev/cdroms/cdrom0, + closes: #101933 + * If a background process returned an error, log it. If it was an encode + process, abandon that encode location and don't wait for the encode + process to finish. Display the commandlines that resulted in error exits + with their exit codes before aborting. + * do_tag handles vorbis commenting failures idempotently + * -n works again + * Resumes encoding if all files have ripped, closes: #101843 + * do_cddbedit code checks to see if it's already been run + + -- Robert Woodcock Wed, 1 Aug 2001 20:20:41 -0700 + +abcde (1.9.9-1) unstable; urgency=low + + * The Not-Quite-Last-In-The-Development-Series Release + * I broke ID3v1 comments in 1.9.8, it's fixed now, thanks to Christian + Beyerlein for noticing this, closes: #89519 + + -- Robert Woodcock Tue, 13 Mar 2001 07:53:10 -0800 + +abcde (1.9.8-1) unstable; urgency=low + + * The Groundshaking Release + * Now defaults to using FreeDB instead of Gracenote. Pricks. + * New VAOUTPUTFORMAT variable for those who like their various artists + discs named in a different format + * Accomodates the fact that OpenBSD xargs does not eat whitespace, thanks + to Marcus Daniel for discovering this + * New scheduler for distmp3, thanks to David Bergeron + * xingmp3enc support, thanks to Brian Gannon + * Stripped down cddb-tool a little bit so that abcde no longer requires + mktemp + * New -C option to let people continue where they left off if they no + longer have the CD handy + * ID3COMMENT is now COMMENT + * Ogg commenting is now done separately so resuming doesn't break it + * More documentation updates + + -- Robert Woodcock Sat, 10 Mar 2001 22:51:39 -0800 + +abcde (1.9.7-1) unstable; urgency=low + + * The Overcast Partial Eclipse Release + * Supports ID3v2 + * Various Artists heuristics patch by Kevin Everets + * New -c option to specify an extra configuration file, closes: #76252 + * Does not try to check if a tagger exists unless OUTPUTTYPE=mp3, + closes: #78540 + * cddb-tool template output fixes + * Yet more documentation updates, closes #78632, #78726 + * Avoids id3v2's -c option for now + * Adds support for another Various Artists format, "Artist: Title", thanks + to Wolfgang Borgert, closes: #78292 + * Fixed typo that was breaking remote encoding support, closes: #81183 + * Hitting control-c while there's nothing in the foreground no longer + causes abcde to delete all its work upon exit + + -- Robert Woodcock Sun, 7 Jan 2001 21:17:32 -0800 + +abcde (1.9.6-1) unstable; urgency=low + + * The Squishy Release + * Updated getopts call to remove obsoleted options + * More documentation fixes, closes: #77957 + * Single inexact match spurious question fix + * Fixed encoder trigger timing when using -l, closes: #77854 + + -- Robert Woodcock Sun, 26 Nov 2000 18:37:18 -0800 + +abcde (1.9.5-1) unstable; urgency=low + + * The "Run Towards Trick Or Treaters With Scissors" Release + * Some documentation updates, closes: #75707, #75927 + * mungefilename quoting fix, closes: #75556 + * Implemented -a, which replaces -p, -P, and a number of other things, + closes: #75507 + + -- Robert Woodcock Wed, 25 Oct 2000 21:16:38 -0700 + +abcde (1.9.4-1) unstable; urgency=low + + * The "Run With Scissors" Release + * Various Artists support by Kevin Everets + * Specifying track numbers on the command line should work again, bash was + getting a wee bit confuzzled with the way I had things before. + * A couple more error output changes and miscellaneous fixes + * OUTPUTDIR works again + + -- Robert Woodcock Thu, 28 Sep 2000 23:11:35 -0700 + +abcde (1.9.3-1) unstable; urgency=low + + * The ugh Release + * Brown Paper Bag fix for mp3enc users + * Recreated the rest of the variable environment in do_playlist, fixes + TRACKNUM availability for real this time, closes: #72535 + + -- Robert Woodcock Tue, 26 Sep 2000 22:08:27 -0700 + +abcde (1.9.2-1) unstable; urgency=low + + * The "Very Long Changelog Entries Can Become Addicting" Release. + * Switched default output type to ogg, default encoder to oggenc + * Since 1.9.x prompts for CDDB edits by default there is now a -N switch + for non-interactivity. + * Handles cddb entries with random sprinklings of CR's and LF's + * You can now specify niceness for the reader and encoders, thanks to + Kevin Everets + * -j 0 will now disable local encoding, thanks to Antonio Fiol + + * Vorbize should actually work now, thanks to Kevin Everets and James + LewisMoss + * Oggenc/Vorbize commenting support + * Made TRACKNUM available for playlist generation + * Fleshed out the TODO list a bit more + * mungefilename() now translates ':' to ' -' by default. Rationale: You + can't put ':' on a FAT filesystem. It also wreaks havoc with Samba. + + -- Robert Woodcock Mon, 25 Sep 2000 19:31:35 -0700 + +abcde (1.9.1-1) unstable; urgency=low + + * The "Don't Fraun" Release. + * Fixed a half-dozen minor buglets + * A little less debug output, a lot more normal output + * Resuming operation works better now + * Patched up offline usage again + * Broke OUTPUTFORMAT - if you plan on ever using Ogg support, and you've + overridden the OUTPUTFORMAT default, change the ".mp3" to + ".${OUTPUTTYPE}" + * Beginnings of Ogg Vorbis support (vorbize and oggenc) - warning: + completely untested + + -- Robert Woodcock Thu, 17 Aug 2000 21:03:00 -0700 + +abcde (1.9-1) unstable; urgency=low + + * The "" Release. + * Completely redone tmpfile handling, abcde can now continue where you left + off. closes: #42970, #50883, #66668 + * Restructured program execution scheduling around central status file + * Moved cddb-tool interactivity to abcde, 'cddb-tool get' no longer exists, + it is now 'cddb-tool query' and 'cddb-tool read'. + * Removed -e, -v, and -V, since abcde will now prompt you if you want to + edit or otherwise muck with the data after you have a chance to see it. + + -- Robert Woodcock Thu, 22 Jun 2000 18:13:01 -0700 + +abcde (1.1.1-1) unstable; urgency=low + + * The "That wasn't chicken" Release. + * Remote distributed encoding had a bad bug in 1.1 - work to be done + remotely was duplicated locally (everything still turned out ok - + there was just no speedup). Fixed that. + * Restructured encode_and_tag function. + + -- Robert Woodcock Sun, 7 May 2000 20:10:10 -0700 + +abcde (1.1-1) unstable; urgency=low + + * The "We heard Mr. Garrison say them a couple of times" Release. + * New -r and REMOTEHOSTS option to use distmp3 to encode to multiple + hosts at once. + * Command-line track range specification (f.e. "abcde 1-12" + (Thanks: Vincent Ho) + * Now displays minutes/seconds for each track while displaying track titles + at the start + + -- Robert Woodcock Tue, 18 Apr 2000 23:59:09 -0700 + +abcde (1.0.6-1) unstable; urgency=low + + * The "Inspected by #17" Release. + * New EJECTCD option to eject the CD after all tracks are read (thanks: + Hrafnkell F Hlodversson) + + -- Robert Woodcock Sun, 2 Apr 2000 23:23:44 -0700 + +abcde (1.0.5-1) unstable; urgency=low + + * The "...So we can both watch X-Files..." Release. + * Quoting fix for setups without space->underscore filename munging + * README file URL fixes/updates + + -- Robert Woodcock Thu, 16 Mar 2000 18:34:38 -0800 + +abcde (1.0.4-1) unstable; urgency=low + + * The "Plop, Plop, Fizz Fizz" Release + * CDPARANOIAOPTS and CDDA2WAVOPTS should work now. + + -- Robert Woodcock Sun, 20 Feb 2000 18:44:08 -0800 + +abcde (1.0.3-1) unstable; urgency=low + + * The "This Space Intentionally Left Blank" Release + * Support for reverse and dashed Various Artists discs + * More elegant way of passing backtick data + * Replaced all `foo` commands with $(foo) + * Custom filename munging, closes: #38448 + + -- Robert Woodcock Wed, 9 Feb 2000 20:26:22 -0800 + +abcde (1.0.2-1) unstable; urgency=low + + * Now eats backticks in CDDB input (thanks to Steve Beattie) + * mp3enc support (thanks to Richard Jelinek and Chris Ruvolo), + closes: #56189 + * cddb-tool more gracefully handles no net connection for those with + local caching name servers + * Fixed HELLOINFO documentation bug, closes: #56268 + + -- Robert Woodcock Wed, 26 Jan 2000 19:45:06 -0800 + +abcde (1.0.1-1) unstable; urgency=low + + * The "s/ever/ Three Days/" Release + * Now properly handles double-quotes in Artist and Album data + (thanks to Clint Adams), closes: #54888 + + -- Robert Woodcock Thu, 13 Jan 2000 23:34:24 -0800 + +abcde (1.0-1) unstable; urgency=low + + * The "But a 1.0 is Forever" Release + * Backed out cddb-tool quoting change, closes: #54005 + * Now strips carriage returns from CDDB data, closes: #53815 + * Added ID3COMMENT config option + + -- Robert Woodcock Mon, 10 Jan 2000 20:48:24 -0800 + +abcde (0.8.9-1) unstable; urgency=low + + * The "Get it Before the World Implodes" Release + * Added -D (debugging option, outputs debugging information to stderr). + Very useful for submitting bug reports, hint hint hint :) + Just do 'abcde -D 2>logfile' and include logfile in your bug report. + * Now uses id3's new -T option to embed track numbers in ID3 tags. + * Fixed cddb-tool output for FreeDB submissions, closes: #51986. + Thanks to Clint Adams for spotting the problem + * New -v switch for Various Artist CD's (thanks to Magenta Hari Nezumi) + closes: #43581 + * Fixed minor cddb-tool manpage buglet + * Fixed cddb-tool output for shell quoting, thanks to Philipp Meier. + closes: #52469 + + -- Robert Woodcock Fri, 31 Dec 1999 14:12:35 -0800 + +abcde (0.8.8-1) unstable; urgency=low + + * Added gogo explainations to manpages and example config file + * Added code by Stuart Ballard to intelligently + use relative paths for playlist files, closes #51351 + * Added PLAYLISTDATAPREFIX config option for those who wish to prefix + their playlist data with things like URL's + * Fixed bug added in 0.8 where the multiple inexact match choice + selection would be hidden to the user (cddb-tool wasn't sending all + user output to stderr as it should), closes #51434, #50786 + + -- Robert Woodcock Sun, 28 Nov 1999 16:02:24 -0800 + +abcde (0.8.7-1) unstable; urgency=low + + * Removed some parallelization from encode_and_tag, closes: #50246 + + -- Robert Woodcock Tue, 16 Nov 1999 18:49:29 -0800 + +abcde (0.8.6-1) unstable; urgency=low + + * Removed remaining bashisms + + -- Robert Woodcock Sun, 14 Nov 1999 08:46:14 -0800 + +abcde (0.8.5-1) unstable; urgency=low + + * Fixed some background encoding issues that cropped up in 0.8.3. + + -- Robert Woodcock Sun, 7 Nov 1999 01:08:27 -0800 + +abcde (0.8.4-1) unstable; urgency=low + + * New name. cdgrab was already taken - the original cdgrab name + belongs to a CDDA reading program for DOS dating back to 1993. + It's still in use and active development, so I'm changing the + name of cdgrab instead. See this URL for a description of the + original cdgrab: http://www.scn.rain.com/pub/cdrom/cdgrab.txt + + Your old /etc/cdgrab.conf and/or ~/.cdgrab.conf can simply be + renamed to /etc/abcde.conf and ~/.abcde.conf. + + The program name is now 'abcde'. + + -- Robert Woodcock Tue, 2 Nov 1999 22:28:19 -0800 + +cdgrab (0.8.3-1) unstable; urgency=low + + * 0.8.2 would leave around cdgrab.xxxxxx tempfiles with -j. + Fixed that. + * Fixed quoting issues regarding spaces in output files + closes: #38449 + + -- Robert Woodcock Thu, 28 Oct 1999 20:08:22 -0700 + +cdgrab (0.8.2-1) unstable; urgency=low + + * Fixes a cddb-tool quoting issue - closes: #46979 + * Adds support for gogo + + -- Robert Woodcock Sun, 10 Oct 1999 11:24:50 -0700 + +cdgrab (0.8.1-1) unstable; urgency=low + + * Clears up a few bashisms from the merged-in cddb-tool patches + closes: #45512, #45514 + * FHS compliance + + -- Robert Woodcock Sun, 19 Sep 1999 12:21:40 -0700 + +cdgrab (0.8-1) unstable; urgency=low + + * New Release - closes: #43579, #42997, #38325, #42971 + * Removes dependancy for now non-existant cdparanoia-bin package + + -- Robert Woodcock Thu, 26 Aug 1999 22:34:29 -0700 + +cdgrab (0.7.7-1) unstable; urgency=low + + * one-liner patch re-release :) + + -- Robert Woodcock Thu, 12 Aug 1999 07:29:50 -0700 + +cdgrab (0.7.6-1) unstable; urgency=low + + * New Release - closes: #42734 + + -- Robert Woodcock Mon, 9 Aug 1999 21:11:30 -0700 + +cdgrab (0.7.5-1) unstable; urgency=low + + * New Release - closes: #40179, #41086 + + -- Robert Woodcock Tue, 13 Jul 1999 19:20:53 -0700 + +cdgrab (0.7.4-1) unstable; urgency=low + + * New Release + + -- Robert Woodcock Mon, 7 Jun 1999 22:12:20 -0700 + +cdgrab (0.7.3-1) unstable; urgency=low + + * New Release + + -- Robert Woodcock Sun, 23 May 1999 22:24:43 -0700 + +cdgrab (0.7.2-1) unstable; urgency=low + + * New Release + + -- Robert Woodcock Sun, 16 May 1999 17:41:55 -0700 + +cdgrab (0.7.1-1) unstable; urgency=low + + * New release + + -- Robert Woodcock Fri, 14 May 1999 23:37:00 -0700 + +cdgrab (0.7-1) unstable; urgency=low + + * New release + * cd-discid spun off into its own package, cdgrab is now + Architecture: all + + -- Robert Woodcock Fri, 7 May 1999 20:44:06 -0700 + +cdgrab (0.6.2-1) unstable; urgency=low + + * New release, closes: bug #35379, bug #36272 + + -- Robert Woodcock Sun, 18 Apr 1999 15:09:43 -0700 + +cdgrab (0.6.1-1) unstable; urgency=low + + * New release, quick bashism bugfix - closes: bug #35245 + + -- Robert Woodcock Mon, 29 Mar 1999 19:19:04 -0800 + +cdgrab (0.6-1) unstable; urgency=low + + * New release - closes: bug #34454, #34736, #34823, #34824 + + -- Robert Woodcock Sun, 28 Mar 1999 18:26:54 -0800 + +cdgrab (0.5-1) unstable; urgency=low + + * New release + + -- Robert Woodcock Thu, 18 Mar 1999 23:39:02 -0800 + +cdgrab (0.4-1) unstable; urgency=low + + * New release - closes: bug #34566, #34577 + + -- Robert Woodcock Tue, 16 Mar 1999 00:10:20 -0800 + +cdgrab (0.3-1) unstable; urgency=low + + * New release - closes: bug #34101 + + -- Robert Woodcock Fri, 5 Mar 1999 18:13:30 -0800 + +cdgrab (0.2-1) unstable; urgency=low + + * Initial Release. + + -- Robert Woodcock Sun, 21 Feb 1999 18:50:34 -0800 diff --git a/debian/conffiles b/debian/conffiles new file mode 100644 index 0000000..498f5de --- /dev/null +++ b/debian/conffiles @@ -0,0 +1 @@ +/etc/abcde.conf diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..debbb87 --- /dev/null +++ b/debian/control @@ -0,0 +1,19 @@ +Source: abcde +Section: sound +Priority: optional +Maintainer: Jesus Climent +Standards-Version: 3.6.1 +Build-Depends: debhelper + +Package: abcde +Architecture: all +Depends: cd-discid, wget, cdparanoia | cdda2wav, vorbis-tools (>= 1.0beta4-1) | lame | flac | bladeenc | speex +Conflicts: cdgrab +Replaces: cdgrab +Provides: cdgrab +Suggests: eject, distmp3, id3 (>= 0.12), id3v2, normalize +Description: A Better CD Encoder + A frontend program to cdparanoia, wget, cd-discid, id3, and your favorite + Ogg/Vorbis, MP3, FLAC or Ogg/Speex encoder (defaults to oggenc). Grabs an + entire CD and converts each track to Ogg/Vorbis, MP3, FLAC or Ogg/Speex, + then comments or ID3-tags each file, with one command. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..73d465d --- /dev/null +++ b/debian/copyright @@ -0,0 +1,24 @@ +This package was debianized by Robert Woodcock on +Sun, 21 Feb 1999 18:50:34 -0800. + +It is available at: http://www.hispalinux.es/~data/abcde.php + +Upstream Authors: Robert Wookcock + Jesus Climent + +Copyright: + +Copyright (c) 1998-2001 Robert Woodcock +Copyright (c) 2003-2004 Jesus Climent +This code is hereby licensed for public consumption under either the +GNU GPL v2 or greater, or Larry Wall's Artistic license - your choice. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +Copyright for this work is to expire January 1, 2010, after which it +shall be public domain. + +See /usr/share/common-licenses/GPL-2 + diff --git a/debian/dirs b/debian/dirs new file mode 100644 index 0000000..18488c7 --- /dev/null +++ b/debian/dirs @@ -0,0 +1,2 @@ +etc +usr/bin diff --git a/debian/docs b/debian/docs new file mode 100644 index 0000000..e8868a0 --- /dev/null +++ b/debian/docs @@ -0,0 +1,4 @@ +README +changelog +TODO +FAQ diff --git a/debian/files b/debian/files new file mode 100644 index 0000000..9235734 --- /dev/null +++ b/debian/files @@ -0,0 +1 @@ +abcde_2.1.20-1_all.deb sound optional diff --git a/debian/preinst b/debian/preinst new file mode 100644 index 0000000..c6d5477 --- /dev/null +++ b/debian/preinst @@ -0,0 +1,26 @@ +#!/bin/sh +# If: +# * this isn't an upgrade (a fresh install) +# * and /etc/cdgrab.conf exists +# * and /etc/abcde.conf doesn't +# copy /etc/cdgrab.conf to /etc/abcde.conf + +if [ "$1" != "install" ] +then + exit 0 +fi +if [ "$2" != "" ] +then + exit 0 +fi +if [ -f /etc/abcde.conf ] +then + exit 0 +fi +if [ -r /etc/cdgrab.conf ] +then + echo Copying old /etc/cdgrab.conf to /etc/abcde.conf... + cp -a /etc/cdgrab.conf /etc/abcde.conf + exit 0 +fi +#DEBHELPER# diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..3f517c1 --- /dev/null +++ b/debian/rules @@ -0,0 +1,70 @@ +#!/usr/bin/make -f +# Made with the aid of dh_make, by Craig Small +# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess. +# Some lines taken from debmake, by Cristoph Lameter. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +build: build-stamp +build-stamp: + dh_testdir + + + # Add here commands to compile the package. + $(MAKE) + + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp install-stamp + + # Add here commands to clean up after the build process. + -$(MAKE) clean + + dh_clean + +install: install-stamp +install-stamp: build-stamp + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package into debian/tmp. + $(MAKE) install DESTDIR=`pwd`/debian/tmp + + touch install-stamp + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install +# dh_testversion + dh_testdir + dh_testroot + dh_installdocs + dh_installexamples + dh_installmenu + dh_installmanpages + dh_installchangelogs + dh_link + dh_strip + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol +# dh_makeshlibs + dh_md5sums + dh_builddeb + +source diff: + @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary -- 2.20.1