allusion-app / Allusion

A free and open source desktop application for managing your visual library
GNU General Public License v3.0
680 stars 44 forks source link

Feature Sugesstion - cli interface for scripting and automation #620

Open Hoplite-WAM opened 8 months ago

Hoplite-WAM commented 8 months ago

Hello, this tool is very useful and functional and I appreciate very much the devs who are working on it.

I had a thought that it would be useful to have a simple way to interact with the tool through cli in order to for example automatically bulk tag files using scripting or other such possible use cases.

Basically the ability to interface with the app in this way would open up many automation possibilities.

Thank you

Antoine-lb commented 8 months ago

Not exactly what you need but you should check out ExifTool (https://exiftool.org/), is what Allusion uses under the hood.

Is a very mature CLI tool to deal with metadata (tags).

I'm not form the dev team so can't help you much more than that, good luck

Hoplite-WAM commented 8 months ago

Thank you for that it seems very useful!

Hoplite-WAM commented 8 months ago

Do you happen to know what meta data Allusion is using under the hood exactly? In order to know how to interface with exif-tool. The documentation for allusion is not much as of now.

Antoine-lb commented 8 months ago

Correct me if I miss understood your question.

Tags are written in 3 different places.

In the example, a picture has two tags "hiking" and "friends", both tags are inside of "vacations" (but the picture doesn't have the "vacation" tag)

{
  "Subject": [
    "hiking",
    "friends"
  ],
  "HierarchicalSubject": [
    "vacations|hiking",
    "vacations|friends"
  ],
  "Keywords": [
    "hiking",
    "friends"
  ]
}

Is that what you mean?

Hoplite-WAM commented 2 months ago

Sorry, I forgot to respond to this, but I just wanted to thank you and say yes that is what I meant and it was a very helpful response.

Hoplite-WAM commented 2 months ago

It would be a nice optional feature to have auto sync between actual file exiftool keywords and allusion. I understand one benefit of this tool is that it does not modify the files, but it would be a nice optional feature. The reason for this is because since exiftool is a cli application a lot more can be automated with scripting

Currently in the settings you can sync the two manually, but it is not consistent. Sometimes tags in Allusion stick even if exiftool shows no keywords. I am assuming that is because the tags assigned in Allusion are not written to the file.

Antoine-lb commented 2 months ago

I haven't got to the bottom of it but yes, either importing or exporting in Allusion most have some bugs of edge cases that causes inconsistencies

In theorie it should work