|P is for Practical|
Properties, metadata and Perl celebritiesby eyepopslikeamosquito (Bishop)
|on Jul 29, 2005 at 14:18 UTC||Need Help??|
A famous Portuguese Perl hacker, author of the recent Acme::AsciiArt2HtmlTable module and I have been pondering the best way to classify the shapes in Acme::EyeDrops module to make them more amenable to searching and selecting.
You see, he wants, for example, to select from the many shapes available, only the faces of Perl celebrities.
I'm struggling a bit, not having much experience in this field. My first instinct was to look at the web site of a famous British Perl hacker to learn how to search his magnificent photo collection. acme seems to use some sort of keyword search, but when I typed in "perl celebrity" I was told to "Please come back later" in eight different languages.
My next instinct was to steal an idea I remember from Subversion, that of allowing arbitrary "properties" (key-value pairs), aka metadata, to be associated with a file.
And that is what I plan on implementing. That is, to allow any number of arbitrary properties to be associated with a shape. For example:
That way, given a shape property hash reference $p, you can find all faces (even smileys and kermit) by testing each shape for:
while if you only wanted human faces you would use instead:
and if you wanted only human Perl celebrity faces you would use instead:
It seems to me the idea of attaching arbitrary properties to a file (shape, photo, whatever) is generally useful but I have little experience in this domain and little clue on how to define what the properties or keywords should be.
My current candidate property list for my shapes is:
So, if you have some bright ideas on how to tackle this problem, please let us know.