Skip to content

Add new GUI entry in lighttable for renaming tags #80

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 15, 2017

Conversation

GHswitt
Copy link
Contributor

@GHswitt GHswitt commented Dec 14, 2016

Rename tag: A new tag is added to all images containing old tag. After that, the old tag is removed from all images (and removed from tags). The GUI entry has two entries: Old tag, New tag and a Go button.

Rename tag: A new tag is added to all images containing old tag. After that, the old tag is removed from all images (and removed from tags). The GUI entry has two entries: Old tag, New tag and a Go button.
@GHswitt
Copy link
Contributor Author

GHswitt commented Dec 14, 2016

Just found out that it updates the image tags in the database, but the XMP files are not updated automatically. The XMP has still the old value in it. Only when I open an image in darkroom and switch back to lighttable, the new tag from the database gets written to the XMP. How can I do that from LUA?

@supertobi
Copy link
Contributor

For me this sounds like a bug. @boucman what do you think?

@houz
Copy link
Member

houz commented Dec 14, 2016

Maybe we should wire dt_tag_reorganize() into the Lua API instead – and check if it actually works as it's unused in current dt. 😄

@chrik5
Copy link
Contributor

chrik5 commented Dec 14, 2016

Definitly, yes. This will make the proposed script very short.
Finally, I will be able to fix all my tag typos. Thx @GHswitt for starting this!

@GHswitt
Copy link
Contributor Author

GHswitt commented Dec 14, 2016

No problem, I just needed a way to do renaming more comfortable.

@GHswitt
Copy link
Contributor Author

GHswitt commented Dec 14, 2016

I looked into dt_tag_reorganize, but couldn't find where it synchronizes the new tags to the XMP. Can anyone give me a hint?

@GHswitt
Copy link
Contributor Author

GHswitt commented Dec 14, 2016

As far as I can see it, dt_control_write_sidecar_files() or dt_image_write_sidecar_file should also be available via Lua API.

@houz
Copy link
Member

houz commented Dec 14, 2016

It doesn't. It's been bitrotting for years.

@boucman
Copy link
Member

boucman commented Dec 20, 2016

  • feature freeze, no new api (obviously)
  • even if we wire a tag renaming primitive in lua, we need to figure out what's going on with the XMP. this is a bug, your code should work
  • maybe DT needs a core way to rename tags ?

@spaceChRiS
Copy link
Contributor

Maybe that's the right time and place to start another discussion regarding the topic. Renaming tags is a feature I am looking for as well. But it is something that I would need several times a year, but not very often. This is something that would perfectly fit into a regular menu structure, that darktable avoids so far. But that may not be a necessary restriction for lua scripts. For the functionality of tag renaming, I think about a menu entry “Rename tag” that opens a little window with a search text entry field, a list of tags found, where one tag could be marked, a text entry field that gives the new tag and an “apply” button. A new module that is always visible, at minimum in the collapsed state, does IMO not really fit to the purpose of the functionality of tag renaming.

@supertobi
Copy link
Contributor

FYI
darktable 2.2.2 released:
https://www.darktable.org/2017/01/darktable-2-2-2-released/

Bugfixes:
...

  • Lua: sync XMPs after some tag manipulations

...

@supertobi
Copy link
Contributor

I'm going through all the PRs. Any news here?

@GHswitt
Copy link
Contributor Author

GHswitt commented Nov 15, 2017

Not from my side. I'm still using rename-tags.lua, works ok.

@supertobi
Copy link
Contributor

OK, then I'll pull this script.

@supertobi supertobi merged commit 97dd8a1 into darktable-org:master Nov 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants