[Clipart] SVG::Metadata Release 0.08

Jonadab the Unsightly One jonadab at bright.net
Thu Jul 1 12:17:48 PDT 2004

Bryce Harrington <bryce at bryceharrington.com> writes:

> On Mon, 28 Jun 2004, Jonadab the Unsightly One wrote:
>> I need to clarify something: assuming the following workflow:
>> 1.  Create a new SVG::Metadata object
>> 2.  Parse an SVG image with it, creating a metadata object
> Parsing just fills in the object you created in #1, not create a new
> object.  

Ah, so if the file being uploaded is not an SVG (say, if it's a PNG or
a tarball or something), I could just skip the parsing step...

>> 3.  Remove existing RDF from the image
>> 4.  Call to_rdf() on the metadata object
... and I'd still get valid RDF here, which instead of being put into
the SVG could be written alongside the .png or whatever with an .rdf
extension, yes?   

A couple of other tweaks would be needed; I'd have to make the
filetest boolean, checking for either svg or rdf, so as to avoid name
conflicts (so that we don't foo.png and foo.tar both needing foo.rdf),
but I think the upload script should easily generalize to handle
pretty much any type of file (except rdf, which would have a filename
conflict with its own metadata, but I think we can live with that
since rdf is not a common extension for clipart).

> In future releases, as I have time, I want to replace the to_rdf()
> routine to only emit RDF of sections it has defined values for, so
> we don't bloat up SVG files with a lot of rarely used tags.  Longer
> term, I also want to experiment with actually storing the loaded RDF
> as a XML::Twig tree, and using that module to write it out.  Then,
> in that case, it should be much closer to beings a lossless
> operation.

If you get around to doing that before I get around to working around
the lack of it, then I won't have to complicate the upload script ;-)

>> I'm thinking of creating a web tool for adding keywords to
>> already-uploaded images (querying them by keyword, with "unsorted"
>> being the obvious place to start, and then presenting the user with
>> a form for adding more specific keywords to some or all of the
>> results).  Put that together with a Wiki page documenting our set
>> of keywords and what they mean, and we'll have the beginnings of a
>> categorization mechanism.  We'll have to add authority control
>> later, but that can be retrofitted.
> Agreed, this is a good step to take.  I've got some routines in
> SVG::Metadata for keyword handling, but they're not hooked up in
> parse() and to_rdf() yet.  Once they are, you could use those for
> doing this work.

Then I'll generalize the upload script to handle types other than SVG
first (umm, Thursday evening maybe), and come back to this, if Alberto
doesn't beat me to it with his nifty category-navigation thingamabob.

split//,"ten.thgirb\@badanoj$/ --";$\=$ ;-> ();print$/

More information about the clipart mailing list