Re: Question about importing



On Mon, Jan 21, 2008 at 09:57:37AM +0100, Roland Mas wrote:
> Bill Moseley, 2008-01-20 16:12:55 -0800 :
> 
> > One reason for asking is I want to be able to use other applications
> > to add photos into the library (and f-spot's database), so I want to
> > add them in a way so f-spot will see that they have already been
> > imported.
> 
> I wanted to do a similar thing.  I initially wrote a Perl script to do
> that (copying the files and registering them into the F-Spot
> database), but I had to fix it everytime the database schema changed.
> So I'm currently rewriting it in C#, in order to be able to reuse the
> code in F-Spot.  It only does the importing from a camera currently,
> but I'll add support for importing from a card reader sometime soon.
> I'll probably announce the results here (or post them as a patch).

I'm using a Perl script, as it was very quick to implement.  I'm using
Class::DBI::Loader to load the schema from the database. Yes, if one
of the columns changes that I set in the database then the script will
need fixing.

It's a completely one-off script not suitable for sharing, but here it
is for now:  http://hank.org/import_photos.pl with all its
hard-coded-paths glory.

Once I figure out a bit more about udev (and hotplug??) I may just
have it automatically import when I plug in the memory card.

The other thing I want to look into is a way to remotely import the
images.  When I travel I tend to rsync my camera's card to my laptop's
drive and use fspot there.  When I find a fast connection I then like
to rsync to my home machine.

So, I either need an option to hardlink (or move) the files on import,
or a way to remotely import -- perhaps mounting sshfs, or have the
laptop generate a listing of its photos directory and have the home
machine read that list and determine what files need to be scp'ed from
the laptop to the home server.

-- 
Bill Moseley
moseley hank org



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]