Header image San Francisco, California
USA

Lightroom Startup Script

Multi-computer (one-at-a-time) access to shared network catalogs.

Starts Lightroom with local copy of network catalog.

It can only be reserved for writing (saving local edits to net copy) if no other computer has it reserved for writing already, but you can always get a copy for "read-only".

 

Featuring:

 

System Requirements

 

Quick Links (intra-page)

Background Information
Screenshots
How it Works
How to Use
FAQ (Frequently Answered Questions)
Revision History
Download

 

 


Lightroom Startup Script - Screenshots

 

Sample config file

You have to supply the stuff to the right of the equal signs using a text editor.

 

Sample access-control file

You won't ever have to mess with this, but it shows:
- name of computer with catalog rights (Server), and time it was reserved (display is user-friendly when running script).
- name of computer that most recently uploaded catalog to net, and when.

 

Background/Introduction

If you want to share a catalog amongst multiple computers (one-at-a-time), these are the main options:

  1. Put catalog on external drive, and pass it around.
  2. Copy the catalog to/from a shared network drive for local access.
  3. Map network drive as local.
  4. Export as catalog / import catalog.

This solution is for people who have a local network and don't want to use Option 1. Its basis is Option 2, but makes it easier and safer. Option 3 is risky and slow and not recommended. Option 4 is not always viable...

Also, this solution allows multiple simultaneous "read-only" access (via local "read-only" copy of shared catalog). Its only the reservation for write access that is one-at-a-time.

 

Definitions (for the purposes of Lightroom Startup Script)

Read-only catalog A local copy of the shared network catalog. Any number of computers can have a read-only copy of the catalog. While its local, it can be edited, but the option to update shared catalog will not be available.
Writable A local copy of the shared network catalog. Only one computer at a time can have a writeable copy of the catalog. After editing the local copy, the option to update the shared catalog will be available.
Access Control File Similar purpose as Lightroom's local lock file, except instead of keeping two copies of Lightroom on the same computer from accessing a local catalog, it keeps two different computers from reserving the same shared network catalog for writing.

Config File

Lightroom Startup Script needs to know where things are - you tell it by editing a text configuration file.
Shared Network Catalog Catalog on network drive. Lightroom does not access it there - it is copied to local host before Lightroom accesses it.
Local Catalog For the purposes of this script, its a copy of the shared network catalog, reserved by one computer at a time (for writing).
Python Python is the language this script is written in. Until converted to .exe and/or .app executable form, you have to download and install the Python interpreter (2.X), before it will run.
Catalog Name The name of the catalog file without the .lrcat extension, which must match the name of the folder the catalog file is in - just how it is when its created by Lightroom (you can rename the enclosing folder, or the catalog, and Lightroom will still work, but this script won't).

 

Config File

lightroom application

absolute path to lightroom executable. it may work with just a name if app is registered in path via OS, but I haven't tried it.

network catalog directory

path to shared catalogs on network. example catalog:

{network catalog directory}/{catalog name}/{catalog name}.lrcat

Ignored if startup by dropping network catalog.

local catalog directory

path to local copies of shared catalogs. example catalog:

{local catalog directory}/{catalog name}/{catalog name}.lrcat

Ignored if startup by dropping local catalog.

default catalog name

this catalog will be opened unless script is started by dragging and dropping a catalog on it.

Ignored if startup by dropping catalog (network or local).

assume cmd-line catalog is network

Hopefully short-lived config item. Exists because I can't tell whether a command-line catalog argument is on a network or local.

Ignore if startup *not* by dropping catalog.

 

Access Control File (presented strictly for the insatiably curious - you won't have to mess with it).

Line 1  
name of computer who has catalog reserved - blank if free. time it was reserved, as number converted to local time format when displayed.
Line 2  
name of computer that last updated the shared catalog. time it was last updated, as number converted to local time format when displayed.

 

 

How it works

Export (or create new, or make copy of...) test catalog to either network or local drive, then run the script - you'll see!

You can start with a catalog already on the net to share, or a local catalog - either way, and LightroomStartupScript will create the access-control file that governs access from then on.

Source code provided if you want to peruse...

 

How to Use Lightroom Startup Script

- Python
- Script

Python

Install Python 2.X from python.org (not Python 3).

Script

Options to run:

  1. Open script (.py file).
    1. (relies on info in default config file).
  2. Drag and drop a config file on script file.
  3. Drag and drop a local catalog on script file.
  4. Drag and drop a network catalog on script file.

Note: drag and drop is just one way to pass command line parameters - you can also open a command shell and type the name of the script followed by command-line arguments as mentioned above. You can also start using shortcuts on dock or task bar...

 


Lightroom Startup Script FAQ (Frequently Answered Questions)

(no particular order)


These FAQs come partly from users, and partly from my imagination. Please let me know if there are errors or omissions in this FAQ - thanks.

NOTE: The following Q&A's assume that the plugin is working as I expect... If, after your best effort, still "no go", please let me know.


Question: Why would I ever need or want such a thing as Lightroom Startup Script?

Answer: If you want to access a catalog from different computers, but not at the same time, this is a more reliable and better performing way than fooling Lightroom into thinking the network drive is local. Best suited for infrequent "hand-off" of smaller catalogs.


Question: Is LightroomStartupScript compatible with SQLiteroom?

Answer: Yes, on Windows *iff* you use the 'Wait' option. On Mac, as long as the startup batch file will wait... - not sure about details just yet.

In either case, specify the SQLiteroom startup batch file as "lightroom application" in the config file.


Question: Any other hot tips I should know about?

Answer: Yes:


Question: What are the limitations of LightroomStartupScript and what are your plans for the future?

Answer:


Lightroom Startup Script Revision History

(reverse chronological order)

 

Version 1.1 BETA released 2012-01-01

- Added requirement to press the 'Enter' key before exiting command-shell, so one can always see the final printed messages.

*** WARNING: I do NOT recommend using this with a live catalog until you've experimented with a small test catalog first.

BACKUP YOUR CATALOG BEFORE USING WITH REAL CATALOG

Version 1.0.1 BETA released 2011-12-26

- Fixed bug in drag and drop of config file.
- Provides default values for non-critical config items, instead of error.
- Added non-critical config item: verbose mode (for extra print output to aid understanding or debug).

 

Version 1.0 BETA released 2011-12-26

- Initial release.

 


 

Please (IDENTIFY THE PLUGIN) let me know what you think, and please (IDENTIFY THE PLUGIN) report bugs.

 

Download

acceptance of Download Terms & Conditions will be required

LightroomStartupScript 1.1 BETA - Latest & greatest - this is the one to download.

LightroomStartupScript 1.0.1 BETA - Latest & greatest - this is the one to download.

 

Static content updated 2011-12-26 Copyright 2007 - robcole.com - all rights reserved. Dynamic content updated 07:22:17 PM