[KPhotoAlbum] Purging unused labels from the database

Robert Krawitz rlk at alum.mit.edu
Sat Jul 8 18:07:07 CEST 2017


If you're like me, your database accretes a lot of labels, and then
you sometimes change things around, and those labels are orphaned.

I added an option to my database merge script to remove unused labels
from the index.xml file (the code is very similar, and this is
something one might want to do when merging databases).  It also
allows just one file to accommodate this.

It correctly (based on testing, at any rate) handles the
pseudo-hierarchy of names.  So if a label is also used as a group
name, it doesn't delete it unless it has no members.

This can, of course, require multiple passes.

-- 
Robert Krawitz                                     <rlk at alum.mit.edu>

***  MIT Engineers   A Proud Tradition   http://mitathletics.com  ***
Member of the League for Programming Freedom  --  http://ProgFree.org
Project lead for Gutenprint   --    http://gimp-print.sourceforge.net

"Linux doesn't dictate how I work, I dictate how Linux works."
--Eric Crampton
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kpa-merge
Type: application/octet-stream
Size: 18704 bytes
Desc: not available
URL: <http://mail.kdab.com/pipermail/kphotoalbum/attachments/20170708/1e26b3b2/attachment.obj>


More information about the KPhotoAlbum mailing list