AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
A better finder rename 10 torrent3/23/2023 ![]() ![]() Leave a comment, or join the neverfear IRC channel and describe what the problem is, if it's a problem with the code, I'll be happy to fix it. tests will run the unittests, useful to check everything is working, or if you want to write extra regexs to match unsupported filename formats. force will not check if renaming a file will overwrite another file (not recommended) always doesn't prompt before renaming files (but it will still ask you to confirm it has detected the correct show). ![]() batch uses the first showname from the TVDB search. interactive is the default behavior, whereby it asks the user to select the correct show name. debug shows a bunch of debugging information, surprisingly. These will only be useful if something isn't working right, or you want to run the tvnamer from a script or similar. There are a few command-line flags, which you can see by running python :tvnamer.py -help" New name: My Name is Earl - Girl Earl.avi If you have no idea what I just wrote, and/or don't want to install it, but are still curious - here's what it does: $ tvnamer My.Name.is.-LOL.avi -LOL.avi Sorry it's not entirely simple to install yet - when I am happier with the code I will improve the installation (probably to easy_install tvdb_api, at the very minimum "python setup.py install") Example use Sudo ln -s ~/code/tvdb_api/tvnamer.py /usr/local/bin/tvnamer " in any folder and it'll start nice'ifying the names.Ī better way to install the script, and keep it up-to-date would be to use git, checkout the Github project and sym-link the script to /usr/local/bin/tvnamer: mkdir ~/code/ Since the script needs BeautifulSoup and the tvdb_api.py modules, they must be in the Python module path, or the same directory. On OS X/Linux, you can make it far nicer to use by marking the script as executable, and putting it somewhere in your PATH. If you use Linux or OS X, the bare minimum you have to do is: python ~/Downloads/dbr-tvdb_api-*/tvnamer.py tv.ep.s01e02.avi ", select the correct show name, confirm the first few episodes are being named right, then hit "a" to magically name the rest of the files. The way I tend to use it is to run "tvnamer. (y to accept, n no skip that file, a to rename the rest of the files, q to abort) It will prompt you to select the correct show (enter the corresponding number and hit enter), then it will ask you to confirm the new name. If you have multiple files, you can specify a directory: tvnamer mydownloads/ The output name is customizable in the script, should you have another naming scheme you prefer. The script works on a wide range of filenames - as long as it has the showname, the season and episode numbers, it should work it out. ![]() ![]() Will then look for "some show" on TVDB, grab the name of season 1, episode 2 and rename the file as follows: Scrubs - My Journey.avi It's a command-line tool which you pass one or more television show files, and it processes the file, giving you nicely named files. You can get the name of season 2/episode 10 of scrubs by doing: i = tvdb_api.tvdb(interactive=False) The output filename is easily changeable in the script (but it defaults to my preferred naming scheme, obviously) The scripts Oh, I keep TV episodes in the following format: "Show Name - Episode Name.avi"Īnd if no episode name can be found: "Show Name - " tvnamer -b Īnd it will rename the file to "Scrubs - My Journey.avi" Say you(r friend) has a file named "", you could manually rename it, go to tv.com, search for the correct show, find the right season, look for the name of episode two, copy the name and paste it into the filename. Long story short, I rewrote it in Python. I was using a modified version of this script until recently - it worked fine, but used an old version of the TVDB API, and had a many other flaws. avi files in the current folder though, grabbed the episode name and renamed the file using this data. I emailed the creator of the site (Scott Zsori) who kindly sent back a Perl script that ran all. Then, one day I discovered - "an open-directory of television shows for HTPC software". This got tedious very quickly, and was very error prone. I initially manually renamed the downloads, going to Wikipedia or TV.com to get episode names. All very efficient, but they are hardly very nice to look at. I understand why the files are named along the lines of .xvid-grp.avi - it describes the showname, what episode, what source it came from, the format, and group that captured/released it. I'm sure you will have noticed the filenames are rather horrible. I'm going to go out my way and assume you have downloaded a TV episode at some point. ![]()
0 Comments
Read More
Leave a Reply. |