You are browsing the "Programming" archives.

Duplicatr 1.1


It’s been quite some time since I’ve worked on Duplicatr, my Flickr metadata mirroring project, so here’s an significant update for those that are making use of the code. This version adds a number of highly requested features:

  • Mirroring of 500+ photos
  • Fetching information about photos added since the last run
  • Tag-based filtering
  • Simplified installation and execution

Download
Duplicatr version 1.1 can be downloaded here, and a link to the most current version will always stay in the sidebar at left.

Installation
1. After downloading the package, unzip it using your preferred utility (I recommend The Unarchiver for Mac OS X, and 7-Zip for Windows — both are free) and save the files in a convenient directory in your web folder.

2. Open duplicatr_config.php with an available text editor and fill in the details for your MySQL database and credentials. Note that you must already have a database created, which can be done with any number of utilities or directly from the command line using the mysqladmin program that comes prepackaged with MySQL.

3. Also edit index.php and fill in your Flickr ID (or email address) and desired tags. Following the example in the code, you can add as many tags as you like. This may be useful if you intend to have only photos with a specific tag appear or be searchable on your site. If you don’t need this feature, they are commented out by default and won’t be used for filtering.

4. With the database ready and Duplicatr in an accessible place, visit www.your-domain.com/duplicatr/install.php, or whatever the path to install.php may end up being in your case. The install script will create the necessary tables and inform you of its results. Once completed, you can delete the install.php and go directly to index.php to kick off the duplicating!

iTunes Podcast Auto-Subscribe

A few days ago, Jon and I found the need to make iTunes to subscribe to a podcast with one click from Safari. After a few guessing attempts and some meager Googling, we were unable to come up with a solution. Today, I ran across a tutorial on how to do just that. The pcast:// prefix, instead of http:// will make the Mac version of iTunes open and subscribe to the podcast URL immediately following the prefix. For the Windows side of things, there are several more steps which involve the creation of an XML file linking to the podcast. With a little server-side user-agent switching or some other per-client trickery, it should be relatively simple to produce a Mac or Windows “one click subscribe” link. Check out the full details at Podcast Shuffle.

Dugg Stories

Dugg StoriesFor the past day or so, I’ve been thinking about creating a WordPress plugin to display recently “dugg” stories from Digg.com. Then I remembered that Digg offers RSS feeds for each individual user, so you can keep up on items your friends are interested in. Writing a whole plugin to display a simple, styled RSS feed is overkill, and more work than I want to do.

Browsing around for a simpler solution, I discovered the highly configurable Feed2JS, which will take RSS data and display it using JavaScript. After tinkering in BBEdit and Photoshop for about half an hour, I had my newly created Dugg Stories section up and running, complete with RSS caching. The results of my efforts can be seen at right (jump there). That was far easier than writing a whole plugin, doing caching, and handling XML. (If you decide to do your own Digg sidebar area, feel free to swipe my Dugg Stories header image. I may also post the Photoshop file I created, if there’s interest.)

Update
Here is the Photoshop file I created along the way.

The Next Small Thing

There’s no denying it. I love small, simple, yet functional things. Yes, the nano certainly qualifies, but shouldn’t the same apply to code? Enter moo.fx, a lightweight JavaScript library for performing Web 2.0 style effects with minimal size and effort. It takes only moments to see how to implement it, and is small enough to remove delays in downloads and execution. Released under the MIT license, you can do almost anything you want with it. If you do web development of any sort and are looking to spiff up your work, check out moo.fx.

Hi-Res iTunes Artwork

Tristan Pemble has posted some cool iTunes Music Store hacks, which include one tool that can grab the full size album artwork from any given album. All you have to do is find the album on iTMS, right click the title, choose Copy iTunes Music Store URL, and paste it into the field. It’s great for filling in missing artwork on ripped/downloaded music. Other cool hacks include a music video and movie trailer tool, and also one to view the raw XML response from iTunes’ servers (for debugging or general poking around).

9/14/04 Update
This method no longer works, but try my new PHP script here.