<div dir="ltr"><div>Lovely!</div><div>Thank you very much! It will be an interesting operation.</div><div>A seemingly complete road map for me.</div><div><br></div><div>I will definitely need another beer when done. <br></div><div>Best not buy before the finish line is crossed though :0)</div><div><br></div><div>Besides I do like the data format and I was surprised the XML is processed so fast.</div><div>What's the max number of images that is possible for KPA to handle? </div><div>Or phrased it another way: What's the highest number of images you have encountered up to now?</div><div>I have some 25000 more images...</div><div>It could be useful to have an idea (if I have to create another instance/initfile).</div><div><br></div><div>Per<br></div><div><br></div><div><br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Oct 31, 2022 at 11:39 PM Johannes Zarl-Zierl <<a href="mailto:johannes@zarl-zierl.at">johannes@zarl-zierl.at</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
Thanks for the detailed response...<br>
<br>
Am Montag, 31. Oktober 2022, 15:40:39 CET schrieb Per Funke:<br>
> Structure:<br>
> =======<br>
> <br>
>    1.<br>
>    There is one file for exif data, “data”<br>
>    2.<br>
>    There are three files for tags called “what”,”when” and “where”<br>
>    3.<br>
>    To connect “data” with the tag files there is an index called “datab”<br>
>    4.<br>
>    The record id of the datab records are hashed, creating a file structure<br>
>    called “more_txt”. An empty file is created for each record when<br>
> imported. Annotating will later fill these already existing records with<br>
> text. The hashing mechanism means there is no index to the texts.<br>
>    5.<br>
>    For searching purposes there is a index connecting all existing tags<br>
>    (tags that are used, not empty ones) to the “datab” file’s record(s)<br>
> where that tag is used..<br>
>    6.<br>
>    All images directories are named as the current date when created.<br>
>    This means the dir contains images from the name (date) of the dir<br>
>    before it, up to the date that constitutes it’s own name.<br>
>    When you know the name of the dir where an image resides you also know<br>
>    the approximate date of it's creation.<br>
> [...]<br>
> As you see, importing from this troglodyte of a database can only be done<br>
> by an expert! Me!<br>
<br>
Ok, that sounds like you have all the data you need in a usable format. You <br>
also have an expert at hand, which is always good ;-)<br>
<br>
> If I were employed, this would have created my total job security. I'm like<br>
> Sid in User Friendly, though not quite so skilled.<br>
<br>
I understood that reference ;-)<br>
<br>
> Also I do not use punch cards since my last university course where I<br>
> programmed in Cobol.<br>
<br>
... and while I never learned Cobol I do find punch cards handy for taking <br>
notes...<br>
<br>
<br>
> It was kind of fun doing this description. That's something I've never<br>
> done, ever. I had it all in my head from the beginning. Now it's in writing.<br>
> I think I'll go and buy a fat trappist beer, I'm worth it!<br>
<br>
Joking aside: writing down stuff is actually a great start. <br>
<br>
So, in summary: you already know your data, and probably know how to<br>
1) create a list of all tags<br>
2) create a list of all images and their associated tags<br>
<br>
Also, it looks like your category names are plain ASCII, so you won't have to <br>
escape any special characters (before you ask: having non-ASCII characters in <br>
your tag names is not a problem). If your data is not already encoded in <br>
UTF-8, I would advise you to make sure that you tag names are valid UTF-8 <br>
before the import.<br>
<br>
If you need a template for creating the index.xml file for KPhotoAlbum, you can <br>
use this one:<br>
<br>
<?xml version="1.0" encoding="UTF-8"?><br>
<KPhotoAlbum version="7" compressed="1"><br>
    <Categories><br>
        <Category name="Who" icon="system-users" show="1" viewtype="0" <br>
positionable="1"><br>
           <value value="Person A"/><br>
           <value value="Person B"/><br>
        </Category><br>
        <Category name="Where" icon="applications-internet" show="1" <br>
viewtype="0"><br>
           <value value="Place A"/><br>
        </Category><br>
        <Category name="What" icon="favorites" show="1" viewtype="0"><br>
            <value value="untagged" id="1"/><br>
            <value value="The What"/><br>
        </Category><br>
    </Categories><br>
    <images><br>
       <image file="relative/path/to/file.jpg" startDate="2000-01-01T00:00:00" <br>
endDate="2000-12-31T23:59:59" ><br>
            <options><br>
                <option name="Who">  <br>
                    <value value="Person A"/><br>
                    <value value="Person B"/><br>
                 </option><br>
                 <option name="Where"><br>
                    <value value="Place A"/><br>
                 </option><br>
                 <option name="What"> <br>
                    <value value="The What"/><br>
                 </option><br>
            </options><br>
        </image><br>
    </images><br>
</KPhotoAlbum><br>
<br>
That means you need to convert your list of Who/Where/What tags into value <br>
XML-element under the appropriate Category element.<br>
Then you'll need to create an image element for each image, possessing correct <br>
startDate and endDate attributes. Below the image element, create Who/Where/<br>
What entries for each tag that applies to the image.<br>
<br>
This will result in a very verbose file that has enough information for <br>
kphotoalbum to repair it to get a valid index.xml file. Using this verbose (or <br>
in kphotoalbum parlance "uncompressed") file format allows you to not care <br>
about tag ids. Having the "compressed=1" attribute tells kphotoalbum to save <br>
the database in a less verbose and more performance-friendly format.<br>
<br>
Once you have created an index.xml file in this manner, you can open the <br>
database/image directory in kphotoalbum:<br>
KPhotoAlbum will complain about missing image size information, and will tell <br>
you that you should pick a tag to mark untagged images. You should start with <br>
selecting the selecting the "untagged" tag and save the database.<br>
After that, you need to run "Recreate MD5 sums..." and "Recreate EXIF <br>
database" from the maintenance menu. Make sure that the "Update image time" <br>
checkbox is not active.<br>
<br>
When that is done, save your database again, recreate the thumbnails <br>
(maintenance menu) and go for another trappist beer. If all went well, you now <br>
have all your images in kphotoalbum.<br>
<br>
Hope that helps,<br>
  Johannes<br>
<br>
<br>
<br>
<br>
</blockquote></div>