Fun with image attributes, first baby steps

Nice, i tought a bit about if it is a good idea to call exiv2 5 times in a row on the same file, but sedding the values from the verbose output would be probably more fragile. Can we see your wallpaper?

1 Like

This is awesome! It will be real fun with a Haiku-native photo browser software!

1 Like

We have a GUI photo browsing and tagging utility application in HaikuArchives called “Album”. How about extending the capabilities of that? https://github.com/HaikuArchives/Album

2 Likes

Excellent idea, and congratulations on your persistence in finding or creating the right tools for the job.

Haiku’s file system is much praised, but as yet not very user-friendly. With the right tools it could serve as a catalogue-maker for various applications, not least being things like CD collections.

2 Likes

As an attribute to the ShellIt add-on (or of a symlink to it, maybe)? This would allow to use the add-on easily with different scripts by just copying it around and changing the attribute.

1 Like

32 posts were split to a new topic: A Thumbnail view for Tracker

This should be possible with imagemagick too

1 Like

Thank you all for the incredible enthusiasm and helpful replies so far. I have learnt a lot thanks to you.

humdinger - I can confirm ZooKeeper works fine for running my script as an add-on, so there is actually no need for ‘ShellIt’ anymore.

extrowerk - I agree it could be done more efficiently, I just took the quick / lazy (and perhaps safe) approach for now. I found the wallpaper at https://www.goodfon.com/wallpaper/babochka-list-cvetok-goluboy.html

vidrep - I didn’t know Album handled attributes. I like the way you can drag-n-drop any EXIF tag, but have not found a convenient way to handle lots of images quickly. But seems there is a lot of potental there.

PulkoMandy - The top priority would be to implement what you suggest, so each copy could run its own script. This is actually how ZooKeeper works. I have not found a way to get the name / info for the current add-on, but it should be doable. I would also like to add a progressbar as I would run this on many hundred images at a time. I may play around a bit just to learn, even though we have ZooKeeper.

And the discussion around image thumbnails is really interesting, it seems jscipione is using attributes to store the actual image data, which is perfect. It would be fantastic if we could have a thumbnail view that could also display additional attributes below the image, like rating.

I was expecting that at least image metadata like height, width, resolution or color depth was being automatically detected by Tracker. Probably because back in BeOS time I may have used some Tracker replacement or Add-On that made it easier. I find it very useful being able to open a folder of images and know in advance their dimensions. The preview would also be nice, even though I understand the technical constraints being discussed here. An halfway solution would be having a Tracker Add-On allowing on-demand thumbnails generation, but ideally I would prefer an automatic process, with a switch option in Tracker settings.

Width and height are automatically added as attributes to an image if you open it with ShowImage. So if you added these columns to a folder, you will see them there.
Adding Tracker icons using Album is often sufficient if what you want is only to recognize files quicker.
If not sufficient, we have several tools to browse images with previews already. Unfortunately, Album is a bit broken and Butterfly shows only one image at once. There are several Qt apps to do this anyway even if I’d prefer a native solution.

I keep playing around even though I don’t really know what I’m doing. :slight_smile:
I downloaded the Haiku source to try to make some adjustments - I really don’t like that boolean attributes show as “true” or “false”, so if rating can use the UTF8 codes for stars, lets do the same for booleans. It is a one line code change in Trackers WidgetAttributeText.cpp, but I haven’t figured out how to run my modified version of the Tracker - I’m unable to kill / replace the original…

So for now Flash attribute is a string, I also adjusted the ratings menu of ShowImage, so the current rating is always visible. To be continued…

Screenshot%20from%202020-06-20%2010%3A36%3A25

7 Likes

Tracker is automatically relaunched by the launch_daemon if it ‘disappears’, normally meaning it has crashed. There’s the launch_roster command to stop/start system services by their application signature.

To stop Tracker, do launch_roster stop x-vnd.Be-TRAK (you find its signature when invoking the FileType add-on on /system/Tracker).

When testing your built Tracker, you have to make sure the binary finds its freshly built libtracker.so. It does, if you put the libtracker.so into a folder “lib” beside the built Tracker binary.

Now you can just launch your built Tracker from Terminal.

2 Likes

Thanks a lot, humdinger - not something I would have figured out on my own… :slight_smile:

It’s a good idea. Perhaps, instead of the circle you could consider using a check symbol.. It’s a bit more standard, I think.

3 Likes

I was considering the check symbol, but didn’t want an empty space for false. But both options are way better than untranslatable “true” and “false” texts…

The heavy white for false and the filled one for true?

Actually, in FileTypes settings for Boolean attributes, there is an option to display as “Default” or as “Checkbox”. Right now the setting is not considered in Tracker. It’s probably fine to display the check symbol or nothing if the user selects Checkbox there.

1 Like

In fact, I kinda like circles for displaying status of a thing the user has no control on it because it is visually neutral.
At the opposite, a checkbox is visually an invitation to modify the attribute. It let the user think that putting a notch there will have directly an effect on the file or further behaviour.

1 Like

But the circles look like radio buttons, actually…

Tracker does work with the “Checkbox” boolean attribute. Please have a look at the Extra attributes section of the filetypes etc. workshop of the user guide. To quote the essential parts concerning a boolean attribute:

Boolean for binary data: 0 (false) or >=1 (true)

  • Checkbox - Can be used to show either one of two symbols, see Special below.
  • Special - Defines the two symbols used for a checkbox display. For example, “xo” will show a “x” for all values >0 and “o” for 0.

So, instead of the “x” and “o”, you can scour CharacterMap for suitable symbols.
The nice thing is, that this is on a per attribute basis. You can create one bool attribute that shows the special characters “x” and “o”, and another showing an empty and full circle, or checkmarks or anything else.

To illustrate:

screenshot1

Note: To see the changes, you’ll have to hide and re-show the boolean attribute in the Tracker window.

2 Likes