Category Archives: Python

Fix TV Shows MetaData in iTunes

It’s been a while since I’ve done a good script here. My apologies. Life’s been busy. Here’s a good one some of you might like. 

For a long time I’ve been using Identify to look up metadata for videos in iTunes. It worked reasonable well. Of late though it hasn’t worked as automatically as it used to. Far too often I have to swing over to my browser, do a search in IMDB and copy the media ID from the URL, add it to Identity and then make Identify look again. That wasn’t that bad although it was kind of defeating the point of the app somewhat. Then the last few months I found it wasn’t even finding metadata for TV shows even when I put the media ID in from IMDB. Since most of what I rip are TV shows this was more than annoying.

Several people at the Ars Forums suggested I switch to Subler. This is nice as Subler’s an open source app. The one downside is that Subler is really overkill for what I’m doing. It’s designed to do a lot of the same thing that Handbrake does. In fact you can use it in place of Handbrake quite regularly depending upon what you’re doing. The problem is that Subler’s metadata tagging is really designed to be done before you add your file to iTunes. If you’re trying to fix metadata in iTunes it’s not nearly as convenient. You can do it, but it would be nice to automate the steps so you can simply select a few dozen files from a DVD rip and let it go. 

Continue reading Fix TV Shows MetaData in iTunes

Easier Copy/Paste for Scripting

If you, like me, primarily script with Python dealing with the clipboard is a pain. You can either handle it manually with PyObjC or use the deprecated Appscript. Currently my scripts are about half and half. I just noticed there’s now a library, Rich Xerox, which will take care of this for you. Unfortunately it doesn’t do conversion between rtf and html for you. But you can just call textutil from the command line to do that. 

Related Posts

  • 40
    I’d mentioned in passing in one of my Swift posts about using it as a scripting language. Someone on Twitter asked me if I’d convert from using Python to Swift for my scripts. It’s an excellent question that I really can’t answer fully at this stage. The language is still very beta. Most of the…
    Tags: python, scripts, scripting

Pythonic for Swift

Someone’s written an other great library for Swift: Pythonic. (HT: Oluseyi on ADN) It adds most of the commonly used standard Python library to Swift.

I confess I’ve been learning Swift by recreating the Python library calls that I regularly use. Mine was definitely an exploratory work though. I was mainly working in a Playground. Half the code I deleted when I was done.

Continue reading Pythonic for Swift

Related Posts

  • 42
    I’d mentioned in passing in one of my Swift posts about using it as a scripting language. Someone on Twitter asked me if I’d convert from using Python to Swift for my scripts. It’s an excellent question that I really can’t answer fully at this stage. The language is still very beta. Most of the…
    Tags: swift, python, code

My Scripts

Over at the old blog many of my posts were focused around automation and especially scripting. My scripting language of choice was Python + Appscript. Appscript is no longer supported (although I keep using it) I have switched to using a few more Applescript scripts, but I really hate that language even though I love the idea of Apple Events. I find it sad that fewer and fewer applications really are support scripting via Apple Events. I’m hoping the announcement of Javascript for Applescripting will improve this. I know I’m not alone in disliking the Applescript language while loving a lot of the technology behind it.1

Most of my scripts haven’t been updated in a while, but I try and keep the main ones on GitHub for others to use. As I make significant updates I’ll update the GitHub versions. So if you are interested in my scripts, please check out that repository. Now that Swift is becoming a bit more mature I may try doing some scripts with it in the future.

Continue reading My Scripts

  1. My favorite joke along these lines is that Perl is a write only language because anyone can writes something in it but it’s nearly impossible to read someone else’s code. (This was in the days of Perl 3) Applescript is a read only language because it’s trivial to read a program and figure out what it does but nearly impossible to easily write a script in it.

Related Posts

  • 46
    I’d mentioned in passing in one of my Swift posts about using it as a scripting language. Someone on Twitter asked me if I’d convert from using Python to Swift for my scripts. It’s an excellent question that I really can’t answer fully at this stage. The language is still very beta. Most of the…
    Tags: swift, python, scripts, scripting, code