Moving files outside digikam / digikam automation

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|

Moving files outside digikam / digikam automation

Ben Staude
Hi all,

is it safe to move files and/or folders around within the digiKam root
directory using bash, perl and the like? Do I get exactly the same entries in
the database as if I moved them around from within digikam, or will there be
additional "garbage" entries or duplicates in the database that wouldn't exist
when using digiKam for moving files around? Will all metadata always survive
such action (metadata not saved to images)?

Background: I'm looking for ways to automate the process of dividing big
folders (like 2GB of images coming from SD card) into small ones. My approach
currently would be to write a script that is called via RMB->"Open With" on
multiple selected images (like all pictures of a single birthday, holiday
trip, ...) and moves these selected images to a folder that is automagically
created by the script.
If there's any better solution for automation tasks like this, please let me
know! I'm afraid there is no such thing like a perl interface for digikam? :(

Thanks in advance
Ben
_______________________________________________
Digikam-users mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-users
Reply | Threaded
Open this post in threaded view
|

Re: Moving files outside digikam / digikam automation

Anders Lund
Mandag den 30. januar 2012 21:58:15 Ben Staude skrev:

> Hi all,
>
> is it safe to move files and/or folders around within the digiKam root
> directory using bash, perl and the like? Do I get exactly the same entries
> in the database as if I moved them around from within digikam, or will
> there be additional "garbage" entries or duplicates in the database that
> wouldn't exist when using digiKam for moving files around? Will all
> metadata always survive such action (metadata not saved to images)?
>
> Background: I'm looking for ways to automate the process of dividing big
> folders (like 2GB of images coming from SD card) into small ones. My
> approach currently would be to write a script that is called via RMB->"Open
> With" on multiple selected images (like all pictures of a single birthday,
> holiday trip, ...) and moves these selected images to a folder that is
> automagically created by the script.
> If there's any better solution for automation tasks like this, please let me
> know! I'm afraid there is no such thing like a perl interface for digikam?
> :(
>
> Thanks in advance
> Ben

Digikam importing have an option to make date based albums, it that can help
:)

Anders
_______________________________________________
Digikam-users mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-users
Reply | Threaded
Open this post in threaded view
|

Re: Moving files outside digikam / digikam automation

Ben Staude
Hi Anders,



>Mandag den 30. januar 2012 21:58:15 Ben Staude skrev:
[...]
>> Background: I'm looking for ways to automate the process of dividing big
>> folders (like 2GB of images coming from SD card) into small ones. My
>> approach currently would be to write a script that is called via RMB->"Open
>> With" on multiple selected images (like all pictures of a single birthday,
>> holiday trip, ...) and moves these selected images to a folder that is
>> automagically created by the script.
[...]

>Digikam importing have an option to make date based albums, it that can help
>:)

I've seen that option, but it's not what I need. I need to select the images by myself
and also need more control over where and with what name the new folders are created.

So I'm still hoping for answers to the original question!?

Thanks
Ben
_______________________________________________
Digikam-users mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-users

_______________________________________________
Digikam-users mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-users
Reply | Threaded
Open this post in threaded view
|

Re: Moving files outside digikam / digikam automation

Francesco Scaglioni-2
I know it is not a digikam answer but have a look at "Rapid Photo Downloader" as it may well meet your needs.



---
(Apologies for brevity, top posting and poor citation - this email was sent from a mobile device)
---

-----Original Message-----
From: Ben Staude <[hidden email]>
Sender: <[hidden email]>
Date: Tue, 31 Jan 2012 21:16:17
To: digiKam - Home Manage your photographs as a professional with the power of open source<[hidden email]>
Reply-To: Ben Staude <[hidden email]>, digiKam - Home Manage your
 photographs as a professional with the power of open source
        <[hidden email]>
Subject: Re: [Digikam-users] Moving files outside digikam / digikam
        automation

Hi Anders,



