Running on XP

March 2nd, 2008

There was a request for instructions on how to run Zensync on Windows, specifically XP.  Someone has previously sent me info that it worked, and since I never tried it, I just assumed it did.  And it does - it’s just not obvious if you’re not a PHP coder like I am.  So, since my daughter is sick and I’m at home on this nice Sunday, I figured I’d give it a shot.

 Here goes:

First, get the PHP executable from here: http://us2.php.net/get/php-5.2.5-win32-installer.msi/from/a/mirror

Install as normal.  Since you probably aren’t running a webserver for this, select, “Do not set up a web server”.  Next, hit the “+” on PHP->Extensions and scroll down to SOAP, and select, “Will be installed on local hard drive”.  The installer should proceed like any other after this.

Next, unpack the Zensync.tgz file, I use Winrar from here: http://www.rarlab.com/, but Winzip would probably work, too.

Now, set up a photo directory in a manner that you are going to use Zensync.  This is totally up to your taste.  I just make a directory in the same location that Zensync.php is, and copy all my photos there.  This really makes it easier on a Windows machine, since you don’t have to account for drive letters (C:, D:, etc..) when you configure Zensync.

Copy, copy, copy, organize, rename, move, shuffle, etc…

Now you need to edit things.  You need to know your Zenfolio username (NOT e-mail!), and password.  You also need to know the location of your photos.  Right-click on “zensync.php” and select Open With…, and Choose Program.  Select WordPad, otherwise the formatting will look terrible.  Edit these 3 lines to reflect your account.  The local directory name could be “photos”, if you want to make it really easy. 

$userlogin = “username”;
$userpass = “password”;
$path = “local directory name”;

Finally, if you want the warnings to not show, go to Start->Programs->Php5->php.ini.   Find this line: “error_reporting  =  E_ALL” and change it to “error_reporting  =  E_ALL & ~E_NOTICE | E_STRICT”.  PHP is very strict on its error reporting, and this just relaxes it a bit.

Now, go to Start->Run, and type “cmd”.  A terminal should open up.  From here, navigate to your Zensync directory (”e:\”, and “cd zensync” if it happens to be at “e:\zensync”).  Now, just type “php zensync.php” and it should run!

You could make it a one-click deal, too.  Just right-click on Zensync.php, and “Open With…” and “Choose Program…”.  Browse to “C:\program files\Php” and select “php.exe”.  Check the “always use this program…” checkbox if you want to make this permanent.

That should be it - I created a test Zenfolio account just now, and it uploaded all my photos.

-Dan

About ZenSync

November 6th, 2007

ZenSync is a tool to help move your photos from your computer to Zenfolio.  It is run from the command-line and syncronizes your photo collection each time it is run. Zensync goes down an entire directory and uploads only those photos that are not already on Zenfolio.  It doesn’t matter how you organize your photos — they just need to be in a single directory tree.  If you are hosting your own photos, using Gallery, or Coppermine, this would be a great tool to help transition to Zenfolio.

 Folder & Zenfolio

It is written in PHP5, and can run on any operating system that has PHP5 installed.  It has been tested on Ubuntu Linux, and should not require any non-standard modules installed to run it.  The code should be pretty easy to follow and modify.

Code Output 

Optionally, it will use ImageMagick’s ‘convert’ command to convert PhotoCD images to JPEG’s, and FFMPEG to create Video thumbnails of AVI files it encounters.

Get the code here: Zensync.tgz

ZenSync Release!

October 25th, 2007

Well, ZenSync was working pretty good, but I wrested the remaining kinks out of it, and it’s working just fine to make it the release!  Hooray!  Get it here:

 http://www.plymptonia.com/zensync.tgz

This release syncs with Zenfolio, creating Albums and Galleries on the fly, skipping over those AVI files that we all love to make with our Point & Shoots, labeling your photos with their filename, and generally allowing you to just fire-and-forget.  Whenever you sync again it just uploads all the new files and skips over the current ones.

What it won’t do is delete a file on Zenfolio if you’ve deleted it from your directory, nor will it know if you changed an existing file and replace it with the new version - you’ll have to manually do that yourself.

But other than those caveats, it’s a nice little program.  I have it running over on my account at Dreamhost and it is pretty smooth and fast.

Enjoy!

-Dan

PhanSync Release!

October 22nd, 2007

