Category: Tips

Earlier I wrote an Applescript that goes online to and finds the episode titles for TV show video files. While that seemed to work properly, changed their format and my Applescript went kaput. Since I really wanted to have this process automated, I wrote a bash script to do the same thing with the command line.

The result is a Ubuntu bash script that renames all the formatted files in a folder with the actual episode titles. Right now it requires Linux because it uses wget and XMLStarlet to download the file data, but I may release an additional script that works with other systems.

The entire script is made possible by the excellent XML feed service by

Download the script


XMLStarlet is a small command-line utility that can process XML files and text. It is required to traverse the XML structure of the data. To download this utility in Ubuntu, simply use the repositories.

sudo apt-get install xmlstarlet


Change paths where appropriate.

  1. Save the script to a known folder, change into that folder, and make it executable by issuing the following command
    chmod a+x ./
  2. Change the current directory to the folder that contains the video files.
    cd Television/Season\ 1
  3. Rename all the files in the folder to use the format SxxExx.extension
  4. Call the script and append the name of the show to the end of the command.
    /path/to/script/ Simpsons
  5. Watch as the shows all magically change their name.
    Downloading show data for 'Simpsons'...
    Downloading episode guide...
    Simpsons - S08E01 - Treehouse of Horror VII.avi
    Simpsons - S08E02 - You Only Move Twice.avi
    Simpsons - S08E03 - The Homer They Fall.avi
    Simpsons - S08E04 - Burns, Baby Burns.avi
    Simpsons - S08E05 - Bart After Dark.avi
    Simpsons - S08E06 - A Milhouse Divided.avi
    Simpsons - S08E07 - Lisa's Date with Density.avi
    Simpsons - S08E08 - Hurricane Neddy.avi
    Simpsons - S08E09 - El Viaje Misterioso de Nuestro Jomer (The Mysterious Voyage of Homer).avi
    Simpsons - S08E10 - The Springfield Files.avi

If you wish to access the script simply by typing the name (tvrenamer, for example) simply issue the following two commands:

cp /path/to/script/ /usr/local/bin/tvrenamer
sudo chmod a+x /usr/local/bin/tvrenamer

From this point, you simply need to use tvrenamer "TV Show".

The script reads all files in the folder, but will only rename files that are in the S**E** format. TV show titles must have escaped spaces to properly search for the show, or be surrounded in ” quotes.

Tagged with: , , , ,

Just like the dreaded Blue Screen of Death, a kernel panic can strike fear into the heart of even a seasoned computer user. This black and grey screen suggesting that you restart your computer in multiple languages signals that the computer has done something that just does not compute.

Rather than pass it off as a single event and move on, it is in your best interest to determine what is causing the problem and banish it to the land of /dev/null (that’s Nerdspeak for garbage can).

Here are some suggestions for ridding your computer of this evil.

Check hardware

According to Apple, computer memory is a common cause of kernel panics, so it is suggested that you test your computer. A free utility to do this is Rember. It tests the RAM and can often find errors. If you are using third-party memory, double check the specification as incompatible RAM can cause unusual behaviour.

Can you recreate the error?

The whole idea from this post came from the fact that my computer gave me a number of kernel panics whenever I unplugged my USB hub that had an external drive on it. I still have yet to pinpoint the exact problem, but knowing approximately what could be causing the problem can go a long way to finding a solution. Once you have the hardware picture, you can search through Google to find other users who may have the same problem, and possibly offer a solution.

Any new software?

If the kernel panic comes shortly after a new piece of software was installed, it is quite possible that is the problem. Of particular concern is programs that install themselves in the startup items folder for launch at login. The startup items folder is located at Startup drive / Library / StartupItems and needs to contain ArcanaStartupSound as this is the computer boot sound. Anything else that looks unfamiliar can be moved outside the folder. Restart the computer, and see if the problem occurs again.

No one likes it when their equipment malfunctions, but like many other computer-related problems, a little thinking and troubleshooting can restore your computer to its former condition.

Tagged with: , , ,

I’m writing this today as a public service. You may notice that your mail client typically contains 3 address entries: To, CC, and BCC.

To is self explanatory, but the other two are often misused. CC, or carbon copy, sends the same message to whatever addresses are in that field. What people often forget is that everyone who receives the email can view all the addresses associated with the message. To solve that problem, every email client uses BCC or blind carbon copy. This sends the same message to all the addresses, but hides them so that it appears that they are the only one receiving the email. This is great for sending a message to your entire address book without everyone knowing who you have contact information for. Sadly, spammers have also capitalized on this feature, as many now send messages in this way.

Next time you send emails to multiple people, remember the benefits of using BCC. Otherwise, people may know you’re friends with

Tagged with: , , ,

With the transition to Intel processors, Apple made it easy for users to dual-boot Windows and OS X on the same computer. Earlier I gave some suggestions of which method to use, and also fix the install problems when using Boot Camp. Now I’d like to back up just a little and add 2 suggestions if things don’t go as planned.

Unplug everything

On that same installation, we made it to the configuration panel of XP, but we were unable to make any changes. After restarting the procedure a number of times, we realized that having peripherals connected to the MacBook was the cause. There was a USB mouse and printer/scanner/copier connected, and apparently XP uses whatever external devices are connected, but it doesn’t load the correct drivers, leaving your inputs in limbo. Unplug whatever devices you have plugged in, use the internal controls and continue as usual. If you’re using a desktop Mac, the drivers should load properly and you can use your keyboard and mouse without problems.

Use a copied disk

When I was installing XP on a friend’s MacBook using a brand new disk, the installer would never get to the good part. It would always lock up and force a restart to do anything. Shortly after I cruised the forums in search of a solution and noticed that people were having trouble with disks that used the Microsoft hologram on them. As strange as it sounds, I copied the disk to another blank one, and the drive read it without issue! Copying can be done with a single burner computer with software like Toast, or with another computer with dual drives. Somehow the shiny finish must interfere with the drive mechanism.

Hopefully these two suggestions help you with what can sometimes be a troublesome installation.

[tags]Boot Camp, MacBook, Intel, Windows[/tags]

Tagged with: , , ,

Whenever a new operating system comes out, many people enjoy peeking around the internals to see what sort of treasures lie beneath the shiny exterior. Nerdy, yes, but in the case of Leopard, that searching yielded some very cool results.

You may notice from browsing around the site that I like to use illustrated icons with posts. These icons were all found in a single folder hidden among the Leopard system files. The folder contains high-quality 512×512 pixel icons of computers and nearly any image used in the OS itself.

I learned about this trick from MacOSXHints, and if you’re interested in checking out the icons yourself, here is where you can go.


This location can be copy and pasted into the Go to Folder window under the Finder Go menu, or can be navigated manually. CoreTypes.bundle actually appears as an application, so you need to right click it and choose Show File Contents. Open any of the icons in Preview and you can save them in any format you wish.

[tags]Mac OS X, Leopard, Preview[/tags]

Tagged with: , , ,