>Mandag den 30. januar 2012 21:58:15 Ben Staude skrev:
[...]
>> Background: I'm looking for ways to automate the process of dividing big
>> folders (like 2GB of images coming from SD card) into small ones. My
>> approach currently would be to write a script that is called via RMB->"Open
>> With" on multiple selected images (like all pictures of a single birthday,
>> holiday trip, ...) and moves these selected images to a folder that is
>> automagically created by the script.
[...]

>Digikam importing have an option to make date based albums, it that can help
>:)

I've seen that option, but it's not what I need. I need to select the images by myself
and also need more control over where and with what name the new folders are created.

So I'm still hoping for answers to the original question!?

Thanks
Ben
_______________________________________________
Digikam-users mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-users

_______________________________________________
Digikam-users mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-users
_______________________________________________
Digikam-users mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-users
Reply | Threaded
Open this post in threaded view
|

Re: Moving files outside digikam / digikam automation

Anders Lund
In reply to this post by Ben Staude
Tirsdag den 31. januar 2012 21:16:17 Ben Staude skrev:

> Hi Anders,
>
> >Mandag den 30. januar 2012 21:58:15 Ben Staude skrev:
> [...]
>
> >> Background: I'm looking for ways to automate the process of dividing big
> >> folders (like 2GB of images coming from SD card) into small ones. My
> >> approach currently would be to write a script that is called via
> >> RMB->"Open
> >> With" on multiple selected images (like all pictures of a single
> >> birthday,
> >> holiday trip, ...) and moves these selected images to a folder that is
> >> automagically created by the script.
>
> [...]
>
> >Digikam importing have an option to make date based albums, it that can
> >help>
> >:)
>
> I've seen that option, but it's not what I need. I need to select the images
> by myself and also need more control over where and with what name the new
> folders are created.
>
> So I'm still hoping for answers to the original question!?

Hi again,

If you select the images yourself, you can do it during import to digikam -  
select the images you want, and download them into the desired album, it is
possible to create a new one for it.

Alternatively, download into digikam, and then use either tags flags to select
them, or just so a selection holding control while clicking or pressing space
will allow you to create any selection, then drag them to an album.

You can probably also select them in your file manager and drag them onto a
digikam album.

Hope this helps :)

Anders
_______________________________________________
Digikam-users mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-users
Reply | Threaded
Open this post in threaded view
|

Re: Moving files outside digikam / digikam automation

Jim Householder
In reply to this post by Ben Staude
Hi

I have on many occasions used a file manager to shift files from one
album to another and delete files with no problems.  Digikam appears to
scan and accommodate changes when it starts.

Jim


On 31/01/12 04:58, Ben Staude wrote:

> Hi all,
>
> is it safe to move files and/or folders around within the digiKam root
> directory using bash, perl and the like? Do I get exactly the same entries in
> the database as if I moved them around from within digikam, or will there be
> additional "garbage" entries or duplicates in the database that wouldn't exist
> when using digiKam for moving files around? Will all metadata always survive
> such action (metadata not saved to images)?
>
> Background: I'm looking for ways to automate the process of dividing big
> folders (like 2GB of images coming from SD card) into small ones. My approach
> currently would be to write a script that is called via RMB->"Open With" on
> multiple selected images (like all pictures of a single birthday, holiday
> trip, ...) and moves these selected images to a folder that is automagically
> created by the script.
> If there's any better solution for automation tasks like this, please let me
> know! I'm afraid there is no such thing like a perl interface for digikam? :(
>
> Thanks in advance
> Ben
> _______________________________________________
> Digikam-users mailing list
> [hidden email]
> https://mail.kde.org/mailman/listinfo/digikam-users
>

_______________________________________________
Digikam-users mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-users
Reply | Threaded
Open this post in threaded view
|

Re: Moving files outside digikam

Jean-François Rabasse

