From: Mike Bethany Date: 2011-07-01T05:37:11+09:00 Subject: Re: A File Renamer --0015176f17a0701f1a04a6f3dda2 Content-Type: text/plain; charset=ISO-8859-1 You should be aware that meta data can't be trusted. Not only do people not know how to use fields properly they will also use different character sets like stuffing in Unicode when the tag claims to be ASCII. Not to mention using online databases can be a real exercise in frustration. Again people seem incapable of using fields properly and there are numerous duplicates for items that shouldn't be there. I think you're getting dragged down into the implementation of a project instead fo learning the core concepts of OO design. I would avoid the whole mess and do something more focused like working through the Ruby Koans: http://rubykoans.com/ Here are some other resources for learning OO design and the concepts behind it: Berkeley - 61A - The Structure and Interpretation of Computer Programs (includes iTunes links) Videos: http://webcast.berkeley.edu/playlist#c,d,Computer_Science,D7B8D6A4834C14C8 Course resources: http://wla.berkeley.edu/~cs61a/sp11/ Original videos and the book: http://groups.csail.mit.edu/mac/classes/6.001/abelson-sussman-lectures/ Stanford - 106B - Programming Abstractions Videos: http://171.64.93.201/ClassX/system/users/web/Subject.php?subject=CS106B_LECTURES_SPR2011 Course resources: http://www.stanford.edu/class/cs106b/ On Thu, Jun 30, 2011 at 2:50 PM, Josh Cheek wrote: > On Thu, Jun 30, 2011 at 10:55 AM, Johnny Morrice >wrote: > > > > Is there a pattern to the file names you are working with? The key is > > > to find a pattern and write code to work with that pattern. > > > > You know the video file itself probably has meta data. > > > > Inspecting that would be a harder than just regex matching on the > > filename but the program is going to be much more robust in the face of > > crappy input. > > > > > But requires a different set of assumptions: the files are videos (it is > called a "File" renamer, no longer a "Movie" renamer), and they're all the > same format or you have a tool that will let you access this format. > > I did something like this with my music collection, CD's that I'd ripped > were MP3s and could be renamed nicely, but the ones I'd bought off iTunes > were m4a's and didn't have this info. Some of the music I'd ripped a long > time ago didn't have all the same tags filled out, etc. In the end I had a > tool that renamed maybe 90-95% of my music and the rest I had to do by > hand. > --0015176f17a0701f1a04a6f3dda2--