Page 1 of 1
Renaming/moving categories
Posted: Tue Jul 04, 2023 6:05 pm
by mkc73
xnview "seems" to cope well with renaming or moving categories on the fly. However, the documentation suggests care is needed and renaming/moving should only be done with empty categories. What could possibly go wrong?
Re: Renaming/moving categories
Posted: Tue Jul 11, 2023 7:39 am
by xnview
where do you see that?
Re: Renaming/moving categories
Posted: Tue Jul 11, 2023 10:48 am
by mkc73
Re: Renaming/moving categories
Posted: Tue Jul 11, 2023 1:16 pm
by michel038
1) When a category is moved, previous parent category and new parent category wont be updated in db.
Parent keywords wont be updated neither, even if "export" options are enabled.
Example:
Fruit (8)
Fruit > Orange (5)
Fruit > Apple (3)
Color (2)
Color > Blue (2)
When moving category Orange to Color, you will get :
Fruit (8)
Fruit > Apple (3)
Color (2)
Color > Blue (2)
Color > Orange (5)
And the five photos having "Orange" have kept their parent category "Fruit"
2) Rename
A photo has a category "cherry", and, when assigned, iptc and xmp keywords have been written in metadata.
-Rename the category "strawberry"
The photo has now "strawberry" as a category, and "cherry" as keywords.
Keywords are updated only when
- export options are set
- photos are selected
- a checkmark is set in the category panel
- selection is released
Re: Renaming/moving categories
Posted: Tue Jul 11, 2023 3:24 pm
by mkc73
Hi Pierre,
Thanks for your reply.
<<<
1) When a category is moved, previous parent category and new parent category wont be updated in db.
Parent keywords wont be updated neither, even if "export" options are enabled.
>>>
I did wonder how confusion between the catalog and the metadata is avoided when category is moved to a different parent. If I understand you correctly, your answer seems to be that the category is not moved to a different parent at all but just appears to be moved in the category pane - so it is just a cosmetic difference and not the equivalent of creating a new subcategory with that name.
<<<
2) Rename [Category]
>>>
If my understanding is correct - catalog and metadata are out of sync until any category for that image is updated (ie image selected, category deassigned, category reassigned, image deselected for instance) - or presumably "View/update files from catalog" used ?
Re: Renaming/moving categories
Posted: Tue Jul 11, 2023 6:19 pm
by michel038
1) move category
I did wonder how confusion between the catalog and the metadata is avoided when category is moved to a different parent. If I understand you correctly, your answer seems to be that the category is not moved to a different parent at all but just appears to be moved in the category pane - so it is just a cosmetic difference and not the equivalent of creating a new subcategory with that name.
Yes; that seems right for photos that were already categorized. But if you assign the category "Orange" to a new photo, it will get the right keywords (xmp hierarchical : Color , Color|Orange , iptc keywords : Color, Orange)
( if Settings>Metadata>Automatically apply parent keywords is checked)
As in case 2, "View/update files from catalog" will do the job, but it's sometimes difficult to find photos that need to be updated if they have lost parent categories.
2) rename category
f my understanding is correct - catalog and metadata are out of sync until any category for that image is updated (ie image selected, category deassigned, category reassigned, image deselected for instance) - or presumably "View/update files from catalog" used ?
Yes
It's important to me that categories and keywords stay in sync.
And for people who don't want to add metadata to files (or for files that don't support metadata), it's important to make backup copies of the xnview.db file, or use "File's categories >Export" from the categories panel.
Re: Renaming/moving categories
Posted: Tue Jul 11, 2023 10:11 pm
by mkc73
<<<
Yes; that seems right for photos that were already categorized. But if you assign the category "Orange" to a new photo, it will get the right keywords
>>>
So, sounds like can still get in a tangle. If I assign a category to a subset of images and update keywords in files, then move the category and assign to a different subset of images and update the keywords in the files; then delete the database and recreate catalog from the image files I will have two different categories. So would have to manually move images categorized by the first to the second category and delete the first category if I wanted to keep things clean (or only move empty categories).
Re: Renaming/moving categories
Posted: Fri Jul 14, 2023 1:51 pm
by mkc73
Does any of this relate to the symptoms I am still experiencing where xnview won't export a category to the XMP data for an image but does when close down xnview and restart ? Is there some combination of renaming moving categories (which happens quite often by mistake) that could put xnview in such a state? Perhaps moving category to different place in hierarchy, moving it back, moving it again, putting it back. How would the software handle mutliple moves - doesn't it have to keep track of old hierarchy position for files that have previously had that keyword written to XMP data as well as new hierarchy position for files that have yet to have that keyword written out?