On 31/01/12 04:58, Ben Staude wrote:
> > Hi all,
> >
> > is it safe to move files and/or folders around within the digiKam
> > root directory using bash, perl and the like? Do I get exactly the
> > same entries in the database as if I moved them around from within
> > digikam, or will there be additional "garbage" entries or duplicates
> > in the database that wouldn't exist when using digiKam for moving
> > files around? Will all metadata always survive such action (metadata
> > not saved to images)?

On Wed, 1 Feb 2012, Jim Householder wrote:
> Hi
>
> I have on many occasions used a file manager to shift files from one
> album to another and delete files with no problems. Digikam appears to
> scan and accommodate changes when it starts.

Hello all,

From my personal experience I fully agree with Jim. The only minor
difference is that I don't "had on many occasions", but I "always" use a
files browser (Dolphin in my case) to organise my folders, and not
Digikam. Reason below(1)

And yes, upon next DK start and directories scan, DK reflects correctly
all changes.

To answer to Ben's question,
> > Will all metadata always survive such action

When I started working that way, Files browser + DK, I've had a look at
the DB schema and did some tests. It appears that DK uses two ways to
recognise an image:
- Image path and name (i.e. Folder/Subfolder/ImageFileName)
- An image file signature, uniqueHash field in the DB (looks like a hex
encoded MD5 digest).

So what ?
- After having moved/renamed images with a file browser and restarted
DK, at scan time DK will recognise the previous image from its
signature, and associated metadata, caption, tags, is kept and correct.

- After having edited an image, GIMP or other, outside DK, at scan time
if the folder and image names haven't been changed, metadata is still
valid and DK will recompute the new hash signature.

- After having moved or renamed, AND edited an image, DK will find it as
a new image (no more valid path, no more valid signature) and associated
metadata is lost. Of course, this if DK has been set in "Write metadata
to images files" mode off.

So, organisation with DK or files browser seems to be just a matter of
taste. The only care is to avoid moving + editing tagged or titled
images in the same processing session. (Another safe way is, obviously,
to first do all the organisation tasks, folders creations, images sets
split and move, etc., then start tagging tasks with DK on the final (or
close) albums structure.)

To the other Ben's question,
> > will there be additional "garbage" entries or duplicates in the
> > database

I cant' say. DK itself tends to leave some garbage entries across moves
and reorganisation. But I can't say if doing the job from an external
files browser may produce more, or just the same. However, it seems
useful to issue some "vacuum" commands on the DB at regular time
intervals.
I usually do that when I backup collections to an external USB drive.

Jean-François


(1) The reason why I always use a file browser rather than DK to
organise, move, copy, etc. comes from my personal definition of what is
an album. I have images files but also misc. extra files such as GPX
files from my GPS logger, some text files, comments, travel notes, etc.

And I wish to keep all this grouped with the pictures, in folders and
subfolders. From my point of view, an album is *all*, images files,
GPS tracks, travel notes, etc.
As DK ignores non images files at scan time, I can't handle all that
from the DK GUI via select + move actions. With a files browser I "see"
all my files, images or not images, and organisational work is far more
comfortable.

_______________________________________________
Digikam-users mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-users
Reply | Threaded
Open this post in threaded view
|

Re: Moving files outside digikam

Ben Staude
Am Mittwoch 01 Februar 2012 schrieb Jean-François Rabasse:

> On 31/01/12 04:58, Ben Staude wrote:
> > > Hi all,
> > >
> > > is it safe to move files and/or folders around within the digiKam
> > > root directory using bash, perl and the like? Do I get exactly the
> > > same entries in the database as if I moved them around from within
> > > digikam, or will there be additional "garbage" entries or duplicates
> > > in the database that wouldn't exist when using digiKam for moving
> > > files around? Will all metadata always survive such action (metadata
> > > not saved to images)?
>
> On Wed, 1 Feb 2012, Jim Householder wrote:
> > Hi
> >
> > I have on many occasions used a file manager to shift files from one
> > album to another and delete files with no problems. Digikam appears to
> > scan and accommodate changes when it starts.
>
> Hello all,
>
> From my personal experience I fully agree with Jim. The only minor
> difference is that I don't "had on many occasions", but I "always" use a
> files browser (Dolphin in my case) to organise my folders, and not
> Digikam. Reason below(1)
[...]

