[Clipart] screenshot 104

Jonadab the Unsightly One jonadab at bright.net
Fri Nov 12 19:16:07 PST 2004

"Jonadab the Unsightly One" <jonadab at bright.net> writes:

> Nicu Buculei <nicu at apsro.com> writes:
>>> I'm not sure of the details on this, but we have tools for applying
>>> keywords en-masse, so we can probably fix it.
>> the package has metadata in one file, metadata.rdf, so it can't pass
>> the current validation, which require metadata in every file
> So, all we need to do is take the metadata from metadata.rdf and embed
> it within each file in the archive?  

This I have done, and uploaded the result:

> If we don't have a tool to do that, I should write one.

I didn't write a robust and reusable tool, but the commandline that I
used can serve as a starting point, so I'll paste that in here, so
that we don't lose it:

perl -e '
open RDF, "../../metadata.rdf";
my $rdf; { local $/ = undef; $rdf = <RDF>; } close RDF;
for $dir (qw(actions apps devices filesystems mimetypes)) {
    for $f (<$dir/*.svg>) {
        open SVG, $f; local $/ = undef;
        my $svg = <SVG>; close SVG;
        open SVG, ">" . $f;
        $svg =~ s!</svg>!$rdf</svg>!i;
        print SVG $svg; close SVG;
        print "$f\n";   }}'

This doesn't handle the unzipping and rezipping (I just used unzip and
zip for that this time), and it's got the subdirectories and things
hardcoded, but it's simple and could be adapted to create a more
general-purpose metadata propagation tool.  I made no attempt to merge
with existing embedded metadata in the SVG files, since there wasn't
any in this case.  (If a situation comes up where that is needed,
there is code in upload.cgi that could be helpful, but in this case it
wasn't necessary.)

Do we have other zipfiles sitting around that need this same thing
done to them?

> What we probably should do (for now) is put a directory under icons
> for each of these themes.  I was planning to reorganize certain things
> (mainly the flags) for the next release anyway.  I assume we still
> have the zip archives (or tarballs or whatever) for Etiquette and
> Flat, as they were uploaded?

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

More information about the clipart mailing list