[KimDaBa] Better import

Jean-Michel FAYARD jmfayard at gmail.com
Tue Feb 1 11:17:45 GMT 2005


Hello to all

The only thing I don't like in kimdaba currently is the import
feature. It's great for things like sending one file containing both
pictures and infos by email, but I often have to use vim in other
cases because that's the only way that works. So I tried to organize
my ideas to explain how it should ideally works :

=============
First it should be integrated with the kipi cdarchiving plugin, since
that's the most likely use case. Say I archived my pictures and infos
an a DVD. Then I am an another computer, I create a new database with
Kimdaba. Importhing should be : just select the folders you want on
the CD and copy them in ~/Images then start Kimdaba or do "Maintenance
-> rescan"
For that, modify the kipi plugin, such as it adds a .kim file in each
folder cotaining the options/values about pictures on that folder.

=============
now we need some change in kimdaba's import feature, because doing 
"File -> import : ~/Pictures/Newfolder1"
....
"File -> import : ~/Pictures/Newfolder42"
would be very boring. 

Alongside with "File -> import a .kim file", I would then want something like
"File -> import .kim files in ~/Images" 

Right now the first step of the import are :

    "<li>First you must select which images you want to import from
the export file. "
    "You do so by selecting the checkbox next to the image.</li>"
    "<li>Next you must tell KimDaBa in which directory to put the images.</li>"

I would suggest to inverse the two steps for " File-> import a .kim file" :

    "<li>First you must tell KimDaBa in which directory to put the images.</li>"
    "<li>Next you must select which images you want to import from the
export file. "</li>"

so it's coherent with " File -> import .kim files in ~/Images " which would be

     "<li>First you must select which export files you want to import.</li>" [1]
    "<li>Next you must select which images you want to import from the
export files. "</li>"

In [1] , kimdaba does a recursive scan of ~/Images, and propose a
checkbox for each found export file.

==============
The steps 
- "select images you want to import" 
- "Keywords" corresponds to i18n("Keywords")
- "token a" correspond to "token b"
are just like now (they are awesome). The list of images shows the
image we found in selected .kim files AND in ~/Images (like usual :
try with the filename, or if doesn't work, with the md5sum)

==============
The infos should be merged and not replaced.
Say I have in ~/Images/index.xml
<image file="img001.jpeg" angle="90" ...(lot of other attributes)... >
<options>
<option name="Keyword"><value value="+++"></option>
</options>
</image>

and in a selected .kim file
<image file="img001.jpeg" >
<options>
<option name="Locations"><value value="Paris"></option>
<option name="Persons"> <value value="me"></option>
</options>
</image>

and in another selected .kim file :
<image file="img001.jpeg" angle="0" >
<options>
<option name="Locations"><value value="Paris"></option>
</options>
</image>

Then the result should be :           !!
<image file="img001.jpeg" angle="0" ...(lot of other attributes)... >
<options>
<option name="Keyword"><value value="+++"></option>
<option name="Locations"><value value="Paris"></option>
<option name="Persons"> <value value="me"></option>
</options>
</image>

Notice the thing with the "angle" attribute. That would allows me or
someone else to write a .kim file with Kimdaba.pm to change whatever I
want in the database without accesing it directly (in this case, a
script really rotate the pictures, and want to reset the "angle"
values in ~/Images/index.xml ). For this Kimdaba must be aware of  :
was angle="0" really present in the .kim file, or did I just pick that
because that's the default value ?


==================
Right now, the import feature do both merging the options/values AND
want absolutely to copy the original pictures. I don't like this at
all. Say I took new pictures, and commented them. I send a CD to my
mom which lives far away from me. She imports the pictures and the
.kim files and make some changes. But I already have the pictures, she
should just send me a new updated .kim file by email. Right now, if
Kimdaba can't copy the pictures, it just freezes.

Here we solved this problem : if I do "file -> import .kim files in
~/Images", no need to copy the pictures of course !
(except if they are IN the .kim file)

==================


That's it. I hope this helps. I don't know if it's possible to make that though.



More information about the Kphotoalbum mailing list