Entries Tagged 'Hardware & Software' ↓

Errors importing iCal data (iCalendar) into Google Calendar

While attempting to import iCal export (.ics) files into Google Calendar, I’ve encountered the following errors:

  • Failed to import events: Unable to process your iCal/CSV file. (Google, Bing)
  • HTTP/1.1 403 Google Calendar doesn’t support storing of “To Do” (VTODO) components (Google, Bing)

It appears as though Google Calendar is choking on both the VTODO and VALARM stanzas within the export file.

VTODO data is easy to remove, as it will appear near the end of the export file.  Find the first instance of “BEGIN:VTODO,” and remove all data beginning with that line and ending with the final “END:VTODO” instance (take care not to delete the “END:VCALENDAR” line, as it will invalidate the export).

VALARM data is problematic, as it is nested within each VEVENT stanza.  Depending on the size of the export file, it could easily contain hundreds or thousands of these.

The fast and dirty solution is to remove these elements from the iCal export file, and then import the “clean” version into Google Calendar.  Note that imported events in the target Google Calendar will no longer contain alarms–these events will need to be updated manually, if desired.

Following is a simple Python script that will remove these stanzas and produce a new file that should import properly.  After downloading, be sure to edit the INFILE variable at a minimum.

Head on over to Code for the latest version (iCal-to-GCal).

It’s worth noting that this script can be used to quickly remove data from any file that contains similarly-formatted information.  Just update the TAGS list accordingly.

UPDATE01: Wondering whether the integration of Tasks into Google Calendar will alleviate the VTODO handling issue?

E-mail items to Instapaper

I use Instapaper every day, as a means of saving off pages that I come across but don’t have the time to read/evaluate immediately.  And when I’m working on a computer this is all well and good–the Instapaper bookmarklet allows me to save pages quickly and move on.

The problem arises when I’m viewing content on my mobile phone, as the concept of a bookmarklet in any mobile browser that I’ve had the pleasure of using does not exist.  To make matters worse, I’m one of the five or six people on Earth who does not own an iPhone.  So, the surely-pleasant Instapaper apps are dead to me.

For some time, I’ve been using the “Send this Page” functionality built in to my mobile browser to e-mail pages to a mailbox for further processing.  Some simple mailbox rules and a short list of known source addresses make this a viable solution.  Unfortunately, viable is never good enough.

To scratch this itch, I’ve thrown together a small collection of scripts that will:

  1. Retrieve messages from an IMAP mailbox (this needn’t be a dedicated inbox–a specific folder, Gmail label, etc. will suffice).
  2. Validate senders using a whitelist.
  3. Extract things that look and smell like URLs from message bodies (should handle crappy HTML messages, too).
  4. Submit URLs to Instapaper.

Surprisingly, it works (for me).  Requires Python 2.5+ (haven’t tested with 3.X, but should work), and an IMAP-enabled mailbox of some sort.

Head on over to Code for the latest version (IPMailer).

Purging the NewsFire feed list

Install NewsFire on OS X and import hundreds of feeds that you no longer care to read? Frustrated by the lack of multiple-select support in the feed list (but not complaining because NewsFire is otherwise bad ass, and free)? Too lazy to press [Command+Delete]+Enter until the list is empty?

The file that you’re looking for is located at /Users/[USER]/Library/Preferences/org.xlife.NewsFire.plist, and is best edited with PropertListEditor.app.

If you want a complete purge, delete the Feeds array, and create a new one in its place.

This tip brought to you by fs_usage -ew | agrep -i 'newsfire;open'.

Importing video from Sony HDD Handycam to Mac OS X 10.5.X

It’s 2008, and this is what I have to do to get video files off of my Sony DCR-SR82 HDD Handycam, and into an iMovie-digestible format:

  1. Download video from the camcorder using the Sony-provided HDD Handycam Utility (crap) within a Windows VM.
  2. Move videos from the offload directory to ~/Movies/Sony Handycam/Originals on the host system.
  3. Send the offloaded .mpg files to VisualHub (MP4, highest quality, H.264 encoded), saving to ~/Movies/Sony Handycam/Exports.
  4. Open iMovie and import Exports/* as new iMovie event, allowing iMovie to move files from Exports to ~/Movies/iMovie Events.

Sony: Please stop sucking ass, and produce some useful software for the creative world’s most popular operating system.

Apple: Please stop sucking ass, and build MPEG-2 handling and playback capability into iMovie and Quicktime, respectively.

UPDATE1: About the MPEG-2 component included with iMovie ‘08

UPDATE2: After raising a stink, I figured that I’d spend a little more time trying to figure out how to make my Handycam work with native iMovie ‘08. Turns out that you have to turn on the camera, wait for OS X pick it up as a USB storage device, and then hang tight for three or four minutes until iMovie detects that your USB storage device is actually a camcorder, and presents the import dialog. I’m glad that I can import native MPEG-2, but am somewhat puzzled by the delay.