[Clipart] Upload script (using SVG::Metadata Release 0.08)
bryce at bryceharrington.com
Sat Jun 26 12:32:56 PDT 2004
Cool! I did some work on it this morning, and have installed it on the
It hasn't been hooked into the main website yet - I figure we'll want to
test it a bit more first, but I did upload one file. The files are
being dumped into the current incoming directory so if this works we can
consider it official.
Here's the changes I made to it:
* Checked it into our CVS in clipart_web/cgi-bin/
* Added Config::Simple support, and broke out the three config variables
into a separate configuration file.
* Changed File::Spec to File::Spec::Functions to pull in the functions
into the main namespace
* renamed it from upload-svg.cgi to upload_svg.cgi
* Couple other tweaks and bug fixes...
To get this working, I also installed a bunch of Perl modules to our
freedesktop.org account. Since we don't have root access, I just
installed them into /projects/clipart, using the syntax:
perl Makefile.PL PREFIX=/projects/clipart INSTALLMAN1DIR=/projects/clipart/man/man1 INSTALLMAN3DIR=/projects/clipart/man/man3
Also, once installed we have to add that custom path using the usual
use lib "/projects/clipart/share/perl/5.8.3/";
use lib "/projects/clipart/lib/perl/5.8.3/";
And of course, from the commandline, do similarly with the PERL5LIB env
Jonadab, can you send me your SSH key, as described on the freedesktop
site, so we can get you set up with cvs and shell access to the
On Sat, 26 Jun 2004, Jonadab the Unsightly One wrote:
> Bryce Harrington wrote:
> > The only change is a fix to a bug found by Jonadab - the author()
> > accessor function was missing, which caused an error in to_rdf().
> Yep, that fixed it. Here's a _very_slightly_ tested and apparently
> working upload script (attached). There are three variables at the
> top that will have to be changed to match the directory structure
> of the site; the first one is for a temp directory (which hopefully
> is cleaned out periodically on a cron job and does not have to be
> world-readable, but the user the script runs as needs read/write
> privileges) and the other two are the filesystem path and the URI
> path for the location where the resulting SVGs should be published.
> There's also a fourth variable, $style, which just gets interpolated
> inside the <head> section of every generated page, right below
> the <title> element. It's intended mostly for linking in an
> external stylesheet -- I grabbed the URI for that right out of
> the main page of the site.
> With this in place, I'll be able re-upload the images I've
> contributed (both of them) complete with metadata :-)
>  I'm not really much of an artist -- hence I came looking
> for clipart.
More information about the clipart