Fernando J. Pereda’s blag

September 15, 2008

iPhoto movies in FrontRow

Filed under: blag — Tags: , , , — Fernando J. Pereda @ 5:33 pm

Ok, so we all know that Apple makes software, and that its software is sometimes full of fail:

Even if their software usually integrates nicely, it really irritates me that some details are completely left out. For instance, iPhoto will import and manage movies from a digital camera. Then, when you are going to show the photos to the family with, for instance, FrontRow, the movies won’t come up. They’ll be ignored in the ‘Photos’ tab, and nothing will show up on the ‘Movies’ tab either.

Oh well, bash comes to the rescue:

iphoto2imovie()
{
	local DEST="${HOME}/Movies/iPhoto Movies/" d
	rm -rf "${DEST}"
	mkdir "${DEST}"
	find "${HOME}/Pictures/iPhoto Library/Originals/" \
		-iname '*.avi' -or -iname '*.mov' | while read f ; do
		d="${f%/*}"
		d="${DEST}/${d##*/}"
		mkdir "${d}" 2>/dev/null
		ln "${f}" "${d}"
	done
}

I just hate to have to do this by hand.

— ferdy

Advertisements

1 Comment »

  1. Why are you referencing your bash variables like that? It enables pe needlessly? Each reference you make to it, although this is pedantic, adds about 2ns to your script execution time.

    Comment by neeko — September 22, 2008 @ 10:58 pm


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: