October 2005
Sun Mon Tue Wed Thu Fri Sat
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31          
Sep   Nov

©Copyright: 2005
Steve Kirks

Click here to visit the Radio UserLand website.

Click to see the XML version of this web page.

Subscribe in Bloglines

Subscribe to "house of warwick" in Radio UserLand.

Click here to send an email to the editor of this weblog.

Favorite Things:

Blogroll:

miniXmlCoffeeMug.gif miniXmlButton.gif jwz
miniXmlCoffeeMug.gif miniXmlButton.gif NI3
iPhoto Tool

Make the picture tool hook into iPhoto library on a Mac--it's XML after all. All of the information you need to display previews and help a user select what to upload, all without duplicating photos and without duplicating effort.

Steps:

  Check for Mac or PC. 

  If PC, fail with friendly error message--iPhoto is on the Mac only.

  Declare variables 

  More here as I figure it out.

  Read prefs table 

  Prefs contain:

  Location of iPhoto library

  This will let the user select multiple files of AlbumData.xml. Save this for version 2.0 of the tool

  Scan for changes to file?

  This means that Radio will watch the library folder for changes and update the existing table with file locations. That way, when the user hits the desktop webpage, the data will be current. Also, it will save needless CPU cycling.

  Upload location?

  Allow user to change the upload location. This is a tool to manage iPhoto uploads, so let's not make it all about Radio weblogs. Some may want to use this for Manila (see below) or just to manage photos for eBay auctions.

  What if the user is trying to send these to a Manila site? Dave has some code (somewhere) that uploads pictures to Manila sites, attaching multiple photos to a single message. It would be easy to modify the code to allow the user to select photos and create gems for each one.

  List of files

  Two types: uploaded and selected. Images are uploaded at the next upstream interval. When successful upload occurs, filenames move to selected status.

  Uploaded Images--images that were previously selected and then upstreamed to the destination. This would prevent needless file duplication when pictures are upstreamed.

  Selected images--images that were selected via the desktop website tool page. Storing this here means that you can separate the upstreaming task from the selecting task, respecting the master Radio pref about "Upstreaming enabled?".

  Example: I take a bunch of digital photos and iPhoto pulls them from the camera onto my laptop. If the tool is watching, it won't upstream files (or frankly do anything) if the upstream is disabled at the Radio level.

  Radio parses the XML. 

  Now it knows the images, the names, the file locations *and* the thumbnails, too. iPhoto built those for us already.

  You would use xml.compile and file.readWholeFile to pull the XML into a table. Sor

  Generate a desktop website page 

  Users pick an album or select a photo by selecting a checkbox next to the thumbnail. Once more, the thumbs are coming from the user's local HD. Radio is just parsing XML and creating a HTML desktop website page.

  Only do 10 or so pictures at a time. Display title, album, date/time underneath the thumbnail.

  User hits button to select and generate a new page

  This also saves a list of selected photos into table under prefs.

  Next, once the user has selected the photos:

  Upstream now or later

  Thumbs, originals, both

  Upload 

  Radio builds shortcuts, uploads the images and deposits them in the images folder. Easy way to do this is upload straight from the file system location, not duplicate into the images folder for upstreaming. No sense in crashing a user hard drive during the copy process, eh?