xxv / darktable-git-annex

git-annex integration for darktable
22 stars 3 forks source link

workflow? #1

Open anarcat opened 9 years ago

anarcat commented 9 years ago

interesting tool! what is your actual workflow with this?

how do you import pictures in darktable? - using the builtin importing tool?

xxv commented 6 years ago

I haven't been using Git Annex for my photos for a bit, in part because I didn't have a solid workflow down that didn't risk me accidentally storing hundreds of gigabytes of bad photos for all eternity that I never want to look at ever again. I would really like to revisit using it, though, but need some way to be able to easily punt a photo from the annex in case it accidentally gets added.

anarcat commented 6 years ago

git-annex is actually pretty well designed for that kind of stuff. yes, you can add pictures that will seemingly stay forever, but if you actually remove the file (the symlink, actually), git will consider the file "unused" and it will be purged when you run git annex dropunused all. (note that this first requires running git annex unused to "discover" the unused files. you will also need to use the --force flag to drop the files permanently, without respecting the numcopies setting.)

but all in all, this is faaairly easy. my workflow used to be that would systematically add all files into git-annex on import. then i would feel more comfortable removing them from Darktable (DT) permanently, knowing they would still live as "unused" files that I would eventually purge from git-annex.

now of course, my workflow changed again: I use Rapid Photo Downloader (RPD) to import photos from memory cards: it replaces a custom script I was using to move photos in date-based locations, something that DT doesn't do very well on its own, traditionnally, although it seems to have fixed that recently. RPD also used to move the files from memory cards, something that DT doesn't do either. unfortunately, RPD dropped that feature recently. furthermore, RPD doesn't support firing commands or plugins after a command is ran, which means i need to run git-annex by hand to import pictures, which i doubt once a month, as an archival/backup procedure.

anyways, just thought sharing my workflow would be useful for you. :)

fidergo-stephane-gourichon commented 4 years ago

Thanks for discussing here.

Adding without concern? Not beyond around 100k images

git-annex is actually pretty well designed for that kind of stuff. yes, you can add pictures that will seemingly stay forever, but if you actually remove the file (the symlink, actually), git will consider the file "unused" and it will be purged when you run git annex dropunused all.

Yes and no. I tried to put all my photos in git-annex, thinking I would gain history of edits in XMP files. It was too easy to commit actual raw files in main git repo instead of adding them in the annex. In theory I could fix it with git filter-branch, and pruning the git repo with gc --aggressive. Turned out the main repository (just the git part containing file history) would still become too big, too slow, after 100000+ images. I dropped the whole thing altogether (IIRC cp -a --dereference -l mygitannexcontent someotherdir can be used to turn a git-annex-manager tree into a regular tree of files).

Anyway, these scripts may form an interesting basis, one can select files not yet annexed and above some rating threshold and do a batch "git annex add" on them.

Wish for clearer README.md

Anyway, the problem I was facing reading https://github.com/xxv/darktable-git-annex was that things were unclear about which itch motivated you @xxv to write those scripts, what's the overall approach. Since this very issue looks similar, I went to comment here.

May I wish for a clarification of this repo's README.md, something like "my problem was A, I thought of a solution like B with benefits C and D, so I wrote this script, and use it like E".

Suggestion for clearer README.md

On second reading, I would guess your answers would be something like:

The photos you wish to use this for must already be in an initialized git annex repository. They don't need to be added, however.

This was puzzling. On third reading I suggest this variation:

"The added features only work in photos stored within the tree hierarchy of an initialized git annex repository. It is not necessary to run any git-annex command on them (in particular no need to git-annex add), the point being to let you do that from within darktable."