GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  SVG_ANNOTATE (1)

.ds Aq ’

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.

CONTENTS

SYNOPSIS

svg_annotate [OPTIONS] [file1[, file2]] [subdir1[, subdir2...]]



 -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)



DESCRIPTION

This script uses SVG::Metadata to annotate RDF metadata to one or more SVG files. It checks to be sure the file does not already contain an RDF section (in which case it skips the file), and if not, places an RDF section at the end of the file, just before the closing </svg> tag.

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).

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 Leonardo da Vinci - my_file:



  svg_annotate -a Leonardo da Vinci .



Add RDF with specified author, license, and title for the SVG files in the current directory:



  svg_annotate *.svg \
     -a Leonardo da Vinci \
     -l http://creativecommons.org/licenses/GPL/2.0/ \
     -t Mona Lisa (<FILENAME>)



svg_annotate allows several fill-ins to be used in the title field:



    <FILENAME>  - the full filename of the file
    <FILEBASE>  - the basename of the filename (the part before the extension)
    <FILEEXT>   - the extension of the filename (usually always svg)
    <DIR>       - the directory path to the file
    <AUTHOR>    - the name of the author of the file
    <OWNER>     - the name of the owner of the file
    <KEYWORDS>  - the keywords for the file
    <LOCALTIME> - the current date and time
    <GMTIME>    - the current date and time in Coordinated Universal Time (UTC) format



It is also possible to delete the RDF from one or more files, using the --delete flag. For instance:



  svg_annotate --delete  *.svg



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.:



  svg_annotate --delete  my_svg_files/



OPTIONS

<B>-VB>, <B>--versionB> Displays the version information about the script.
<B>-hB>, <B>--helpB> Prints a brief help message with option summary.
<B>-DB> N, <B>--debugB>=N Prints debug messages. This expects a numerical argument corresponding to the debug message verbosity.
<B>-aB> author, <B>--authorB>=author Specifies the name of the author to use for the RDF. Remember to use quotes if you wish to specify a multi-word name. E.g., --author=Bryce W. Harrington.
<B>-oB> owner, <B>--ownerB>=owner The owner for the file. Typically the same as the author.
<B>-kB> keyword0,keyword1,..., <B>--keywordsB>=keyword,... Sets the keyword(s) for the image. This parameter can be used multiple times, such as:



    svg_metadata apple.svg -k apple -k fruit -k food



or can take comma delimited parameters, such as:



    svg_metadata apple.svg --keywords=apple,fruit,food



<B>-lB> license, <B>--licenseB>=license The license URL to use for the file. See the Creative Common’s site for typical licenses. By default it uses the Public Domain license, --license=http://web.resource.org/cc/PublicDomain.
<B>-tB> title, <B>--titleB>=title The title to use for all the indicated files. Note that several fill-in parameters are included, for a little dynamism (see DESCRIPTION, above).
<B>--deleteB> Causes svg_annotate to operate in RDF-deletion mode. Instead of adding RDF, the script will instead parse the SVG file and remove any metadata sections, as distinguished by the tags <rdf>, <rdf:RDF>, or <metadata>.

PREREQUISITES

Pod::Usage, Getopt::Long, File::Basename, File::Copy, File::Find, File::Path, File::Spec, XML::Twig, SVG::Metadata

COREQUISITES

None

SCRIPT CATEGORIES

Text Processing::Filters Utilities

BUGS

For licenses other than Public Domain, it screws up the Rights section.

SEE ALSO

SVG::Metadata, inkscape, XML::Twig

AUTHOR

Bryce Harrington <bryce@bryceharrington.org>

<http://www.bryceharrington.org/>

COPYRIGHT

Copyright (C) 2004 Bryce Harrington. All Rights Reserved.

This script is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

Search for    or go to Top of page |  Section 1 |  Main Index


perl v5.20.3 SVG_ANNOTATE (1) 2005-08-11

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.