Robert Krawitz
2017-07-08 16:07:07 UTC
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.
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 <***@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
Robert Krawitz <***@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