harim project Rotating Header Image

ZenSync2

ZenSync is a tool to transfer images from the local file system to your Zenfolio galleries. ZenSync parses the root folder and all containing subfolders for supported images and uploads all newly added images to the related gallery on Zenfolio. If images are removed from your local file system they are not deleted from Zenfolio. ZenSync helps you to keep the local image library and your Zenfolio galleries in sync.

The images can be organized in arbitrary folder tree structures as long as there is one single root folder. The tree structure of folders and subfolders on the local file system is mapped to groups and galleries on the Zenfolio account.

ZenSync is developed in PHP5 and as such runs on any desktop- or server-platform with PHP installed. ZenSync is a command line utility which can be widely configured editing one single configuration file. When creating shell scripts or links it even can be started from the GUI of the used operation system.

ZenSync was originally created by Dan Richardson. In May 2009 Harald Maida teamed up with Dan to enhance the tool and develop the new major version ZenSync2.

ZenSync2 offers a couple of new features to be usable for a wider range of use cases and better integration in various workflows. The centralized configuration offers a more comfort in user experience.

The main new features are:

  • Support of international languages in titles of photos, galleries and groups.
  • Support of all image types that can be uploaded to Zenfolio (JPEG, TIFF, PNG, GIF)
  • Support for other image types such as PCD that are converted to JPEG before uploading to Zenfolio.
  • Generating and uploading of thumbnails for AVI- and MPEG-videos.
  • Copying of a configurable metadatafield to the title field of photos.
  • Configurable default sort order for galleries.
  • Synchronization session report containing information such as number of uploaded images and average upload speed.

Download ZenSync2 from here. Current version is 20100820.24

For intructions on installing and running ZenSync2 read the README.txt in the downloaded archive.

For questions and feedback contact us here.

Additional information about ZenSync can also be found on Dan’s blog here.

There are ideas for features that may come in future versions. The top listed features are:

  • Integration with Adobe Lightroom to allow starting a sync session immediately after export from LR.
  • Create Zenfolio collections of photos from a list of images.
  • Update of images that have been modified since last upload.

Let us know what you think about ZenSync2 and write your comments and feedback here.

