[Digikam-users] workflow for deleting not wanted RAW-Files
Andreas Tono
andreas.tono at web.de
Fri Aug 27 16:06:34 BST 2010
One hint about the command "mv":
if you are moving a file from one filesystem (partition) to a
different filesystem the time the command needs to do it is different.
Espacially for large files. Reason: If you move a file in the same
filesystem the OS(operating system) will only write the inode number
of the file into the dataset of the new directory. The data itself
will stay at the same physical place in the file system.
A move to a different filesystem will cause two actions done by the
OS:
first copy (for one moment you the double amount of space) to
different filesystem.
second delte the file in the old place.
Only move into TRASH what you will keep for later times.
But TRASH means: Idont't want it.
So remove it and you will save space.
Next hint with scripts and find command:
find -L $PROOT -name $JPG -exec mv -fv {} $TRASH \;
do first
find -L $PROOT -name $JPG -exec ls {} $TRASH \;
You will see what would be removed. If thaat is correct, change ls to
mv or rm
Am Freitag, 27. August 2010 schrieb Peter Shute:
> I would have used Ztree to delete them, not sure if there's an
> equivalent file manager in Linux.
>
> I would tag all the jpg files in the affected folder, then use the
> control+Batch command to use the base of their filenames to create
> a batch file to rename their matching raw files to, say,
> *.rawsave. Then I'd delete all remaining raw files and rename the
> rawsave files back to raw. I assume digiKam can then work out
> which thumbnails to get rid of.
>
> This procedure could also work for multiple directories. You could
> do it the same way by manipulating directory listings into scripts
> by hand if you find Ruediger's scripts daunting.
>
> It sounds like digiKam needs a way for raw/jpg pairs to be able to
> be treated as one unit, like Lightroom's stacks. Doing it with
> scripts is bound to lead to tears sooner or later.
>
> Peter Shute
>
>
> --------------------------
> Sent using BlackBerry
>
> ----- Original Message -----
> From: Micha Neubauer <Micha.Neubauer at yahoo.de>
> To: digikam-users at kde.org <digikam-users at kde.org>
> Sent: Thu Aug 26 22:12:16 2010
> Subject: Re: [Digikam-users] workflow for deleting not wanted
> RAW-Files
>
> Hello Ruediger!
>
> Wow, thaks a lot for sharing these scripts. Looks like they do what
> I want... have not tested them yet due to lack of time.
> Anyway it seems like there is no "internal" fuction in DK, since
> nobody else replied.
>
> Thanks a lot again
> lg
> micha
>
> On Monday 23 August 2010, 23:50:49 ruediger wrote:
> > Am 22.08.2010 23:12, schrieb Micha Neubauer:
> > > Hello everybody!
> > >
> > > Just a short question on my workflow, since I guess that there
> > > is a nicer and faster way than I am doing it. Here it comes:
> > >
> > > I always take a RAW and a JPG copy of each picture with my
> > > camera because I want to have a RAW copy of my good picures.
> > > Then I download the pictures in digiKam and delete all the crap
> > > I took.
> > > During this process I don't want to scrall through every
> > > picture twice (and have to delete twice) so I only look at the
> > > JPGS (by activating the filter at the bottom of the DK window).
> > > After this process is done I still have all the crap RAW files
> > > of which I deleted the jpgs. Then I go manually through the
> > > folder and delete every RAW file of which I do not have the
> > > corresponded JPG because, of course I don't want to keep a RAW
> > > copy of the crap photos I took. Then I copy the RAW files of
> > > the good fotos into another folder and store them away because
> > > at the moment I just want to backup my phots as RAW files but
> > > don't need them for now.
> > > But this process sometimes takes quite a long time and there is
> > > also the danger of deleting the wrong RAW files just by
> > > accident when doing it fast and annoyed by this boring work. So
> > > now I guess there must be a way of automating this within DK.
> >
> > how I do it:
> > - "delete to trash" the unwanted jpegs
> > - write a small script that searches through the trash folder for
> > jpegs and deletes the raw files with the same basename; then
> > delete the jpeg in the trash (or move both to another, private
> > trash)
> > like this (bash script):
> > cd $DIGIKAM_TRASH
> > files=$(/bin/ls -1 *.jpg )
> > cd $DIGIKAM_ROOT
> > for i in $files
> > do
> > DNG=`basename $i .jpg`.dng
> > JPG=`basename $i`
> > find -L $PROOT -name $DNG -exec mv -fv {} $TRASH \;
> > find -L $PROOT -name $JPG -exec mv -fv {} $TRASH \; #
> > doublettes rm -f $DIGIKAM_TRASH/$i
> > done
> >
> > > But this it not all. The ideal solution is a little more
> > > complex: Since I even don't want to keep the RAW files of ALL
> > > photos of which I keep the JPGs I am even looking for the
> > > possibility to for example to delete all RAW files of which I
> > > do not have a corresponding JPEG rated lower than 4 or with or
> > > without a certain tag. Sometimes you want to keep bad picutres
> > > just for memorizing moments but which do not justify occupying
> > > the momeory with big RAW files.
> > >
> > > Anybody can help me with that? It would also be helpful to hear
> > > (or read) how other people deal with this problem. I guess I am
> > > not the only one wanting RAW-Files of only a selection of the
> > > photos they took. thanks a lot in andvance
> > >
> > > micha
> >
> > like this:
> > cd whereyourjpegsare
> > files=$(find -maxdepth 1 -name "*.jpg")
> > for i in $files
> > do
> > rating=`exiftool -f -rating $i | awk '{print $3}'`
> > if [ $rating == "-" ]
> > then
> > rating=0
> > fi
> > if [ $rating -lt $min_rating ]
> > then
> > DNG=`basename $i .jpg`.dng
> > find -L $DIGIKAM_ROOT -name $DNG -exec mv -fv {} $TRASH \;
> > fi
> > done
> >
> >
> > use at your own risk ;-)
> > _______________________________________________
> > Digikam-users mailing list
> > Digikam-users at kde.org
> > https://mail.kde.org/mailman/listinfo/digikam-users
>
> ___________________________________________________________
> Telefonate ohne weitere Kosten vom PC zum PC:
> http://messenger.yahoo.de
> _______________________________________________
> Digikam-users mailing list
> Digikam-users at kde.org
> https://mail.kde.org/mailman/listinfo/digikam-users
> _______________________________________________
> Digikam-users mailing list
> Digikam-users at kde.org
> https://mail.kde.org/mailman/listinfo/digikam-users
>
--
Andreas Tono
More information about the Digikam-users
mailing list