Jean-François, thank you very much for your detailed explanation. That's
exactly what I needed to know, but hadn't the time to find out and test by
myself. I'd really like to see your description of what's going on somewhere
in the DigiKam documentation or FAQ!

In addition, I fully agree with you in your definition of what an "album" is.
There is the option to add specific extensions as image, video or audio files,
but I'd really very much appreciate the simple option "show all files". From a
technical point of view, this shouldn't be much of a problem.

Thank you again-
Ben
_______________________________________________
Digikam-users mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-users
Reply | Threaded
Open this post in threaded view
|

Re: Moving files outside digikam / digikam automation

Ben Staude
In reply to this post by Anders Lund
Am Dienstag 31 Januar 2012 schrieb Anders Lund:

> Tirsdag den 31. januar 2012 21:16:17 Ben Staude skrev:
> > Hi Anders,
> >
> > >Mandag den 30. januar 2012 21:58:15 Ben Staude skrev:
> > [...]
> >
> > >> Background: I'm looking for ways to automate the process of dividing
> > >> big folders (like 2GB of images coming from SD card) into small ones.
> > >> My approach currently would be to write a script that is called via
> > >> RMB->"Open
> > >> With" on multiple selected images (like all pictures of a single
> > >> birthday,
> > >> holiday trip, ...) and moves these selected images to a folder that is
> > >> automagically created by the script.
> >
> > [...]
> >
> > >Digikam importing have an option to make date based albums, it that can
> > >help>
> > >
> > >:)
> >
> > I've seen that option, but it's not what I need. I need to select the
> > images by myself and also need more control over where and with what
> > name the new folders are created.
> >
> > So I'm still hoping for answers to the original question!?
>
> Hi again,
>
> If you select the images yourself, you can do it during import to digikam -
> select the images you want, and download them into the desired album, it is
> possible to create a new one for it.

The process of importing, for me, always happens when there's absolutely no
time for nothing because I suddenly need the camera with an empty card to
leave for the weekend or holiday. This always is the last thing that comes
into my mind before leaving:)
 
> Alternatively, download into digikam, and then use either tags flags to
> select them, or just so a selection holding control while clicking or
> pressing space will allow you to create any selection, then drag them to
> an album.
>
> You can probably also select them in your file manager and drag them onto a
> digikam album.

The tricky part of my process is creating an album with the right name at the
appropriate position in my collection. That's where I want the script to help
me (partially interactive). And while it's running anyway, it should also move
the images right there.

Thank you anyway for your suggestions!!
Ben
_______________________________________________
Digikam-users mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-users
Reply | Threaded
Open this post in threaded view
|

Re: Moving files outside digikam / digikam automation

tosca


2012/2/1 Ben Staude <[hidden email]>



The process of importing, for me, always happens when there's absolutely no
time for nothing because I suddenly need the camera with an empty card to
leave for the weekend or holiday. This always is the last thing that comes
into my mind before leaving:)

I find this very strange, as importing pictures is the first thing I do when I come back home; even if I have not enough time to sort all the pictures I've taken, I usually like to browse them at least to roughly see if 'the hunitng was good'. ;-)
 

> Alternatively, download into digikam, and then use either tags flags to
> select them, or just so a selection holding control while clicking or
> pressing space will allow you to create any selection, then drag them to
> an album.
>
> You can probably also select them in your file manager and drag them onto a
> digikam album.

The tricky part of my process is creating an album with the right name at the
appropriate position in my collection. That's where I want the script to help
me (partially interactive). And while it's running anyway, it should also move
the images right there.


