Fun in the Jungle

Tanzanian sunshine

What the dummies do when we’re not looking….

Photo

As seen on Regent’s street just before Christmas.

Posted via email

Colours

Image

Posted via email

colours

Image

Posted via email

Publishing Aperture libraries on local network and sharing between two or more people

A fun project at B-P Towers: making our expanding photo collection browsable over the wireless local network – so we can use any of our devices (phones, ipads, laptops) to view our photos.
 

I use Aperture (Apple) to manage my photos. But there are two of us in this house (!) and 4 cameras and lots of photos and many devices on which to consume those photos. And Aperture seems to be resolutely stuck in the 1980s when it comes to such extravagance and only really supports one user and one computer…
 

Our requirements are:
  • Each take our own pictures and be able to identify them (keep the upload and management of them separate basically)
  • Simple workflow for photo upload (from camera) that we can each do whenever we want
  • Secure backups
  • Ability to view (and ideally rate) from any device
Aperture

 

So previously I had merged all our photos into one Aperture library, using referenced masters so that the original photos could be spread over one or two large (1TB) HDDs. They were backed up locally to another drive. And backed up to the cloud using SpiderOak.

 

But S couldn’t access her photos very easily because the photos were stored under my user account and her user couldn’t see them.

 

So, first job, move all the referenced masters within Aperture outside of my user account and into a new /SharedPhotos folder to which we both have read and write permissions.
Then split the library into two (his and hers) by Exporting the folder containing all of S’s photos as a new Library and again putting that under an S folder in SharedPhotos.
Finally remove the same photos from my library. I’ll be able to see S’s photos by either browsing them (see later) or switching to her library in Aperture if I need to actively manage them.
 

(this took several hours as Aperture is a little slow to move stuff around, and well each of the libraries is > 200Gb)

 

So, two separate libraries in a shared space, each can be accessed by either of us (but never at the same time – Aperture makes sure of that).  So far so good.

 

Now I looked at the web publishing option. There is, as far as I can tell, only one option here and that is a piece of open source software called phpture… Aperture has no commercial or other support for publishing. Which is a shame as under the hood it just uses a simple SQLite database to manage the images so it’s pretty accessible.

 

Installing PHPTure

 

Anyone looking at the documentation for PHPTure ( http://phpture.sourceforge.net/manual/install) would be forgiven for thinking it was rather out of date and stood no chance whatsover of working with Aperture 3.2.1 (the one I have). But they’d be wrong. Thanks to a few community developers, the old version has been refreshed and now works pretty well. It’s a little slow (might be able to improve that) but functional.

 

So the new developments are listed here: https://bitbucket.org/jmserra/phpture

 

To install it (I was installing under MAMP – so already had a lot of the donkey work of setting up PHP and Apache etc done):
  • Download the source code
  • From the unzipped folder you downloaded run the install.command
  • It will ask you where the library file is, and provide sensible defaults for all the other options
  • It will install the code under user/Sites/phpture which was fine for me
  • So I set up a site called photos.lan and set up a local DNS entry (via dd-wrt) for photos.lan meaning I can browse to photos.lan from any device in the network and get this site
  • You can test it works by going to photos.lan/debug.php which should list the following:

Configuration information

Configuration file found: conf.php
Library exist: /Volumes/Disk 1/SharedPhotos/somelibrary.aplibrary
Library readable: /Volumes/Disk 1/SharedPhotos/somelibrary.aplibrary
Library version: 3.2.1
Database opened

 

In fact I didn’t have the “Database opened” there at first and so had to troubleshoot what was going wrong via the php_error.log (under Applications/MAMP/logs in my case.
There I found that SQLite wasn’t working with an error about Call to undefined function sqlite_escape_string() . I found a fix on a forum, which was to add the following lines to the utils.php file under the phpture folder which basically gets around a the sqlite_escape_string being deprecated.

 

function sqlite_escape_string( $string ){
    return SQLite3::escapeString($string);
}

 

This could be fixed in the main code but this is a good work around and when I tried debug.php again as above it worked nicely.

 

So now you go to photos.lan again and you can now see the aperture project list and navigate your photos.

 

It does seem a bit slow – not sure if caching will help or whether its possible to constrain the size of photos sent over the network to make it snappier. I’ll investigate.
Also on the ipad though it works, the photos come out very “big” which makes browsing them a little painful. And the interface is mostly IFRAMEs and the ipad doesn’t seem to do very well rendering/panning them…
Some optimisation necessary.

 

Nevertheless using this setup we have much better access to our own photos, and can view them anywhere.
Update – made some improvements on the ipad:
The ipad view of phpture is a bit ropey because it seems to present the selected images at full resolution which tends to be bigger than the screen and hence you end up scrolling a lot.
I figured it would be best to limit the width a bit and so I added the following:
To phpture/index.php  some tweaks to the layout and size of the frames:
<frameset rows="30,*" frameborder="1" border="5">
 <frame src="toolbar.php" name="toolbar2" noresize="noresize" scrolling="no">
 <frameset cols="240,*,0" id="sidebarSet">
 <frame src="projects.php" name="sidebar">
 <frameset rows="400,220" id="browserSet" border="5">
 <frame src="viewer.html" name="viewer">
 <frame src="browser.php" name="browser">
 </frameset> 
 <frame src="info.php" name="info">
 </frameset>
</frameset>

and in phpture/script/viewer.js beneath the var availHeight… line inside scaleImage():

//but set some maximums
 if (availWidth > 700) { availWidth = 700;}
 if (availHeight > 700) { availHeight = 700;}

And now, bingo it appears much better within the scope of the ipad screen.

Now only remaining problem is why it takes a long time to collect a project’s photos – there must be some optimisation to be done!

Posted via email

Tugu Lombok

The best hotel I’ve ever stayed at. The most perfect end to a great holiday.
Img_1497

You wish for tea, they bring you it on a tray, to the beach, with snacks.
Img_1501

Dinner on the beach?
Img_1509

Dining room overshadowed by giant rooster:

 

Img_1525

More tea

 

Img_1533

Spa in an old Hindu temple:

 

Img_1544

Yoga studio (we appropriated)

 

Img_1547

Buddha looks out:

 

Img_1549

Giant rooster

 

Img_1554

Big pool
Img_1555

Beach lazing
Img_1565

Dinner

 

Img_1566

Amazing sunsets
Img_1586

Posted via email

My World In Pictures

Calendar archive

November 2014
M T W T F S S
« May    
 12
3456789
10111213141516
17181920212223
24252627282930
2009 Copyright © BelowBelief.com