Well, I finally got down and dirty with PhanFare and polished up PhanSync nice and shiny.  It now works just like ZenSync (and rsync for that matter).  It’s very robust, and I have been uploaded images and videos to PhanFare without any problems.  With this release, I have also removed any external module requirements (yeah!), so that it just uses standard PHP5 and HTTP calls to send photos & videos.  This was a good change, and fairly straight-forward since PhanFare’s upload API isn’t complicated.

So, with that said, here’s the link:

http://www.plymptonia.com/phansync.tgz

All you have to do is unpack, and edit phansync.php with your username, password, and point it to a directory you want to traverse.  Read the header in that file for more information on what directory structure it expects.

It works on Ubuntu Linux, and is fine on hosted servers (tested on Dreamhost).  Now, get those files off of your gallery script and on to PhanFare!

 See ya!

-Dan

ZenSync Beta 1

October 10th, 2007

Yeah, Beta!

I tackled quite a few things to make this new release pretty darn good.   I also changed the name to reflect the functionality - instead of blindly sending photos to Zenfolio, it acts more like Rsync in that it doesn’t create or send what is already there.  (hence, the new name - ZenSync - RSync for Zenfolio).

 Here’s what it does:

1. Takes an entire directory structure, and uploads to your Zenfolio account

2. Automatically converts PhotoCD files to JPEG (3072×2048 resolutuion) and uploads

3. Skips any non-JPEG or converted JPEG files

4. Each directory corresponds to a Group, each batch of files represents a Gallery.  In the event a directory does not have any sub-directories (it’s the tail), it is labeled a Gallery.  This was a tough decision - since you might want to add sub-directories later on, I originally created a default gallery of “Photos” beneath the directory - but this added an additional click, looked ugly, and just didn’t sit well with me.  Your mileage may vary kinda thing, but I think it looks better this way.

5. Checks the Zenfolio structure you have before creating new Groups or Galleries.  Checks before uploading photos, too.  This way you can now interrupt that massively long initial sync in order to shut down your computer, etc.

I’ve uploaded it to a proper directory, so you’ll have to download and extract it before checking it out. 

http://www.plymptonia.com/zensync-b1.tgz

Get the latest version at http://www.plymptonia.com/zensync.tgz

To Do: I want to create thumbnails of Video files and embed a clickable link in the comment section of that image to point to YouTube, or some other video hosting site.  I’d then automatically upload (or convert and upload) the file and send it to that service.  Haven’t found a service that isn’t riddled with ads that has an API for uploading Videos - still checking into that.  

-Dan

PS: I’ve also realized that this should run natively on a Mac (you’ll need ImageMagick if you have any PhotoCD files) from the command-line.

Phanfare Uploader Alpha 1

October 7th, 2007

Well, despite my flu, I also worked on my Phanfare bulk uploader as well.  Some of the nice things about Phanfare are that they are inherently date based - all albums are surrounded by date.  This is nice because they have only albums and sections of albums, so you can’t have too many sub-sections.

It was a bit tricky to get my date-based and non-date based directory trees to work, but it seems to be going well (I’ve had an upload going for some hours now, a few bugs, but it is soldiering on).

It performs pretty well so far - it will dynamically convert PhotoCD files to JPEG’s and upload them, it will seek out AVI files and upload them appropriately, and manage the directory heirarchy fairly well.  Still some bugs, but it is uploading files at the moment.

dirclass.inc

phanlogin.inc

phan.php

As my time is running out with my trial with Phanfare, this might be the end of the road for this development.  I really enjoyed working with this API, especially the flexibility allowed with the uploading of Videos - nice!

-Dan

Zenfolio Uploader Alpha 1

October 7th, 2007

Well, had the most horrible flu this weekend, and while flat on my back, doped up with whtever was around to make my will to live hang on, I created the first pass of my Zenfolio uploader.

 It’s not polished in anyway way, there is no error checking, and it doesn’t check to see if you have uploaded anything previously (yet).  What it does is take a heirarchical directory of files - JPEG’s, and dynamically converts PhotoCD’s there are any - and tries to match that structure to Zenfolio.

It’s main reason for existing is for moving large quantities of photos from a server or a workstation that have been previously organized in a file-structure, but need to be also need to be published to Zenfolio - and to have the process be as automatic as possible!

Zenfolio is neat, if that you can have unlimited nesting of your albums, so you can go deep in your heirarchy.  As for recomended structure, here’s what I have:

