Looking for a piece of python...
Jerry McBride
mcbrides9
Mon May 23 17:05:04 PDT 2005
On Sunday 22 May 2005 10:16 pm, Net Llama! wrote:
> On 05/22/2005 06:58 PM, Jerry McBride wrote:
> > On Monday 23 May 2005 07:50 pm, Robert Hemus wrote:
> >> On Sun, 2005-05-22 at 10:56, Jerry McBride wrote:
> >> > Anyone have a piece of python that processes directories recursively?
> >> >
> >> > I've a vast mp3 collection that is broken up into hundreds of
> >> > directories and... now... I need to do some file processing on them.
> >> >
> >> > Anyone?
> >> >
> >> > Thank you, in advance.
> >> > _______________________________________________
> >> > Linux-users mailing list ( Linux-users at linux-sxs.org )
> >> > Unsub/Password/Etc:
> >> > http://mail.linux-sxs.org/cgi-bin/mailman/listinfo/linux-users
> >> >
> >> > Need to chat further on this subject? Check out #linux-users on
> >> > irc.linux-sxs.org !
> >>
> >> My, that sounds like creepy beastiallity (sp?) to me!!
> >> Bob
> >
> > Turns out that it was a piece of cake. Using os.path.walk I was able to
> > process almost 13,000 mp3's, archived in hundreds of directories, with
> > less than 10 lines of code... Amazing. Of course, the processing I'm
> > doing numbers closer to 300 lines.
> >
> > Cheers all and thanks for your help.
>
> I still don't really understand what it is you were doing. For the
> curious, can you explain what you were doing with 13000 MP3s?
Family library, mostly music ripped from our cd collection and lots of sound
effects that my wife has collected over the years.
In building the library I was at one time I was using version 1.0 ID3 to
annotate the mp3's, then for some stupid reason switched mid stream to
version 2.0... The wife used both formats, sometimes just one version,
sometimes both for the same mp3... Anyways, I've just discoverd that some
hardware mp3 players have problems with version 2.0 ID3's.... So I wanted an
easy way to change the entire library back to ID3 version 1.0... Hence my
request for a piece of python code. I cobbled together a program to traverse
the desired directory tree, changing all the mp3's to version 1.0 ID3
format... Took about 2 hours and 30 minutes for the whole shebang.
Got it done, painlessly too.
The next project will be to modify my program to use CDDA and fill in or
modify the version 1.0 ID3's with additional data.
Cheers.
--
******************************************************************************
Registered Linux User Number 185956
FSF Associate Member number 2340 since 05/20/2004
Join me in chat at #linux-users on irc.freenode.net
Buy an Xbox for $149.00, run linux on it and Microsoft loses $150.00!
6:19pm up 45 days, 1:26, 3 users, load average: 0.00, 0.00, 0.00
More information about the Linux-users
mailing list