From: Simeon Veldstra Date: Mon, 6 Nov 2006 00:54:17 +0000 (-0800) Subject: Fix flac tag bug and debian packaging X-Git-Tag: v0.5.8 X-Git-Url: http://puddle.ca/cgi-bin/gitweb.cgi?p=mp3togo;a=commitdiff;h=8e9d7dd71a4109e79d1ccc58be8c3a79f8ecbb1b Fix flac tag bug and debian packaging Signed-off-by: Simeon Veldstra --- --- a/MANIFEST +++ b/MANIFEST @@ -4,7 +4,14 @@ copyright setup.py bin/mp3togo mp3togo/__init__.py -mp3togo/converter.py +mp3togo/cache.py +mp3togo/cluster.py +mp3togo/conf.py +mp3togo/filelist.py +mp3togo/helpers.py mp3togo/main.py mp3togo/options.py -mp3togo/setup.py +mp3togo/pool.py +mp3togo/tags.py +mp3togo/task.py +mp3togo/track.py --- /dev/null +++ b/debian/changelog @@ -0,0 +1,115 @@ +mp3togo (0.5.8) unstable; urgency=low + + * Fixed failure when converting flac with no GENRE tag + * Bug reported by Norman Baier + * Incorporated new debian directory - no longer native package. + + -- Simeon Veldstra Sun, 5 Nov 2006 16:31:41 -0800 + +mp3togo (0.5.7) unstable; urgency=low + + * New packaging for Debian + + -- Simeon Veldstra Sat, 14 Oct 2006 14:44:47 -0700 + +mp3togo (0.5.6) unstable; urgency=low + + * Fixed divide by zero error and missing symbol error. + * Fixed missing genre tag in ogg file error. + * Thanks to Mark Hewitt for the report and fixes. + + -- Simeon Veldstra Wed, 28 Jun 2006 23:07:04 -0700 + +mp3togo (0.5.5) unstable; urgency=low + + * Added support for python-eyeD3 for more robust handling of unicode tags. + * python-ID3 is still supported and will be used if eyeD3 is not available. + + -- Simeon Veldstra Mon, 26 Jun 2006 19:17:31 -0700 + +mp3togo (0.5.4) unstable; urgency=low + + * Changed the ogg decoder to oggdec from ogg123 to fix bug on Debian Stable (Sarge). + + -- Simeon Veldstra Mon, 12 Jun 2006 19:46:05 -0700 + +mp3togo (0.5.3) unstable; urgency=low + + * Added Justus Pendleton's patch to fix config file bug. + * Fixed cluster mode - start slave as test-mp3togo bug. + * Made minor changes to prepare for GUI. + + -- Simeon Veldstra Tue, 6 Jun 2006 19:12:58 -0700 + +mp3togo (0.5.2) unstable; urgency=low + + * Added Justus Pendleton's .m4a patch + + -- Simeon Veldstra Wed, 31 May 2006 18:00:03 -0700 + +mp3togo (0.5.1) unstable; urgency=low + + * Added --no-tags option which disables tagging of output files. + * Added a test for exceptions to the tagging code. + + -- Simeon Veldstra Sun, 28 May 2006 11:04:37 -0700 + +mp3togo (0.5.0) unstable; urgency=low + + * Added cluster mode feature. + + -- Simeon Veldstra Fri, 26 May 2006 20:08:39 -0700 + +mp3togo (0.4.1) unstable; urgency=low + + * Merged Justus Pendleton's --format patch. See --help. + * Added test for failed write to stdout in mainloop. + * Various small bugfixes. + * Added a version field to the cache pickle. + * Added a human readable info file to cache. + * Added md5sum prefix to file names in cache. + + -- Simeon Veldstra Sat, 20 May 2006 02:29:59 -0700 + +mp3togo (0.4.0) unstable; urgency=low + + * Add caching support for processed files. + * Add support for Amarok playlist grabbing - Justus Pendleton + * Support specifing playlists as free arguments - idea: Christopher Arndt + + -- Simeon Veldstra Thu, 18 May 2006 00:30:09 -0700 + +mp3togo (0.3.2) unstable; urgency=low + + * Really be graceful in the absence of third party modules. + Thanks fab for the patch. + + -- Simeon Veldstra Wed, 17 May 2006 12:32:00 -0700 + +mp3togo (0.3.1) unstable; urgency=low + + * Thanks: Christopher Arndt for setup.py fix and suggestions. + * Incorrect parameter in setup.py + * Don't overwrite unless --force is used. + * Don't mangle file names arbitrarily. + * Separate the test suite. + * Be graceful in the absence of third party modules. + + -- Simeon Veldstra Mon, 15 May 2006 18:56:48 -0700 + +mp3togo (0.3.0) unstable; urgency=low + + * Rewrote program to use os.exec instead of os.system. + * New progress output format, pause and stop controls. + * Cleaned up, modularized, code. + * Built unit test suite. + * Added thread support. + + -- Simeon Veldstra Sun, 14 May 2006 14:27:56 -0700 + +mp3togo (0.2.1) unstable; urgency=low + + * Initial Release. + * This package is maintained by its author. + + -- Simeon Veldstra Wed, 26 Apr 2006 19:44:29 -0700 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +4 --- /dev/null +++ b/debian/control @@ -0,0 +1,25 @@ +Source: mp3togo +Section: sound +Priority: optional +Maintainer: Simeon Veldstra +Build-Depends: cdbs (>= 0.4.43), debhelper (>= 5.0.37.2), python, python-support (>=0.5.2) +#Build-Depends-Indep: python, python-support (>=0.5.3), docbook-to-man +Build-Depends-Indep: docbook-to-man +Standards-Version: 3.7.2 + +Package: mp3togo +Architecture: all +#XS-Python-Version: current +#XB-Python-Version: ${python:Versions} +Depends: ${python:Depends}, python-pyvorbis, python-eyeD3, mpg321, vorbis-tools +#Provides: ${python:Provides} +Recommends: flac, normalize-audio +Suggests: lame, python-xmms, faad +Description: A tool for loading music on to portable mp3 players + A tool for creating sets of mp3 (or ogg vorbis) files + from an archive of music in various formats and bitrates. + The files are decoded from their original format and + reencoded to consistent format low bitrate files for + portability and space efficiency. + mp3togo monitors free space on the device as it works + and attempts to guess missing tags. --- /dev/null +++ b/debian/copyright @@ -0,0 +1,26 @@ +This is mp3togo, written and maintained by Simeon Veldstra +on Wed, 26 Apr 2006 19:44:29 -0700. + +The original source can always be found at: + ftp://ftp.debian.org/dists/unstable/main/source/ + +Copyright (C) 2004 - 2006 Simeon Veldstra + +License: + + 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 package; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +On Debian systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL'. --- /dev/null +++ b/debian/docs @@ -0,0 +1 @@ + --- /dev/null +++ b/debian/mp3togo.1 @@ -0,0 +1,137 @@ +.TH "MP3TOGO" "1" +.SH "NAME" +mp3togo \(em program to load music on a mp3 player +.SH "SYNOPSIS" +.PP +\fBmp3togo\fR [\fBoptions\fP] [\fB\fIfile(s)\fR\fP] +.SH "DESCRIPTION" +.PP +This manual page documents briefly the +\fBmp3togo\fR commands. +.PP +\fBmp3togo\fR is a program that creates +files for a portable mp3 player or a mp3 CD from higher quality +files in various formats in a permanent archive. +.SH "OPTIONS" +.PP +This program follow the usual GNU command line syntax, +with long options starting with two dashes (`\-'). A summary of +options is included below. +.IP " \fB-c\fP \fB\-\-config\fP " 10 +The location of the config file. (If it exists.) + +.IP " \fB-s\fP \fB\-\-save-config\fP " 10 +Write out a new config file with the options given and +exit. To save the configuration to a different file, set +\-\-config to the desired filename. The file, if it exists, will +be overwritten. + +.IP " \fB\-\-no-config-file\fP " 10 +Disable reading from and writing to the config file. + +.IP " \fB-v\fP \fB\-\-verbose\fP " 10 +Set the verbosity level. A value of 0 will produce no +output (except option parsing errors). + +.IP " \fB-h\fP \fB\-\-help\fP " 10 +Print this message. + +.IP " \fB-t\fP \fB\-\-file-tag\fP " 10 +A string appended to the name of the file to indicate it +has been recoded. + +.IP " \fB-w\fP \fB\-\-work-dir\fP " 10 +The path to store temporary files. This could need several +hundred megabytes free. + +.IP " \fB-d\fP \fB\-\-tree-depth\fP " 10 +The number of directory levels to preserve in the output +tree. Use 0 to put all output files directly into the target +directory. Use 2 to create a directory for the Artist and then +the Album (Assuming your music collection is organized in +directories by artist then album). + +.IP " \fB-m\fP \fB\-\-max-size\fP " 10 +The disk space available to use in bytes. Append 'M' for +megabytes, 'G' for gigabytes or 'K' for kilobytes. Use 0 to +use all available space on the filesystem. + +.IP " \fB-F\fP \fB\-\-force\fP " 10 +Overwrite files if they already exist. + +.IP " \fB-C\fP \fB\-\-encoder\fP " 10 +The encoder to use to create the output files. Options are +wave, lame or oggenc. + +.IP " \fB-E\fP \fB\-\-encoder-options\fP " 10 +Compression options for the encoder. + +.IP " \fB-z\fP \fB\-\-compression-factor\fP " 10 +If you change the lame options, you must change this +factor to match the compression rate of the new options. This +is used to estimate completed file size. + +.IP " \fB-h\fP \fB\-\-help\fP " 10 +Print this message. + +.IP " \fB-p\fP \fB\-\-playlist\fP " 10 +The playlist to convert. Playlists can be simple lists of +file paths, one per line, or .m3u files or the native XMMS +playlist file format. + +.IP " \fB-x\fP \fB\-\-import-xmms\fP " 10 +Get playlist from running instance of XMMS. (You must have +xmms-shell installed) + +.IP " \fB-o\fP \fB\-\-output-dir\fP " 10 +Where to write the output files. + +.IP " \fB\-\-index\fP " 10 +Create an index file when in wav output mode. + +.IP " \fB\-\-no-normalize\fP " 10 +Don't normalize the wav file before encoding. + +.SH "FILES" +.PP +mp3togo will read ~./mp3togo for configuration values if it +exists. This can be overridden with the \-\-config command line +option. +.SH "SEE ALSO" +.PP +lame (1), oggenc (1). +.SH "EXAMPLES" +.PP +Load the files in playlist.m3u to the player mounted +on /mnt/usb: +\fBmp3togo \-p playlist.m3u \-o /mnt/usb\fR +.PP +Load a single file to the player: +\fBmp3togo \-o /mnt/usb /home/media/Music/Nina_Simone/The_Blues/Turn_Me_On.ogg\fR +.PP +Load the playlist from the running XMMS to /mnt/usb in +ogg vorbis format: (requires xmms-shell) +\fBmp3togo \-C oggenc \-x \-o /mnt/usb\fR +.PP +Create wav files in ~/audio-cd to burn a CD from playlist.m3u: +\fBmp3togo \-C wave \-p playlist.m3u \-m 700M \-o ~/audio-cd\fR +.PP +Create mp3 files on a mounted ISO CD image at /mnt/loop to +burn a mp3 CD: +\fBmp3togo \-p playlist.m3u \-o /mnt/loop\fR +.SH "AUTHOR" +.PP +This manual page was written by Simeon Veldstra reallifesim@gmail.com for +the \fBDebian\fP system (but may be used by others). Permission is +granted to copy, distribute and/or modify this document under +the terms of the GNU General Public License, Version 2 any +later version published by the Free Software Foundation. + +.PP +On Debian systems, the complete text of the GNU General Public +License can be found in /usr/share/common-licenses/GPL. + +.PP +mp3togo can be found online at http://puddle.ca/mp3togo + +.\" created by instant / docbook-to-man, Sun 05 Nov 2006, 16:36 --- /dev/null +++ b/debian/mp3togo.1.sgml @@ -0,0 +1,375 @@ + manpage.1'. You may view + the manual page with: `docbook-to-man manpage.sgml | nroff -man | + less'. A typical entry in a Makefile or Makefile.am is: + +manpage.1: manpage.sgml + docbook-to-man $< > $@ + + + The docbook-to-man binary is found in the docbook-to-man package. + Please remember that if you create the nroff version in one of the + debian/rules file targets (such as build), you will need to include + docbook-to-man in your Build-Depends control field. + + --> + + + Simeon"> + Veldstra"> + + April 26, 2006"> + + 1"> + reallifesim@gmail.com"> + + MP3TOGO"> + + + Debian"> + GNU"> + GPL"> +]> + + + +
+ &dhemail; +
+ + &dhfirstname; + &dhsurname; + + + 2003 + &dhusername; + + &dhdate; +
+ + &dhucpackage; + + &dhsection; + + + &dhpackage; + + program to load music on a mp3 player + + + + &dhpackage; + + + + + + + + + DESCRIPTION + + This manual page documents briefly the + &dhpackage; commands. + + &dhpackage; is a program that creates + files for a portable mp3 player or a mp3 CD from higher quality + files in various formats in a permanent archive. + + + + OPTIONS + + This program follow the usual &gnu; command line syntax, + with long options starting with two dashes (`-'). A summary of + options is included below. + + + + + + + + + + The location of the config file. (If it exists.) + + + + + + + + + + Write out a new config file with the options given and + exit. To save the configuration to a different file, set + --config to the desired filename. The file, if it exists, will + be overwritten. + + + + + + + + + Disable reading from and writing to the config file. + + + + + + + + + + Set the verbosity level. A value of 0 will produce no + output (except option parsing errors). + + + + + + + + + + Print this message. + + + + + + + + + + A string appended to the name of the file to indicate it + has been recoded. + + + + + + + + + + The path to store temporary files. This could need several + hundred megabytes free. + + + + + + + + + + The number of directory levels to preserve in the output + tree. Use 0 to put all output files directly into the target + directory. Use 2 to create a directory for the Artist and then + the Album (Assuming your music collection is organized in + directories by artist then album). + + + + + + + + + + The disk space available to use in bytes. Append 'M' for + megabytes, 'G' for gigabytes or 'K' for kilobytes. Use 0 to + use all available space on the filesystem. + + + + + + + + + + Overwrite files if they already exist. + + + + + + + + + + The encoder to use to create the output files. Options are + wave, lame or oggenc. + + + + + + + + + + Compression options for the encoder. + + + + + + + + + + If you change the lame options, you must change this + factor to match the compression rate of the new options. This + is used to estimate completed file size. + + + + + + + + + + Print this message. + + + + + + + + + + The playlist to convert. Playlists can be simple lists of + file paths, one per line, or .m3u files or the native XMMS + playlist file format. + + + + + + + + + + Get playlist from running instance of XMMS. (You must have + xmms-shell installed) + + + + + + + + + + Where to write the output files. + + + + + + + + + Create an index file when in wav output mode. + + + + + + + + + Don't normalize the wav file before encoding. + + + + + + + + FILES + mp3togo will read ~./mp3togo for configuration values if it + exists. This can be overridden with the --config command line + option. + + + + SEE ALSO + lame (1), oggenc (1). + + + + EXAMPLES + + Load the files in playlist.m3u to the player mounted + on /mnt/usb: + mp3togo -p playlist.m3u -o /mnt/usb + + + Load a single file to the player: + mp3togo -o /mnt/usb /home/media/Music/Nina_Simone/The_Blues/Turn_Me_On.ogg + + + Load the playlist from the running XMMS to /mnt/usb in + ogg vorbis format: (requires xmms-shell) + mp3togo -C oggenc -x -o /mnt/usb + + + Create wav files in ~/audio-cd to burn a CD from playlist.m3u: + mp3togo -C wave -p playlist.m3u -m 700M -o ~/audio-cd + + + Create mp3 files on a mounted ISO CD image at /mnt/loop to + burn a mp3 CD: + mp3togo -p playlist.m3u -o /mnt/loop + + + + + AUTHOR + + This manual page was written by &dhusername; &dhemail; for + the &debian; system (but may be used by others). Permission is + granted to copy, distribute and/or modify this document under + the terms of the &gnu; General Public License, Version 2 any + later version published by the Free Software Foundation. + + + On Debian systems, the complete text of the GNU General Public + License can be found in /usr/share/common-licenses/GPL. + + + mp3togo can be found online at http://puddle.ca/mp3togo + + +
+ + + + --- /dev/null +++ b/debian/pycompat @@ -0,0 +1 @@ +2 --- /dev/null +++ b/debian/rules @@ -0,0 +1,42 @@ +#!/usr/bin/make -f +# mp3togo debian/rules +# +# Simeon Veldstra 2006 +# Based on a file originaly written by Robert Millan. +# This file is public domain. + +#DEB_TAR_SRCDIR := mp3togo-0.2.1 +#DEB_AUTO_CLEANUP_RCS := yes + +# Add here any variable or target overrides you need +DEB_PYTHON_SYSTEM=pysupport + +#include /usr/share/cdbs/1/class/makefile.mk +#include /usr/share/cdbs/1/rules/debhelper.mk +#include /usr/share/cdbs/1/rules/tarball.mk +#include /usr/share/cdbs/1/rules/simple-patchsys.mk + +# dh_pysupport +include /usr/share/cdbs/1/rules/buildcore.mk +include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/class/python-distutils.mk +include /usr/share/cdbs/1/rules/simple-patchsys.mk + +#DEB_ISNATIVE="True" + +build/mp3togo:: + docbook-to-man debian/mp3togo.1.sgml > debian/mp3togo.1 + dh_installman debian/mp3togo.1 + + # python-support: + #python setup.py build + +# python-support: +#install: +# python setup.py install --root=$(CURDIR)/debian/mp3togo +# +#binary-indep: +# dh_pysupport +# dh_installdeb + + --- a/mp3togo/__init__.py +++ b/mp3togo/__init__.py @@ -21,5 +21,5 @@ # __all__ = ('converter', 'main', 'options', 'setup') -version = '0.5.7' +version = '0.5.8' --- a/mp3togo/conf.py +++ b/mp3togo/conf.py @@ -324,7 +324,7 @@ def make_args(helper, input, output, arg if "###input###" in out: out[out.index("###input###")] = input if "###output###" in out: - out[out.index("###output###")] = output + out[out.index("###output###")] = output return out --- a/mp3togo/tags.py +++ b/mp3togo/tags.py @@ -188,7 +188,7 @@ class Tags(UserDict.DictMixin): out.setAlbum(d['ALBUM']) out.setTitle(d['TITLE']) g = eyeD3.Genre() - g.setId(d['GENRE']) + g.setId(d.get('GENRE', 12)) out.setGenre(g) if d.has_key('COMMENT'): out.addComment(d['COMMENT']) --- a/mp3togo/task.py +++ b/mp3togo/task.py @@ -87,6 +87,7 @@ class SimpleTask: self._output = out self._outlock.release() except: + # if verbosity is high enough, print something about the exception self._status = FAILED self._runlock.release() return True @@ -223,7 +224,7 @@ class Task(SimpleTask): while not fp: pass while self._status in (RUNNING, PAUSED): - wpid, status = os.waitpid(pid, os.WNOHANG) + wpid, status = os.waitpid(self._pid, os.WNOHANG) if wpid == pid: # Child exited self._runlock.acquire()