91 Comments

  1. free porn says:

    Can I just say what a relief to find somebody who genuinely understands what they’re talking about on the internet.
    You actually realize how to bring an issue to light
    and make it important. More people should read this and understand this
    side of the story. It’s surprising you are not more popular since you
    most certainly possess the gift.

  2. James Flanagan says:

    It appears that since the most recent Zenfolio site update a few weeks ago, that each time zensync2 is run it now creates duplicates all the photos and folder for everything that is already uploaded. Does anybody have an idea of how to fix this? Thank you.

  3. Thanks , I’ve just been searching for information approximately this subject for a
    long time and yours is the best I’ve came upon till now.

    However, what oncerning tthe conclusion? Are you positive in regards to the supply?

  4. One taste of Nana G’s waffles and maple syrup along with the chicken and
    you’ll understand why they call it soul food, as it’s obvious that a lot more than just raw ingredients goes into
    making it. It is up to you to do the work of driving traffic
    to the affiliate site. One of the major sites for handling affiliate accounting is called Commission Junction.

  5. Marylou says:

    The No Contact Rule essentially require that
    you give each other some space by terminating anny kind of contact between you and your ex
    for some time after the break-up. Wine is made by yeast acting on the sugar
    from the fruit. Make a schedule to follow for a week-
    where you will open thhe pail ojce a day and stir the juice with a plastic spoon orr clean ladle.

  6. Franklyn says:

    Also by obfuscating code before release, you can make it more
    difficult to reverse engineer important security elements.
    But here we need to understand that though Google do not reject your apps, it’s not easy to make apps in Android SDK and just launch it, and same applies to
    Android Game Development. Playing Poker against your friends
    on the Android network is the best way you can enjoy the game– and Live Holdem Poker is the best game that lets
    you play not only against your friends, but also play
    against millions of players around the world.

  7. Only few places where labour offshore company is cheap.
    As such, unfastening bank accounts are preferred not only did we have civil engineers.

  8. Jetta says:

    I read a lot of interesting content here. Probably you spend a lot of time
    writing, i know how to save you a lot of time, there is an online tool that creates high quality, google friendly articles in minutes, just type in google
    - laranitas free content source

  9. Salvador says:

    I read a lot of interesting content here. Probably you spend a
    lot of time writing, i know how to save you a lot
    of time, there is an online tool that creates high quality, google friendly articles in minutes,
    just search in google – laranitas free content
    source

  10. Preston says:

    I see you share interesting things here, you
    can earn some additional money, your website has big potential, for the monetizing method, just
    search in google – K2 advices how to monetize
    a website

  11. This is a natural occurrence and can be easily mistaken for acne.

    Splashing fresh water on your facial skin rejuvenates it and the hydration prevents acne and
    pimples. The above are just some of the most important skin care tips
    and best acne treatments to keep in mind if you have
    acne.

  12. CRyder says:

    Hi Harald. Great work on this utility! From what I can tell, it works great… except, not for me apparently. When I run your utility, it successfully logs into my account, finds the mis-matches and proceeds to do the uploads. But the uploads fail with the following error for each upload:

    ZF Error: 400 Bad Request: : /Users/booth/Desktop/PhotosOut/DSC_0093c.JPG

    Turning on debug mode hasn’t revealed any additional or helpful error messages. I’m assuming that the 400 error is analogous to a bad http request but, I can’t figure out what resource your application is attempting to access that cannot be found. Can you shed some light on this?

    CRyder

  13. Hi Harald, any chance this code can be uploaded to GitHub so other people can contribute to it?

  14. Vlad says:

    Hi, Harald. Just ran the script on a relatively small set of directories and it seems to be working great out of the box. I have a question though: is it possible to sync with Zenfolio not at the rool level (ie, under ‘All Photographs’), but at an arbitrary subdirectory (or gallery? – not sure what zenfolio terminology is for that).

    For example, i have the following local structure: //
    and zenfolio structure i want to sync into is MyCompany1/DevTeam///

    ie, i want to sync local directory tree under a subdirectory within zenfolio.

    One obvious solution is to just symlink / structure on the local filesystem. But for various reasons this is not the best solution in my case.

    Is there a param already in ZenSync I can set? If not, what place should I be looking at to apply this change? From what I see, the ‘topId’ is the place where the top level identifier is being retrieved. Is that so? What’s the easiest way to reuse DirObj in order to ‘recreate’ the remote path? (ie, create category with name /

    Thanks.

    Vlad

    1. Hi Vlad,

      Needed to upload to a specific sub directory as well. Here’s what I did:

      1. Get the ID of the subdirectory
      First, you need to know the ID of the sub directory you want to sync with from your Zenfolio.

      I added this line to zensync.php after line 95:
      file_put_contents("dump.txt", var_export($Hierarchy,true));

      Run zensync.php normally until you see “Top Id: xxx” on the terminal. You can just Ctrl+C from there.

      Open dump.txt (should be in the directory where zensync.php is) in your text editor and look for the text 'Title' => 'xxx', where xxx is the title of that subdirectory you want to upload to. When you find that line, 2 lines above that, you should see that sub directory’s Id. 'Id' => 123456789, 123456789 should be your Id.

      2. Manually set $topId
      Next, open up zensync.php again and remove the line we added on step 1 (file_put_contents("dump.txt", var_export($Hierarchy,true));). Get rid of dump.txt too.

      On line 97, Replace:
      $topId = $Hierarchy->LoadGroupHierarchyResult->Id;

      With:
      $topId = '123456789'; #$topId = $Hierarchy->LoadGroupHierarchyResult->Id;

      That should now sync whatever local directory you set on config.php to that subdirectory.

  15. I’d really like to get the zenfolio image translation from the .jpg I upload. That way I can keep the images on my site and just link users over to zenfolio to purchase. When uploading how do I capture that reference?

  16. I’m getting the following error. Any solutions? Thanks.

    Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn’t load from ‘http://www.zenfolio.com/api/1.1/zfapi.asmx?wsdl’ : failed to load external entity “http://www.zenfolio.com/api/1.1/zfapi.asmx?wsdl”
    in /Volumes/WD500/zensync2/zensync.php:82
    Stack trace:
    #0 /Volumes/WD500/zensync2/zensync.php(82): SoapClient->SoapClient(‘http://www.zenf…’)
    #1 {main}
    thrown in /Volumes/WD500/zensync2/zensync.php on line 82

  17. Miss(ing) Directory says:

    Harald,

    Thanks that worked great I can now login and upload files. This is a great tool.

    Well… I can upload small jpegs. If I try to upload Jpegs that are about 5mb in size and 5270 pixels wide I get these errors…

    has 0 subdirectories
    Creating Gallery: stuff
    -> returned Gallery Id: 243729634
    Set sort order for PhotoSet 243729634 to FileNameAsc
    Uploading Scan0001.jpg (5270306 Bytes) to Zenfolio…
    -> returned Photo Id: 936047709

    Fatal error: Uncaught SoapFault exception: [HTTP] Failed Sending HTTP SOAP request in /Volumes/SSPvol1Drobo/zensync2/dirobj.class.php:411
    Stack trace:
    #0 [internal function]: SoapClient->__doRequest(‘__call(‘LoadPhoto’, Array)
    #2 /Volumes/SSPvol1Drobo/zensync2/dirobj.class.php(411): SoapClient->LoadPhoto(Array)
    #3 /Volumes/SSPvol1Drobo/zensync2/dirobj.class.php(134): DirObj->UpdatePhoto(Object(SoapClient), ’936047709′)
    #4 /Volumes/SSPvol1Drobo/zensync2/dirobj.class.php(76): DirObj->ScanDir(Object(SoapClient), ‘IeOR4PuyFHy4IMl…’, NULL, Array, Array, ‘stuff’)
    #5 /Volumes/SSPvol1Drobo/zensync2/dirobj.class.php(70): DirObj->ScanDir(Object(SoapClient), ‘IeOR4PuyFHy4IMl…’, NULL, Array, Array)
    #6 /Volumes/SSPvol1Drobo/zensync2/dirobj.class.php(44): DirObj->ScanDir(Object(SoapClient), ‘IeOR4PuyFHy4IMl…’, Object(stdClass), Array, Array, ‘upload to zensy…’)
    #7 /Volumes/SSPvol1Drobo/zensync2/zensync.php(108): DirObj->Lo in /Volumes/SSPvol1Drobo/zensync2/dirobj.class.php on line 411

    Any hints there?

    1. Harald says:

      This is a sporadic problem of the connection to the Zenfolio server. It impacts the feature that updates the title of just uploaded photos with the values set for the parameter ‘photo_title_default’ in config.php.

      With the great help of Lars who reported this issue I could find a solution that retries once a failed loading of photo details and continues with the script. Only if the second attempt fails the photo title is not updated according the settings in config.php.

      If this parameter is left on the default setting ‘photo_title_default’ => “” then this issue is not relevant because actually the script leaves the title untouched and the preferences on the Zenfolio account are effective.

      If someone faces this problem download the new version of ZenSync2 from the download link provided on this page above and replace the file dirobj.class.php in your setup with the one from the Zip-archive.

  18. Miss(ing) Directory says:

    Hi,

    I keep getting this error…

    Getting user’s existing Hierarchy

    Fatal error: Uncaught SoapFault exception: [zf:E_NOSUCHOBJECT] 50018: There is no such folder. in /Volumes/SSPvol1Drobo/zensync2/zensync.php:94
    Stack trace:
    #0 [internal function]: SoapClient->__call(‘LoadGroupHierar…’, Array)
    #1 /Volumes/SSPvol1Drobo/zensync2/zensync.php(94): SoapClient->LoadGroupHierarchy(Array)
    #2 {main}
    thrown in /Volumes/SSPvol1Drobo/zensync2/zensync.php on line 94

    the config file looks like this….

    #
    # Specify your image depot directory
    #
    “localpath” => “/upload to zenfolio/”,
    “title” => “”,
    #

    and yes there really is a folder called “upload to zenfolio” with the images in it in the same folder as zensync.php

    any ideas?

    TIA

    1. Harald says:

      The operation that fails is loading of the Group Hierarchy from Zenfolio. So I guess the error message from Zenfolio is missleading. Did you double check if you specified the correct login name (parameter “userlogin” in config.php? You also need to specify the title of an existing group in the “title” parameter. This group is the one that will be synced with the “/upload to zenfolio/” folder.

Leave a Reply to Preston Cancel reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>