Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Perl Modules

    SVG::Metadata 0.28

    Download button

    No screenshots available
    Downloads: 501  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Bryce Harrington | More programs
    Perl Artistic License / FREE
    April 24th, 2007, 03:05 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    SVG::Metadata description

    A Perl module to capture metadata info about an SVG file.

    SVG::Metadata is a Perl module to capture metadata info about an SVG file.

    SYNOPSIS

    use SVG::Metadata;

    my $svgmeta = new SVG::Metadata;

    $svgmeta->parse($filename)
    or die "Could not parse $filename: " . $svgmeta->errormsg();
    $svgmeta2->parse($filename2)
    or die "Could not parse $filename: " . $svgmeta->errormsg();

    # Do the files have the same metadata (author, title, license)?
    if (! $svgmeta->compare($svgmeta2) ) {
    print "$filename is different than $filename2n";
    }

    if ($svgmeta->title() eq '') {
    $svgmeta->title('Unknown');
    }

    if ($svgmeta->author() eq '') {
    $svgmeta->author('Unknown');
    }

    if ($svgmeta->license() eq '') {
    $svgmeta->license('Unknown');
    }

    if (! $svgmeta->keywords()) {
    $svgmeta->addKeyword('unsorted');
    } elsif ($svgmeta->hasKeyword('unsorted') && $svgmeta->keywords()>1) {
    $svgmeta->removeKeyword('unsorted');
    }

    print $svgmeta->to_text();


    This module provides a way of extracting, browsing and using RDF metadata embedded in an SVG file.

    The SVG spec itself does not provide any particular mechanisms for handling metadata, but instead relies on embedded, namespaced RDF sections, as per XML philosophy. Unfortunately, many SVG tools don't support the concept of RDF metadata; indeed many don't support the idea of embedded XML "islands" at all. Some will even ignore and drop the rdf data entirely when encountered.

    The motivation for this module is twofold. First, it provides a mechanism for accessing this metadata from the SVG files. Second, it provides a means of validating SVG files to detect if they have the metadata.

    The motivation for this script is primarily for the Open Clip Art Library (http://www.openclipart.org), as a way of filtering out submissions that lack metadata from being included in the official distributions. A secondary motivation is to serve as a testing tool for SVG editors like Inkscape (http://www.inkscape.org).

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    capture metadata information | capture SVG metadata | Perl module | module | capture | SVG

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM