I like it. A lot.

Rather than have a single ~/.config/darktable directory, I'd have a
.darktable directory in each of my photo directories (I have several)
that contains relative references to the images. If the top-level
directory moves, the database moves with it.

To follow with the Git analogy, I would do this:

cd ~/...photo-directory-1; darktable --init
cd ~/...photo-directory-2; darktable --init

I would end up with a .darktable directory in each of these directories
and I could move them around with reckless abandon.

Some of the functionality of the Collect module would apply to the
"current" directory as it would only have the current database loaded,
but Collecting images from folders would allow one to switch
directories. Since I mostly collect images from folders, I probably
wouldn't even notice.

Good idea indeed!

Stéphane Gourichon <stephane_darkta...@gourichon.org> wrote:

> IMHO none of those hacks would be necessary with a better design.
> 
> ## Situation: huge database, irrelevant copies
> 
> My photos are on a number of hard drives, that happen to get mounted (on 
> Linux) on various locations,
> sometimes in /media, sometimes through network shares (various paths there, 
> too). Database always showed
> many irrelevant/unreachable copies corresponding to paths where the hard 
> drive happened to be mounted
> one day. 
> 
> ## Hack fix
> 
> Due to these many copies that grew the database content a lot and make its 
> content irrelevant, unusable, I
> totally gave up using the image library database at all: "darktable" on my 
> machine is a script that runs the
> binary with "--library :memory:".
> 
> ## Unsatisfactory fix
> 
> What saved darktable is that the database is mostly a cache for data in xmp 
> files. I open directories in
> darktable, which imports photos each time. Running with "--library :memory:" 
> fixed the mess, but lost all
> ability to browse anything other than what was just opened.
> 
> ## Suggestion: the best of both worlds
> 
> Have "volume"-based library/ies, with a marker information at the root of the 
> "darktable volume".
> 
> For people familiar with git, current situation in darktable is as if git 
> design wrote all administrative files (.git)
> in one central ~/.config/git because "well, you can browse all your 
> git-managed information in one place, and
> you better make sure that your actual files always appear in the same path, 
> else you'll be up for some
> maintenance, see options/hacks 1,2,3...". Those who knew SubVersion remember 
> this kind of mess.
> 
> Suggested situation looks like actual git design. Administrative files live 
> in .git directory at *repository root*.
> With git you can access a git repository through whatever path it happens to 
> be reachable, no constraints. It
> just works.
> 
> With suggested situation in darktable, when you access a photo collection on 
> a removable drive, or a network
> share, etc, darktable would notice the volume (just like git notices the 
> repository by looking for a .git
> directory) and not create duplicates because photos have already been 
> identified as being of a known
> volume.
> 
> On the implementation side, it would mean:
> 
> (1) when creating a volume create a UUID, store it on the filesystem, e.g. in 
> a .darktable directory 
> (2) in library database store all paths as volume-UUID + filesystem path 
> relative to the volume root. 
> (3) Perhaps also store in the database the last path where each volume was 
> reachable (that would be a new
> table).
> 
> What do you think?
> 
> -- Stéphane
> 
> Le 28/03/2021 à 06.07, August Schwerdfeger a écrit :
> 
>  A third option (which does not involve any hand-hacking of the database) is 
> to open the folders
>  collection, right-click on the root folder containing all the misplaced 
> images, and click "search filmroll...".
>  This will bring up a dialog box in which you should select the new location 
> of that same folder.
> 
>  --
>  August Schwerdfeger
>  aug...@schwerdfeger.name
> 
>  On Sat, Mar 27, 2021 at 6:02 PM Jean-Luc CECCOLI 
> <jean-luc.cecc...@wanadoo.fr> wrote:
> 
>  > Message du 27/03/21 23:36
>  > De : "Jean-Luc CECCOLI" 
>  > A : darktable-user@lists.darktable.org
>  > Copie à : 
>  > Objet : re: [darktable-user] changing directory
>  > 
>  > > Message du 27/03/21 17:49
>  > > De : "Jan Minekus" 
>  > > A : darktable-user@lists.darktable.org
>  > > Copie à : 
>  > > Objet : [darktable-user] changing directory
>  > > 
>  > > Hello,
>  > > 
>  > > The drive letter of my darktable folder has changed when I did a new 
>  > > install of my computer. All files have the same structure as before.
>  > > How can I change this? I would like to keep all the changes I made and 
>  > > be able to go back to the original version of the files.
>  > > 
>  > > In the darktablerc file I can change the entries containing the drive 
>  > > letter.
>  > > Is there another way to do this?
>  > > In the preferences is no entry containing the path.
>  > > 
>  > > I'm using windows 10 home 64 bits and darktable 3.4.1.1
>  > > 
>  > > -- 
>  > > Kind regards,
>  > > Jan Minekus
>  > >
>  > Hello,
>  > 
>  > Better go to windows drive manager and modify the letter so it matches the 
> previous one.
>  > 
>  > Rgrds,
>  > 
>  > J.-Luc
> 
>  Well, yes, of course, you can do that another way : directly within the db - 
> this is why I did not
>  suggest it before.
>  1- First of all, backup your library.db file
>  2- open original library.db with any sql editor.
>  3- go to the sql console window
>  4- type the two following lines :
>  update film_rolls SET
>  folder = replace( folder, 'new_unwnated_path_to_the_files', 
> 'old_expected_path_to_the_files');
>  Be aware to replace the values between single quotes by the actual ones !
>  5- execute the code
> 
>  But I still think acting directly on the drive letter is better and safer.
> 
>  Rgrds,
> 
>  J.-Luc
>  ____________________________________________________________________________
>  darktable user mailing list
>  to unsubscribe send a mail to darktable-user+unsubscr...@lists.darktable.org
> 
>  ____________________________________________________________________________ 
> darktable user mailing
>  list to unsubscribe send a mail to 
> darktable-user+unsubscr...@lists.darktable.org 
> 
> -- 
> Stéphane Gourichon
> 
> ____________________________________________________________________________ 
> darktable user mailing list to
> unsubscribe send a mail to darktable-user+unsubscr...@lists.darktable.org 
> 
> 
> ----------------------------------------------------
> Alternatives:
> 
> ----------------------------------------------------

-- 
Bill Wohler <woh...@newt.com> aka <bill.woh...@nasa.gov>
http://www.newt.com/wohler/, GnuPG ID:610BD9AD
____________________________________________________________________________
darktable user mailing list
to unsubscribe send a mail to darktable-user+unsubscr...@lists.darktable.org

Reply via email to