From d6ebf13d61dd7949ce28b0e287e2b5ec6f304b0f Mon Sep 17 00:00:00 2001 From: momo <> Date: Tue, 30 Jan 2007 05:03:01 +0000 Subject: [PATCH] Debugging, added md5sum checkup fonctionnality --- audio_tools.py | 40 ++++++++++++++++++++++- debian/telemeta.1 | 77 +++++++++++++++++++++++++++++++-------------- doc/html/index.html | 45 +++++++++----------------- telemeta.py | 9 ++++-- 4 files changed, 113 insertions(+), 58 deletions(-) diff --git a/audio_tools.py b/audio_tools.py index f57d0808..dca5198d 100755 --- a/audio_tools.py +++ b/audio_tools.py @@ -27,7 +27,7 @@ def encode(enc_type,dir_in,file_in,dir_out,file_out): if enc_type == 'flac' : quality = tag_tools.get_opt_value(enc_type+'_quality') - os.system('flac -V -q '+quality+' -o "'+media_out+'" "'+media_in+'"') + os.system('flac -f -V -q '+quality+' -o "'+media_out+'" "'+media_in+'"') if enc_type == 'ogg': bitrate = tag_tools.get_opt_value(enc_type+'_bitrate') @@ -62,6 +62,44 @@ def decode(media_in,file_ext): def normalize(media_in): os.system('normalize-audio "'+media_in+'"') +def create_md5_key(dir_in,file_in): + media_in = dir_in+file_in + os.system('md5sum -b "'+media_in+'" "'+media_in+'.md5"') + +def check_md5_key(dir_in,file_in): + media_in = dir_in+file_in + md5_log = os.popen4('md5sum -c "'+media_in+'" "'+media_in+'.md5"') + if 'OK' in md5_log.split(':'): + return True + else: + return False + +def compare_md5_key(file_in,file_out): + media_in = file_in + media_out = file_out + if not os.path.exists(media_in): + return False + else: + print 'Checking md5sums...' + file_in_in, file_in_out = os.popen4('md5sum -b "'+media_in+'"') + file_out_in, file_out_out = os.popen4('md5sum -b "'+media_out+'"') + for line in file_in_out.readlines(): + line = line.split('*') + line = line[0] + #print line + for file_out_out_line in file_out_out.readlines(): + file_out_out_line= file_out_out_line.split('*') + file_out_out_line= file_out_out_line[0] + #print file_out_out_line + if line == file_out_out_line: + print 'Files are equal...\n' + return True + exit + else: + print 'Files are different...\n' + return False + exit + def create_par_key(dir_in,file_in): media_in = dir_in+file_in os.system('par2 c -n1 "'+media_in+'"') diff --git a/debian/telemeta.1 b/debian/telemeta.1 index a216a415..9ea1d7c6 100644 --- a/debian/telemeta.1 +++ b/debian/telemeta.1 @@ -3,19 +3,12 @@ telemeta \(em backups, transcodes, tags and marks any audio content with metadata .SH "SYNOPSIS" .PP -\fBtelemeta\fR [\fB\fIOPTIONS\fR\fP] [\fB\fIMEDIA\fR\fP] +\fBtelemeta\fR [\fB\fIOPTIONS\fR\fP] [\fICOLLECTION\fR] [\fB\fIOPTIONS\fR\fP] [\fB\fIMEDIA\fR\fP] .SH "DESCRIPTION" .PP -This manual page documents briefly the -\fBtelemeta\fR command. +\fBtelemeta\fR is an audio tool which creates audio transcoded collections fast from fresh mastered files. It can be useful to backup digitalized audio media from vinyls, old tapes or whatever and include them in a database. .PP -This manual page was written for the \fBDebian\fP distribution -because the original program does not have a manual page. -Instead, it has documentation in the GNU \fBInfo\fP format; see below. -.PP -\fBtelemeta\fR is an audio tool which creates audio transcoded databases fast from fresh mastered files. It can be useful to backup digitalized audio media from vinyls, old tapes or whatever. -.PP -Telemeta first creates a simple structure where original sounds will be backuped. The files can be transcoded to WAV, FLAC, MP3 and OGG including the corresponding tags. +Telemeta first creates a simple file structure where the original sounds will be backuped. The files can be transcoded to WAV, FLAC, MP3 and OGG including the corresponding tags. .PP Here are some cool functions: .IP "\fB\fP" 10 @@ -25,7 +18,7 @@ Here are some cool functions: .IP "" 10 \- File corruption security with par2 recovery files .IP "" 10 -\- Database synchronizing to remote servers (ssh+rsync) +\- Collection synchronizing to remote servers (ssh+rsync) .IP "" 10 \- Modify metadata from XML or interactive shell .SH "OPTIONS" @@ -35,13 +28,13 @@ with long options starting with two dashes (`\-'). A summary of options is included below. For a complete description, see the \fBInfo\fP files. .IP "\fB\-\-create\fP " 10 -creates a database repository and default database xml +creates a collection repository .IP "\fB\-\-backup\fP " 10 -backups a media to the database +backups and transcodes wave files to a collection .IP "\fB\-\-album\fP " 10 proccesses an entire directory (one shot album) .IP "\fB\-\-backup\fP " 10 -backups a media to the database +backups a media to the collection .IP "\fB\-\-from-xml\fP " 10 takes tags and opts in original xml source .IP "\fB\-\-force\fP " 10 @@ -53,22 +46,58 @@ chooses default argument for all question .IP "\fB\-\-recover\fP " 10 check an repair the backuped media with the previously created "par2" security files .IP "\fB\-\-rsync\fP " 10 -synchronizes database to a remote server (ssh+rsync) -.IP "\fB\-\-erase-media\fP " 10 -erases converted database +synchronizes collection to a remote server (ssh+rsync) +.IP "\fB\-\-erase\fP " 10 +erases a collection (flac, ogg, mp3 only !) .IP "\fB\-\-help\fP " 10 Show summary of options. -.IP "\fB-v\fP \fB\-\-version\fP " 10 +.IP "\fB\-\-version\fP " 10 Show version of program. -.SH "SEE ALSO" +.SH "EXAMPLES" .PP -oggenc (1), flac (1), etc... +\fBtelemeta \-\-create my_collection\fR .PP -The programs are documented fully by Guillaume Pellerin. More info at \fIhttp://yomix.org/telemeta\fP. - +\fBtelemeta \-\-backup my_collection file.wav\fR +.PP +\fBtelemeta \-\-backup my_collection \-\-album /path/to/directory/\fR +.PP +\fBtelemeta \-\-backup my_collection \-\-album \-\-par2 \-\-rsync /path/to/directory/\fR +.PP +\fBtelemeta \-\-backup my_collection \-\-album \-\-par2 \-\-rsync \-\-force /path/to/directory/\fR +.SH "DOWNLOAD" +.PP +Telemeta is written in python. So it doesn't require any compilation step. +.PP +On Debian or Ubuntu just add these lines to your /etc/apt/sources-list: +.PP +\fBdeb http://yomix.org/debian/ binary/\fR +.PP +\fBdeb-src http://yomix.org/debian/ source/\fR +.PP +Then, +.PP +\fBsudo apt-get update\fR +.PP +\fBsudo apt-get install telemeta\fR +.PP +On other linux platforms, \fIdownload (link to URL http://yomix.org/telemeta/download/) \fR the lastest .tar.gz archive, uncompress it, go into the created directory and just type this with your favorite shell : +.PP +\fBpython install.py\fR +.PP +See README and INSTALL file for more informations. +.PP +You can also get the lastest version of Telemeta with subversion (just type 'enter' for the password: +.PP +svn co http://svn.yomix.org/svn/telemeta/trunk telemeta \-\-username=anonymous +.SH "DEPENDS" +.PP +python (>= 2.3.5-7), python-xml, python-central (>= 0.5), python-mutagen, sox, vorbis-tools, flac, lame, normalize-audio, ecasound, festival, par2 +.SH "SEE ALSO" +.PP +The program is documented fully by Guillaume Pellerin. More info at \fI\fIhttp://svn.yomix.org/telemeta/ (link to URL http://svn.yomix.org/telemeta/) \fR\fP. .SH "AUTHOR" .PP -This manual page was written by Guillaume Pellerin for +This manual page was written by Guillaume Pellerin 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 @@ -78,4 +107,4 @@ 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. -.\" created by instant / docbook-to-man, Mon 08 Jan 2007, 03:12 +.\" created by instant / docbook-to-man, Fri 26 Jan 2007, 00:26 diff --git a/doc/html/index.html b/doc/html/index.html index d6f2642f..00b72224 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -76,25 +76,6 @@ NAME="AEN32" >

DESCRIPTION

This manual page documents briefly the - telemeta command.

This manual page was written for the Debian distribution - because the original program does not have a manual page. - Instead, it has documentation in the GNU Info format; see below.

telemeta

OPTIONS

EXAMPLES

DOWNLOAD

Telemeta is written in python. So it doesn't require any compilation step.

On debian or Ubuntu just add these lines to your /etc/apt/sources-list:

On Debian or Ubuntu just add these lines to your /etc/apt/sources-list:

See README and INSTALL file for more informations.

You can also get the lastest version of Telemeta with subversion (just type 'enter' for the password:

svn co http://svn.yomix.org/svn/telemeta/trunk telemeta --username=anonymous

DEPENDS

SEE ALSO

The program is documented fully by Guillaume Pellerin. More info at http://yomix.org/telemeta/http://svn.yomix.org/telemeta/.

AUTHOR

This manual page was written by Guillaume Pellerin <> for the