Spry Gallery Goods

example galleryI am moving this post here from an old blog I started a few years back which has lain dormant for a while. The one post that did garner a bunch of attention was the Adobe Bridge script I cobbled together to automate creation of the XML needed to use the lovely photo gallery presented by the developers of Adobe Spry. I’ve used this script to create photo galleries for many client sites as well as my own.

I do plan on addressing code design here, so this is an appropriate place for the script to live.

Spry is a relatively new and easy-to-use AJAX library. AJAX use is very common on the web today, one of the technologies that powers what is often referred to as “Web 2.0.”

Basically, the technology allows webpages to change and update without requiring the user to “refresh,” “reload,” or navigate to another page.  For example: Gmail, which updates every incoming mail every so often without user interaction. And saves drafts every so often in the same fashion.

Find the download link and nuts and bolts of using the script after the jump.

The script is based on one I found at the Adobe User to User Bridge Scripting Forum for exporting a CSV file. It will generate a very useful photos.xml from Adobe Bridge, which makes it very easy to add titles, keywords, ratings — all kinds of metadata that one might use in a photo gallery.

The script generates the required XML nodes for each image, such as “path,” “width,” and “height,” calculates appropriate thumbnail width & height per your chosen pixel size, and uses keywords as categories, titles as captions, and allows sorting by rating (stars in Bridge).

Note: this particular script doesn’t take into account CDATA that might exist in your metadata, like ampersands in your title. Thus far, I’ve just avoided using those, but one could also have the script write out a CDATA node for that info instead. Also, a commenter on my old post noted that the script will break if you have a folder nested inside your source folder of images.

Download the script and readme here.

To Use:

The script goes in the folder “StartupScripts” in Program Files/Common Files/Adobe/ (Windows).

(Update: On a Mac, the script goes in Mac HD/Library/Application Support/Adobe/Bridge CS3 Extensions/Bridge Start Meeting/, at least in CS3.)

Launch Bridge and browse to a folder that contains the files you want in your gallery — the “source” folder.

Choose the menu command “Tools > Export XML for Spry Gallery”.

Type a name for your XML file in the Save dialog box, choose a location, and hit “Save”.

In the dialog box that pops up, enter a max length/width for your thumbnails, in pixels. Some common sizes are “75″ , “100″ or “125″.

Hit “OK”. You should see an alert pop up telling you “XML file successfully created!”

10 thoughts on “Spry Gallery Goods”

  1. Just downloaded for CS4 on a MAC. Works very well. All the work you put into this is going to save me hours of work.

    Thank you!


  2. Jesse: You got a blank page as the result?

    I do still use the script, now in CS5, and it works fine.

    Did you have a folder nested within your source image folder? That will break the script. (I should really revisit and fix that…)

  3. This is not working for me – the script generates an XML file containing only:

    …and nothing else. Using Adobe CS4. Help?

  4. Thanks for researching where to put the script on a Mac, Nick!
    Glad the script is useful.

  5. Thank you very much for this solution! Saved me much time; works great (tag in Bridge –> export to XML –> use in Flash or Spry)!

    As follow-up, to use this on your Mac OS, drop the ‘bridge_export_xml.jsx’ file into the following directory (I’m still using CS3):
    Mac HD/Library/Application Support/Adobe/Bridge CS3 Extensions/Bridge Start Meeting/

    Regards, Nick

  6. Thanks, Ben. I switched my web host and this didn’t get re-uploaded. It should be okay now.