I don't bother with the right name and the appropriate position at import time : everything I import go first in a "A trier" folder, till I have time to look at them more thoroughly; those I want to keep will then go to the appropriate folder. And I don't hesitate to rename or move folders when it find it suitable.
Even when the photos are not yet in their final folder, I can always use Digikam tools (date criteria, filters, metadata, etc.) to find what I'm looking for.

Marie-Noëlle

--
Mes dernières photos sont dans ma galerie.
Retrouvez-moi aussi sur mon blog.
Et parcourez les Cévennes à ma façon avec Cévennes Plurielles,


_______________________________________________
Digikam-users mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-users
Reply | Threaded
Open this post in threaded view
|

Re: Moving files outside digikam / digikam automation

John Stumbles
In reply to this post by Ben Staude
On 01/02/12 22:23, Ben Staude wrote:

> The tricky part of my process is creating an album with the right name at the
> appropriate position in my collection. That's where I want the script to help
> me (partially interactive). And while it's running anyway, it should also move
> the images right there.

FWIW this is what I do:

http://yaph.org.uk/photo/

though the getpix script needs a bit of work on it - in current versions
of Debian & Ubuntu w/kde I let the system mount the card and then do
getpix --source /media/whatever-it's-mounted-the-card-as


--
John Stumbles                                    http://stumbles.org.uk
:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:

_______________________________________________
Digikam-users mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-users
Reply | Threaded
Open this post in threaded view
|

Re: Moving files outside digikam

Peter Albrecht
In reply to this post by Ben Staude
On 01.02.2012 23:14, Ben Staude wrote:
> There is the option to add specific extensions as image, video or audio files,
> but I'd really very much appreciate the simple option "show all files". From a
> technical point of view, this shouldn't be much of a problem.

Yes, that option would be great!
My reason: In 99,99% my Albums only contain JPGs. So I do
all album organisation in Digikam.

Doing this, you can fall for the following trap: Lets say
you have an album with 5 JPGs and one text file. You decide
to reorganice your Images and move the 5 JPGs in another
album. After that, your album in Digikam looks empty. So you
might just delete it. But this will delete your text file
without any warning!

There is a wish for the warning in the bugtracker.
> https://bugs.kde.org/show_bug.cgi?id=216412
(If you think, this warning would be usefull, you can vote
for it ;)


I created another bug at BKO for the more general wish
mentioned in this thread:

 "Option to show files of all MIME-Types in album view"
> https://bugs.kde.org/show_bug.cgi?id=293283
(You are invited to vote for this bug too, if you think it
is valuable. ;)

I quoted Jean-François Rabasse and Ben Staude in this bug. I
hope this is ok for you two.

Regards,
        Peter Albrecht
_______________________________________________
Digikam-users mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-users
Reply | Threaded
Open this post in threaded view
|

Re: Moving files outside digikam / digikam automation

Peter Albrecht
In reply to this post by tosca
On 02.02.2012 00:07, Marie-Noëlle Augendre wrote:
> 2012/2/1 Ben Staude <[hidden email]>
>> The process of importing, for me, always happens when there's absolutely no
>> time for nothing because I suddenly need the camera with an empty card to
>> leave for the weekend or holiday. This always is the last thing that comes
>> into my mind before leaving:)

> I find this very strange, as importing pictures is the first thing I do
> when I come back home; even if I have not enough time to sort all the
> pictures I've taken, I usually like to browse them at least to roughly see
> if 'the hunitng was good'. ;-)

My reason for "importing pictures as soon as you are back home":
This gives you a first backup of your precious pictures,
since after the import they exist in two places: Your PC and
your memory card.

Regards,
        Peter Albrecht
_______________________________________________
Digikam-users mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-users
Reply | Threaded
Open this post in threaded view
|

Re: Moving files outside digikam / digikam automation

Ben Staude
14:49 Samstag, 4.Februar 2012 Peter Albrecht <[hidden email]> wrote


