Tagging - GE

Has any thought been given to system wide tagging of files?

Example, I’ve just been on holiday and I had music I played in the car going there and back, I took some pictures and I made a few movies. I’d like to be able to group these dispirate media types under one extended attribute, namely “holiday”. Of course, next time I go on holiday I could tag them as “holiday_2”, or even two seperate tags of “holiday” and “location.”

The above could also be applied to "business" (including people files, spreadhseet, documents) or whatever else you need to apply a quick definition across a system. I know I wish I could classify a part of my music collection as "girlfriend", it would save me a lot of time, as opposed to polluting comments fields.

Tagging seems to find favour with the so-called Web2.0 craze, but the idea of a flat-space hierachy within an OS has some benefits to me, and I think it could find use in a R2 Haiku, hence the GE rubric.

refs: http://en.wikipedia.org/wiki/Tags

expensivelesbian wrote:
Has any thought been given to system wide tagging of files?

In theory, BFS already supports that concept through "attributes" - I suspect a Tracker add-on to manage the tags would be possible - and then use BFS queries to locate all files with a given tag or tags.

i agree that BFS is already sufficient to take care of this task. i work in a research lab, and have to track a colony of mice we’re breeding. so i set up an old computer running BeOS 5 in the lab, gave text files extra attributes (like gender, date of birth, etc), indexed the volume, and now i can search for all the mice with particular attributes. since they’re text files, i can put any other information about the animal into the files. it works out pretty nicely, and wasn’t too hard to set up through the file type preferences.
i’m sure adding a VACATIONyear and VACATIONlocation to the appropriate file types would be easy enough to do, then you can search by place or year and get all the associated media. i agree, though, it would be nice if somethign was set up to add attributes in a easier way (like a tracker add-on).

http://www.bebits.com/app/520

A quick way to add labels to your files with this tracker-addon, it comes with some predefined values, but you can change them opening the app directly (I mean not passing files trough tracker) and changing them with your favorite flavours.

If you don’t like to be limited to choose one of n possible tags there is another way:
http://bebits.com/app/1963
a customizable tracker addon, it passes selected files to a script ( in this case something like : echo “Type value” read tag; addattr -t string META:tag ${tag} ${zkfiles}), so you can type your favourite tag (or multiple values comma separated) in the terminal window, hit enter and you’ve done.

The only limitation, you have to make a new query for each tag

zuMikkebe wrote:
The only limitation, you have to make a new query for each tag

probably it’s hard to read but this is a way to have a query for each label/tag you have defined using bash:

query -a 'META:label==*' | sed 's~\\~~g' | while read file; do catattr META:label "$file" 2>/dev/null;done | sed  's/^.*: //g' | tr "," "\n" | sort | uniq | while read query; do touch "${query}"; addattr -t mime BEOS:TYPE "application/x-vnd.Be-query" "${query}"; addattr -t string _trk/qrystr "(META:label==\"*${query}*\")" "${query}";done

obviously it’s slow, for ~ 1300 files it takes 47 sec on a PIII-800+192MB, sadly no C skill to make it better

cool! As I suspected, the actual ability to do what I proposed is already there, the problem lies in the implementation. I figured that it should be quite possible given the BeFS ‘database’ style structure, what is needed is some extremely simple way of applying a “tag” or “label” to a host of files and then the abilty to search for them without needing a knowledge of SQL-esque syntax

Whenever I think of something I wish OSes would do, I always think that it should be so simple, anyone can use it. This kind of rules out CLI trickery, however I will try an explore these implementations. To me, I think it should be as simple as a right click/tag/<enter_tag>/done. The file icons could have an extra emblem or be coloured, but I wouldn’t see that as needed really.

All great responses, search is so important today, it great that we have an OS that has the building blocks for great future technologies.

zuMikkebe wrote:
obviously it's slow, for ~ 1300 files it takes 47 sec on a PIII-800+192MB, sadly no C skill to make it better
Oh wow. If you can perform that kind of UNIX wizardry on BeOS, I can't see any reason -- except perhaps time -- why you couldn't learn (fairly easily, I might add) C++ skills sufficient to develop on BeOS.
expensivelesbian wrote:
To me, I think it should be as simple as a right click/tag/<enter_tag>/done. The file icons could have an extra emblem or be coloured, but I wouldn't see that as needed really.

Don’t know if you have tried , but Zookeeper can be present in the “open with” menu and Label can colorize icons ( but you’ve a limited colors)

Suggestion for GE: could be tracker able to read an attribute like META:color and tint the icon associated to the entry with its value ?

If anyone’s interested - this showed up on bebits:

http://bebits.com/app/4415

might be worth a look.

umccullough wrote:
If anyone's interested - this showed up on bebits:

http://bebits.com/app/4415

might be worth a look.

yeah, is saw that. Very interesting. Maybe I should just describe my idea for the “best damn media player evah!” on these forums and see who’s up for building it for me. :slight_smile:

It is, coincidentally, an amalgam of various technologies already, kind of, on BeOS. Tagging is a big part of it however.

Thanks for the post, Haiku/BeOS just seems to get better as of late.

I was thinking about the method to apply tags to the files.

Initially I thought the most native way to handle tags is like People does with Group attribute, the current string is shown in a text field and multiple values are comma separated, you can add a new entry just typing it on the field, or select another one already in use and indexed (does People make a query for every META:group indexed files and truncate by commas?) from the combo-box.
If you don’t want a value, just d-click on it and press “Delete” key.

It works perfectly with a single file, but if you want to add/remove values to multiple files?

Ideas are welcome.

It’s me again

I have just started a sh script to use with zookeeper, now it’s in a embryonal status; it does label extraction from files and indeces and prompt them to the screen, using a cursor-driven menu it can do some actions (add label, exit script, toggle status).

This is an example of the output:


Tag-O-Matic - ver 20061014

  • Add Label
    [X] test 1
    [x] test 2
    [ ] test 3
  • Exit Script

Let me eplain the toggle status function:

If the label is in all files (marked with an “X”) toggling status it’ll be removed from all, else if the label is missing from all files (unmarked) toggling status it’ll be added to all, else if the label is partially common to files ( marked with an “x”) the script prompt if it has to remove or add the label.

I thought it was an hard task to do using only bash but seems not so complex.

whoops, finished.
Does anybody want to beta-test it?

Rainy days are the best to waste time

zuMikkebe wrote:
whoops, finished. Does anybody want to beta-test it? /quote]

If somebody is so crazy to test it I made it available:

http://xoomer.alice.it/zumi/pub/tagorama.pkg

Limitations:

  1. it uses a menu driven by arrow-keys that has been tested only with bash 3.0, probably it doesn’t work with the version provided with R5 (its read implementation doesn’t support -n argument), so you have to own ZETA OS, or recompile bash in R5 or get a binary of bash 3.0 from a ZETA installation (it shouldn’t be illegal, I think bash GPL);
  2. it’s a bash script, it’s slow by nature.

Hints: Add META:label to your indexes to have a list of used tags.

Edit: I forgot to tell that it’s provided with a zookeeper binary, so you can pass your files to this script easily, with the Open menu, or as tracker-addon or using draganddrop.
Sorry about the spanish translation, I made it with an online translation service, i know it sucks