1 set of directories fashioned like this:

Year->Month->Event->Subevent->SubSubevent

The other set is organized less date-like:

Person->Event->Subevent->SubSubevent

There are some sets of photos I want to associate with me, my wife, a certain event, etc.

Something I haven’t figured out yet is how to make a Photoset (Gallery) instead of a Group and then a default Photoset when you reach the end of a directory tree.  This would possibly make it look much cleaner.  It’s on the to-do list.

I was able to upload about 2.8 Gigabytes of files before it segfaulted - I think Convert must have choked on a bad file.  That’s not too shabby, but there’s still more work to be done.  Hopefully this is a leg up for someone else.

zensend.php

zenlogin.inc

dirclass.inc

As always, enjoy!

-Dan

For those suffering with PhotoCD Files

October 7th, 2007

I believed the word - Kodak, the king of Imaging, created the PhotoCD format for archival purposes.  The CD was even supposed to be archival quality!  For years, I developed my film direct to PhotoCD - the image quality WAS impressive - 6 megapixel “scans” without any dust or scratches!  It made the 2 week development wait worth it.

Then a few years after that, I bought a ridiculously expensive slide scanner - Nikon Coolscan 2000 - with an even more ridiculous feeder attachment.  I ended up scanning about 1/2 of my families slides from the ’70’s and ’80’s.  Oh, and I of course made them all in PhotoCD format (thanks to Image Workshop Professional! http://mindworkshop.com).

 But now that I’m moving away from hosting my own photos and on to a real hosting site, all those PhotoCD’s have to be converted, organized, etc.  Yikes!

Two things that will make that happen: Imagemagick (http://www.imagemagick.org) and a simple command:

convert -size 2048×2048 IMG0001.PCD /tmp/IMG0001.jpg

That command from a shell prompt will give you a “native” 3072×2048 (or 2048×3072) JPG image in your temp directory, which you can happily upload to Smugmug, Zenfolio, Phanfare, etc…

The next piece of advice is a bit of code - finding the date of development in those PCD files - I made this script with the help of fellow PhotoCD Enthusiast Ted Felix (http://www.tedfelix.com).  With his help I was able to crack the hex code embedded in all Kodak developed PhotoCD images.  Now, with a simple script you can at least track down when you DEVELOPED that roll of film.. lord knows I sat on a few rolls before developing them, but that’s something left alone… :-)

Pcdseek.php

-Dan

Opening the pearly gates at Zenfolio

September 26th, 2007

Ahh.. heaven awaits all those who persue pure knowledge!

I have cracked (bad choice of words) figured out how to login to Zenfolio using PHP.  Attached is a stub script.  I plan on creating a whole API wrapper at some time, but for know this is a start.  The SOAP interface looks REALLY cool - once you get past this ugly login token thing (a necessary evil, I know).  Anyway, why you have to unpack and repack the Challenge, I’ll never know, but it works - I get the prized token with which I can manipulate my account categories, files, etc.

Zenlogin.php

Yeah!

-Dan

Why Capturing Life?

September 20th, 2007

I dunno.  Waking Life came to mind, in that it was a pretty trippy movie I… still.. haven’t seen.  Done by the same guy who did “A Scanner Darkly” and Slackers… Linklater.  Anyway, trippy is how I’ve been feeling lately.  At 36, I married the woman I’ve sought for so long, finished school in a field (I think) I will really enjoy, moved into a house that (unfortunately) wasn’t the best choice, and created a new life which has challenged me to really question who I am and what I want out of this short life that we all experience before returning to a state in which we don’t exist again.

 That’s all pretty heavy stuff.

 So, why Capturing Life… dunno.  I like taking pictures - capturing a moment in time.  My memory is not so great as to be able to remember everything I’ve experienced, but I’ve found that by having seeing a photo, I can re-experience that event and fully recall it.  And, since most people generally take photos of happy events, I get to remember all the happy things in my life.  Over, and over.  :-)

That said, I’m trying to move my life.. my collection of photos and videos.. over to some photography services (SmugMug - http://www.smugmug.com and PhanFare -  http://www.phanfare.com) to take a bit of the burden away of maintaining my own server, etc.  Getting 21 GIGS of photos over this small straw of an internet connection I have is going to be an interesting challenge, but i digress.  This blog is going to keep a record of what I had to do.  Who knows, perhaps someone else can use the info.

-Dan