.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32 .\" .\" Standard preamble: .\" ======================================================================== .de Sh \" Subsection heading .br .if t .Sp .ne 5 .PP \fB\\$1\fR .PP .. .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. | will give a .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to .\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' .\" expand to `' in nroff, nothing in troff, for use with C<>. .tr \(*W-|\(bv\*(Tr .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' 'br\} .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\} .\" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .hy 0 .if n .na .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "SVG_ANNOTATE 1" .TH SVG_ANNOTATE 1 "2005-08-11" "perl v5.8.8" "User Contributed Perl Documentation" .SH "NAME" svg_annotate \- Adds RDF metadata to an SVG file. This script scans files and directories for SVG files and if they lack embedded RDF metadata, inserts it. .SH "SYNOPSIS" .IX Header "SYNOPSIS" svg_annotate [\s-1OPTIONS\s0] [file1[, file2]] [subdir1[, subdir2...]] .PP .Vb 8 \& -V, --version Displays version info for the script \& -h, --help This help screen \& -D, --debug=N Reports debugging info (1=sparse, 3=tons) \& -a, --author=s Name of the author to use in the RDF \& -o, --owner=s Name of the owner to use in the RDF \& -l, --license=s License URL to use in the RDF \& -t, --title=s Title string to use in the RDF \& --delete Removes the RDF section(s) from the SVG file(s) .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This script uses SVG::Metadata to annotate \s-1RDF\s0 metadata to one or more \&\s-1SVG\s0 files. It checks to be sure the file does not already contain an \&\s-1RDF\s0 section (in which case it skips the file), and if not, places an \s-1RDF\s0 section at the end of the file, just before the closing tag. .PP The purpose of this script is to enable artists with large collections of images to quickly and easily annotate entire trees of files with metadata. The main aim of this is to assist the artists of the Open Clip Art Library (http://www.openclipart.org). .SH "EXAMPLES" .IX Header "EXAMPLES" Annotate all the items in or under the current directory, with da Vinci as the artist. By default, license is Public Domain, and for \&'my_file.svg', title is set to \*(L"Leonardo da Vinci \- my_file\*(R": .PP .Vb 1 \& svg_annotate -a 'Leonardo da Vinci' . .Ve .PP Add \s-1RDF\s0 with specified author, license, and title for the \s-1SVG\s0 files in the current directory: .PP .Vb 4 \& svg_annotate *.svg \e \& -a 'Leonardo da Vinci' \e \& -l 'http://creativecommons.org/licenses/GPL/2.0/' \e \& -t 'Mona Lisa ()' .Ve .PP svg_annotate allows several fill-ins to be used in the title field: .PP .Vb 9 \& - the full filename of the file \& - the basename of the filename (the part before the extension) \& - the extension of the filename (usually always svg) \& - the directory path to the file \& - the name of the author of the file \& - the name of the owner of the file \& - the keywords for the file \& - the current date and time \& - the current date and time in Coordinated Universal Time (UTC) format .Ve .PP It is also possible to delete the \s-1RDF\s0 from one or more files, using the \&\f(CW\*(C`\-\-delete\*(C'\fR flag. For instance: .PP .Vb 1 \& svg_annotate --delete *.svg .Ve .PP This will work recursively into any directories specified on the commandline, working on any *.svg files it finds in the indicated directory tree. E.g.: .PP .Vb 1 \& svg_annotate --delete my_svg_files/ .Ve .SH "OPTIONS" .IX Header "OPTIONS" .IP "\fB\-V\fR, \fB\-\-version\fR" 8 .IX Item "-V, --version" Displays the version information about the script. .IP "\fB\-h\fR, \fB\-\-help\fR" 8 .IX Item "-h, --help" Prints a brief help message with option summary. .IP "\fB\-D\fR \fIN\fR, \fB\-\-debug\fR=\fIN\fR" 8 .IX Item "-D N, --debug=N" Prints debug messages. This expects a numerical argument corresponding to the debug message verbosity. .IP "\fB\-a\fR \fIauthor\fR, \fB\-\-author\fR=\fIauthor\fR" 8 .IX Item "-a author, --author=author" Specifies the name of the author to use for the \s-1RDF\s0. Remember to use quotes if you wish to specify a multi-word name. E.g., \-\-author=\*(L"Bryce W. Harrington\*(R". .IP "\fB\-o\fR \fIowner\fR, \fB\-\-owner\fR=\fIowner\fR" 8 .IX Item "-o owner, --owner=owner" The owner for the file. Typically the same as the author. .IP "\fB\-k\fR \fIkeyword0,keyword1,...\fR, \fB\-\-keywords\fR=\fIkeyword,...\fR" 8 .IX Item "-k keyword0,keyword1,..., --keywords=keyword,..." Sets the keyword(s) for the image. This parameter can be used multiple times, such as: .Sp .Vb 1 \& svg_metadata apple.svg -k apple -k fruit -k food .Ve .Sp or can take comma delimited parameters, such as: .Sp .Vb 1 \& svg_metadata apple.svg --keywords=apple,fruit,food .Ve .IP "\fB\-l\fR \fIlicense\fR, \fB\-\-license\fR=\fIlicense\fR" 8 .IX Item "-l license, --license=license" The license \s-1URL\s0 to use for the file. See the Creative Common's site for typical licenses. By default it uses the Public Domain license, \&\-\-license=\*(L"http://web.resource.org/cc/PublicDomain\*(R". .IP "\fB\-t\fR \fItitle\fR, \fB\-\-title\fR=\fItitle\fR" 8 .IX Item "-t title, --title=title" The title to use for all the indicated files. Note that several fill-in parameters are included, for a little dynamism (see \s-1DESCRIPTION\s0, above). .IP "\fB\-\-delete\fR" 8 .IX Item "--delete" Causes svg_annotate to operate in RDF-deletion mode. Instead of adding \&\s-1RDF\s0, the script will instead parse the \s-1SVG\s0 file and remove any metadata sections, as distinguished by the tags , , or . .SH "PREREQUISITES" .IX Header "PREREQUISITES" Pod::Usage, Getopt::Long, File::Basename, File::Copy, File::Find, File::Path, File::Spec, XML::Twig, SVG::Metadata .SH "COREQUISITES" .IX Header "COREQUISITES" None .SH "SCRIPT CATEGORIES" .IX Header "SCRIPT CATEGORIES" Text Processing::Filters Utilities .SH "BUGS" .IX Header "BUGS" For licenses other than Public Domain, it screws up the Rights section. .SH "SEE ALSO" .IX Header "SEE ALSO" SVG::Metadata, inkscape, XML::Twig .SH "AUTHOR" .IX Header "AUTHOR" Bryce Harrington .PP .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright (C) 2004 Bryce Harrington. All Rights Reserved. .PP This script is free software; you can redistribute it and/or modify it under the same terms as Perl itself.