Google Reader JSON the HTML Converter

Well, since Google Reader is ceasing to exist, it became time to change services. My choice of services was to move over to Feedly. Mainly because of the extremly easy transition. However, my starred and shared items did not carry over. After performing an export of my Reader data with Google Takeout, I had the data on my computer, but in a rather useless format. So, after some fruitless searching for a solution, I headed over to Applescript. The result, the Google Reader JSON to HTML Converter!

Once downloaded, simply drag’n’drop the JSON file onto the application and wait. Depending on the size of the file, it may take a while. If you wish to see how it’s progressing, open up the console and look at the log file. Once done, a new HTML file will appear in the same folder as the original. This can be opened in any web browser and you will get the title and first link of each item.

I’ve tested with only the starred and shared items, since those are the only ones I had items in. I’m guessing it will work with the others though. This is open-source, so you can open it with AppleScript Editor to see the code. Give a shout if this helps you out!

Handling multiple iPhoto Libraries via AppleScript

After awhile an iPhoto library and the Pictures folder can get quite cluttered with pictures from many sources. One way that can make this easier to handle is to use multiple libraries to keep things separated. I use three different ones myself. To create a new one or switch between different ones, just hold down the option key while opening iPhoto and a dialog box will prompt you for what you want to do.

However, switching between separate libraries using this method can quickly get to be a pain. I’ve written an AppleScript to help with this. Download the iPhoto Library Launcher, open it in the Script Editor, modify the libraryPath to refer to your library, and then save it. iPhoto won’t allow you to have multiple libraries open simultaneously, though the script should detect if another library is already open. If that’s the case, a dialog box saying “About to quit iPhoto!” will pop up and the user can choose to cancel or continue. If no choice is made within five minutes, the script continues launching the new library.

Switching Users via Applescript

In Mac OS X it’s pretty easy to switch users with the Fast User Switching icon in the menubar. However, if you wish to do it via the Dock or via a keystroke, you need to create a small AppleScript. This comes in handy for me when I want to log into the GUI as root. Since the root account will not show up under the menubar icon, you can use this to attain easy access to it. See this Apple Support article to learn how to enable the root account. Warning! Don’t use the root account if you don’t understand it!

First, open Universal Access control panel in System Preferences and check “Enable access for assistive devices”.
Next, download the AppleScript User Switcher.
Open the script in the Script Editor and modify the password and username to suit your needs.
Save and you’re done!

The original script and process was found at Mac OS X Hints. I’ve modified it slightly above.

AppleScript Applications – Hiding the dock icon

AppleScript is useful for all kinds of little tasks. If you’ve created one that you run fairly often, but do not want it to appear in the dock, there is an easy fix for that.

First, save the AppleScript as an Application Bundle. As a side note, saving as an Application creates a Power-PC application that will launch slower on Intel machines. An Application Bundle creates a Universal Binary which will launch faster and is required anyway to hide the icon. See this Mac OS X Hints article.

Second, you must modify the applications Info.plist file. This can be found by right-clicking the app and selecting Show Package Contents. The file can be found in the Contents folder. Add the lines

just above the line that reads as <key>WindowState</key>. Save and you’re done.

Another option is to download Icon Hider and drag’n’drop your application to it. I included the code, so if you wish to see it simply drag’n’drop the app to the Script Editor. Beware, though, after editing a plist file with Icon Hider the plist file will not appear correctly in TextEdit. It works fine though in Mac OS X 10.5.