> On 02.02.2012 00:07, Marie-Noëlle Augendre wrote:
> > 2012/2/1 Ben Staude <[hidden email]>
> >> The process of importing, for me, always happens when there's absolutely no
> >> time for nothing because I suddenly need the camera with an empty card to
> >> leave for the weekend or holiday. This always is the last thing that comes
> >> into my mind before leaving:)

> > I find this very strange, as importing pictures is the first thing I do
> > when I come back home; even if I have not enough time to sort all the
> > pictures I've taken, I usually like to browse them at least to roughly see
> > if 'the hunitng was good'. ;-)
>
> My reason for "importing pictures as soon as you are back home":
> This gives you a first backup of your precious pictures,
> since after the import they exist in two places: Your PC and
> your memory card.

I remove the pictures from the memory card just after download (see above), but in
parallel,  I do start a backup from my PC to the external usb drive. I dislike the idea
of having only one copy of the pictures.
Anyway, like Marie-Noëlle: there's no time for splitting the images into their final
directories at download time:)

Thanks & regards
Ben
_______________________________________________
Digikam-users mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-users
Reply | Threaded
Open this post in threaded view
|

Re: Moving files outside digikam / digikam automation

Leo Noordhuizen
I use the following shell script to move pictures from 'some' location (mostly the memory card) into their directories AND to a backup directory.
(NB: this is a very basic script which could use some errorchecking, but until now it has been working great.)
---------------------------------------------------------------------------------------------------------
#!/bin/bash

# Copy binary image files from current directory to backup directory and
# move the binary image files to the new tree
# The directorystructure and filename is based on the date the original
# picture was taken and has the following format:
# <backupdirectory>/YYYY/YYMM/YYYYMMDD/YYYYMMDD_<original name>
#  and
# <picturedirectory>/YYYY/YYMM/YYYYMMDD/YYYYMMDD_<original name>
#

# Copy *.JPG & *.CR2 files from current directory to backup
exiftool -o /media/U2-2/InputBackup/ '-FileName<DateTimeOriginal' \
      -d /media/U2-2/InputBackup/%Y/%Y%m/%Y%m%d/%Y%m%d_%%f.%%e .


# Move *.JPG en *.CR2 files from current naar AAAA_Input directory
exiftool '-FileName<DateTimeOriginal' \
      -d /home/lcn/Pictures/Pictures/AAAA_Inbox/%Y/%Y%m/%Y%m%d/%Y%m%d_%%f.%%e .
-----------------------------------------------------------------

Leo Noordhuizen

On Sat, Feb 4, 2012 at 10:10 PM, Ben Staude <[hidden email]> wrote:
14:49 Samstag, 4.Februar 2012 Peter Albrecht <[hidden email]> wrote


> On <a href="tel:02.02.2012%2000" value="+31202201200">02.02.2012 00:07, Marie-Noëlle Augendre wrote:
> > 2012/2/1 Ben Staude <[hidden email]>
> >> The process of importing, for me, always happens when there's absolutely no
> >> time for nothing because I suddenly need the camera with an empty card to
> >> leave for the weekend or holiday. This always is the last thing that comes
> >> into my mind before leaving:)

> > I find this very strange, as importing pictures is the first thing I do
> > when I come back home; even if I have not enough time to sort all the
> > pictures I've taken, I usually like to browse them at least to roughly see
> > if 'the hunitng was good'. ;-)
>
> My reason for "importing pictures as soon as you are back home":
> This gives you a first backup of your precious pictures,
> since after the import they exist in two places: Your PC and
> your memory card.

I remove the pictures from the memory card just after download (see above), but in
parallel,  I do start a backup from my PC to the external usb drive. I dislike the idea
of having only one copy of the pictures.
Anyway, like Marie-Noëlle: there's no time for splitting the images into their final
directories at download time:)

Thanks & regards
Ben
_______________________________________________
Digikam-users mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-users


_______________________________________________
Digikam-users mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-users