I got Beta2 installed and wanted to actually use Haiku for something and thought it would be nice to copy over a fairly large set of images from my photo collection and check out some of the ported image applications. I did not have much luck with DigiKam which froze the OS for me after importing a few hundred JPEGS.
Anway, we should use Haiku the way it is intended, right? So why not organize my photo collection directly in tracker by using the extended attributes. Unfortunately Ratings or other image information does not get read and copied to the attributes directly. So I wanted some way to move the metadata to file attributes. There were a few posts / ideas earlier about an index_server that could be the base for this, but seems it not part of Haiku yet.
So I thought about writing a simple script to copy over the image metadata instead. So I added a few more attributes and got it working quite nicely with exiv2 that was already installed. But having to run a shell script from the terminal did not seem nice, so I was looking for a way to add the script as a Tracker add-on. But it seems shells scripts cannot be run directly, so I needed a program to launch my script. Checking the BeOS bible gave me some reference to an old add-on called ShellMe. I could only find old BeOS R3 binaries for this, but decided to write a simpler version myself. So now I wrote my first Haiku app, ShellIt, which only runs one shell script on selected files in Tracker. But this serves my purpose well for now and just wanted to share it with you - all the code and the results are visible in the screenshot. I have not decided regarding the next step, but I need to at least fix the path to the script, not sure where is the best locationā¦
I havenāt used it yet myself, but you may want to look at ZooKeeper, available in HaikuDepot (of course). Itās supposed to invoke scripts and commands on dropped files or it can be used as Tracker add-on, similar to your approach.
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?
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
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.
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.
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.
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ā¦
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.
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ā¦
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.