Topic: Python Update-Gallery Script Created

For those of you who have access to python on your web hosts, I wrote (and tested!) a script today that does batch updating of /jbcore/ directories when a new version of Juicebox is released. (See "Upgrading Existing Galleries" at http://www.juicebox.net/support/#upgrade-version for a discussion of this method.)

So, the gist of the process:

- You copy the /jbcore/ of the new release somewhere on your server.
- You change a couple of lines in the script, telling it where that new folder is and where your www files are.
- The script goes through that specified outer directory, and updates all the /jbcore/ directories (and subdirectories) it can find.

I did about 50 drag-n-drop moves after the first upgrade, and didn't want to go through that again. This works for me, and if you want it, it's here: http://www.billanddot.com/jbcore-updater.py

(I'm not sure this is the proper spot to post this, so move it if you like.)

Cheers,

Bill

Re: Python Update-Gallery Script Created

I'm not sure this is the proper spot to post this, so move it if you like.

This is as good a place as any. Thank you for sharing.

However, I should perhaps point out that multiple galleries on the same domain can share a single 'jbcore' folder (simply by pointing towards it in the embedding code of each gallery). Please see here for details.
Then, when it comes to upgrading all the galleries, only the single 'jbcore' folder needs to be replaced.

Re: Python Update-Gallery Script Created

Steven wrote:

I'm not sure this is the proper spot to post this, so move it if you like.

This is as good a place as any. Thank you for sharing.

However, I should perhaps point out that multiple galleries on the same domain can share a single 'jbcore' folder (simply by pointing towards it in the embedding code of each gallery).
Then, when it comes to upgrading all the galleries, only the single 'jbcore' folder needs to be replaced.

Steven,

I was actually wondering about that - sharing and pointing. In my case, however, I've been using jAlbum to generate and upload all these galleries, so this automation certainly helps me out.

Bill

Re: Python Update-Gallery Script Created

I was actually wondering about that - sharing and pointing.

When creating a multi-gallery album with the Juicebox skin for jAlbum, the album contains only one 'jbcore' folder (shared across all galleries).
Of course, when creating multiple albums, there will be a 'jbcore' folder per album.

In my case, however, I've been using jAlbum to generate and upload all these galleries, so this automation certainly helps me out.

Hopefully, others will find your script useful, too.

Re: Python Update-Gallery Script Created

Thanks for the clarifications.

Yep, I create multiple albums. If you glance at my home page - http://www.billanddot.com/ - you'll see 39 buttons on the left. 36 of those represent separate album links, now all using the Juicebox skin. (Plus I put up assorted "temporary" pages that I don't have buttons for, which is how I wound up doing about 50 one-at-a-time updates, via FileZilla, last time.)

Bill