Commits

Toby Inkster committed 32efa9d

Release HTML-HTML5-Microdata-Parser 0.01.

Comments (0)

Files changed (14)

-Revision history for Perl extension HTML::HTML5::Microdata::Parser.
+############################################################################
+## Changes #################################################################
+############################################################################
 
-0.01  Thu Dec  3 16:29:42 2009
-	- original version; created by h2xs 1.23 with options
-		-X -A -b 5.8.1 --skip-warnings --skip-exporter HTML::HTML5::Microdata::Parser
+HTML-HTML5-Microdata-Parser
+===========================
 
+Created:      2009-12-03
+Home page:    <http://search.cpan.org/dist/HTML-HTML5-Microdata-Parser/>
+Bug tracker:  <http://rt.cpan.org/Dist/Display.html?Queue=HTML-HTML5-Microdata-Parser>
+Maintainer:   Toby Inkster
+
+0.01 [2010-01-08]
+
+#############################################################
+
+@prefix :        <http://usefulinc.com/ns/doap#> .
+@prefix dcs:     <http://ontologi.es/doap-changeset#> .
+@prefix dc:      <http://purl.org/dc/terms/> .
+@prefix foaf:    <http://xmlns.com/foaf/0.1/> .
+@prefix my:      <http://search.cpan.org/dist/HTML-HTML5-Microdata-Parser/#> .
+@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix toby:    <http://tobyinkster.co.uk/#> .
+@prefix xsd:     <http://www.w3.org/2001/XMLSchema#> .
+
+#############################################################
+
+<>
+
+	dc:title         "Changes" ;
+	dc:description   "Revision history for Perl extension HTML::HTML5::Microdata::Parser."@en ;
+	dc:subject       my:project ;
+	dc:creator       toby:i .
+
+#############################################################
+
+my:v_0.01
+
+	a               :Version ;
+	dc:issued       "2010-01-08"^^xsd:date ;
+	:revision       "0.01"^^xsd:string ;
+	:file-release   <http://backpan.perl.org/authors/id/T/TO/TOBYINK/HTML-HTML5-Microdata-Parser-0.01.tar.gz> ;
+	rdfs:comment    "Original version"@en .
+
+#############################################################
+
+my:project
+
+	a               :Project ;
+	:name           "HTML-HTML5-Microdata-Parser" ;
+	:shortdesc      "Example Project"@en ;
+	:programming-language  "Perl" ;
+	:homepage       <http://search.cpan.org/dist/HTML-HTML5-Microdata-Parser/> ;
+	:download-page  <http://search.cpan.org/dist/HTML-HTML5-Microdata-Parser/> ;
+	:bug-database   <http://rt.cpan.org/Dist/Display.html?Queue=HTML-HTML5-Microdata-Parser> ;
+	:repository     [ a :SVNRepository ; :browse <http://goddamn.co.uk/viewvc/perlmods/HTML-HTML5-Microdata-Parser/> ] ;
+	:maintainer     toby:i ;
+	:developer      toby:i ;
+	:documenter     toby:i ;
+	:tester         toby:i ;
+	:created        "2009-12-03"^^xsd:date ;
+	:license        <http://dev.perl.org/licenses/> ;
+	:release        my:v_0.01 .
+
+#############################################################
+
+toby:i
+
+	a               foaf:Person ;
+	foaf:name       "Toby Inkster" ;
+	foaf:homepage   <http://tobyinkster.co.uk/> ;
+	foaf:page       <http://search.cpan.org/~tobyink/> .
+
+#############################################################
+<?xml version="1.0" encoding="utf-8"?>
+<rdf:RDF
+   xmlns:dc="http://purl.org/dc/terms/"
+   xmlns:dcs="http://ontologi.es/doap-changeset#"
+   xmlns:foaf="http://xmlns.com/foaf/0.1/"
+   xmlns:my="http://search.cpan.org/dist/HTML-HTML5-Microdata-Parser/#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+   xmlns:toby="http://tobyinkster.co.uk/#"
+   xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
+   xmlns="http://usefulinc.com/ns/doap#">
+  <rdf:Description rdf:about="file:///home/tai/src/perlmods/HTML-HTML5-Microdata-Parser/Changes.ttl">
+    <dc:creator rdf:resource="http://tobyinkster.co.uk/#i"/>
+    <dc:description xml:lang="en">Revision history for Perl extension HTML::HTML5::Microdata::Parser.</dc:description>
+    <dc:subject rdf:resource="http://search.cpan.org/dist/HTML-HTML5-Microdata-Parser/#project"/>
+    <dc:title>Changes</dc:title>
+  </rdf:Description>
+  <Version rdf:about="http://search.cpan.org/dist/HTML-HTML5-Microdata-Parser/#v_0.01">
+    <dc:issued rdf:datatype="http://www.w3.org/2001/XMLSchema#date">2010-01-08</dc:issued>
+    <file-release rdf:resource="http://backpan.perl.org/authors/id/T/TO/TOBYINK/HTML-HTML5-Microdata-Parser-0.01.tar.gz"/>
+    <revision rdf:datatype="http://www.w3.org/2001/XMLSchema#string">0.01</revision>
+    <rdfs:comment xml:lang="en">Original version</rdfs:comment>
+  </Version>
+  <Project rdf:about="http://search.cpan.org/dist/HTML-HTML5-Microdata-Parser/#project">
+    <bug-database rdf:resource="http://rt.cpan.org/Dist/Display.html?Queue=HTML-HTML5-Microdata-Parser"/>
+    <created rdf:datatype="http://www.w3.org/2001/XMLSchema#date">2009-12-03</created>
+    <developer rdf:resource="http://tobyinkster.co.uk/#i"/>
+    <documenter rdf:resource="http://tobyinkster.co.uk/#i"/>
+    <download-page rdf:resource="http://search.cpan.org/dist/HTML-HTML5-Microdata-Parser/"/>
+    <homepage rdf:resource="http://search.cpan.org/dist/HTML-HTML5-Microdata-Parser/"/>
+    <license rdf:resource="http://dev.perl.org/licenses/"/>
+    <maintainer rdf:resource="http://tobyinkster.co.uk/#i"/>
+    <name>HTML-HTML5-Microdata-Parser</name>
+    <programming-language>Perl</programming-language>
+    <release rdf:resource="http://search.cpan.org/dist/HTML-HTML5-Microdata-Parser/#v_0.01"/>
+    <repository>
+      <SVNRepository>
+        <browse rdf:resource="http://goddamn.co.uk/viewvc/perlmods/HTML-HTML5-Microdata-Parser/"/>
+      </SVNRepository>
+    </repository>
+    <shortdesc xml:lang="en">Example Project</shortdesc>
+    <tester rdf:resource="http://tobyinkster.co.uk/#i"/>
+  </Project>
+  <foaf:Person rdf:about="http://tobyinkster.co.uk/#i">
+    <foaf:homepage rdf:resource="http://tobyinkster.co.uk/"/>
+    <foaf:name>Toby Inkster</foaf:name>
+    <foaf:page rdf:resource="http://search.cpan.org/~tobyink/"/>
+  </foaf:Person>
+</rdf:RDF>

HTML-HTML5-Microdata-Parser-0.01.tar.gz

Binary file added.
 Changes
+Changes.ttl
+Changes.xml
 Makefile.PL
 MANIFEST
+MANIFEST.SKIP
 README
-t/HTML-HTML5-Microdata-Parser.t
+META.yml
+SIGNATURE
+
 lib/HTML/HTML5/Microdata/Parser.pm
-inc/Module/Install/ReadmeFromPod.pm
+
+t/00sig.t
+t/01basic.t
+
+inc/Module/AutoInstall.pm
+inc/Module/Install/AutoInstall.pm
+inc/Module/Install/Base.pm
+inc/Module/Install/Can.pm
+inc/Module/Install/DOAPChangeSets.pm
 inc/Module/Install/Fetch.pm
-inc/Module/Install/Base.pm
+inc/Module/Install/Include.pm
 inc/Module/Install/Makefile.pm
-inc/Module/Install/AutoInstall.pm
 inc/Module/Install/Metadata.pm
-inc/Module/Install/Can.pm
+inc/Module/Install.pm
 inc/Module/Install/Win32.pm
-inc/Module/Install/Include.pm
 inc/Module/Install/WriteAll.pm
-inc/Module/Install.pm
-inc/Module/AutoInstall.pm
-
+inc/Test/Signature.pm
+^Makefile$
+^blib/
+^pm_to_blib
+^blibdirs
+\.svn
+^example.*\.pl$
+^[^/]+\.(tar\.gz|tar\.bz2|tgz|tbz2|tbz|zip|tar)$
+---
+abstract: 'Parse HTML5 Microdata with Perl'
+author:
+  - 'Toby Inkster <tobyink@cpan.org>'
+build_requires:
+  ExtUtils::MakeMaker: 6.42
+  Test::More: 0.61
+configure_requires:
+  ExtUtils::MakeMaker: 6.42
+distribution_type: module
+generated_by: 'Module::Install version 0.91'
+license: perl
+meta-spec:
+  url: http://module-build.sourceforge.net/META-spec-v1.4.html
+  version: 1.4
+name: HTML-HTML5-Microdata-Parser
+no_index:
+  directory:
+    - inc
+    - t
+requires:
+  Data::Dumper: 0
+  Encode: 0
+  HTML::HTML5::Parser: 0
+  HTML::HTML5::Sanity: 0
+  RDF::Trine: 0.112
+  URI::Escape: 0
+  URI::URL: 0
+  XML::LibXML: 1.60
+  perl: 5.8.1
+resources:
+  bugtracker: http://rt.cpan.org/Dist/Display.html?Queue=HTML-HTML5-Microdata-Parser
+  homepage: http://search.cpan.org/dist/HTML-HTML5-Microdata-Parser/
+  license: http://dev.perl.org/licenses/
+  repository: http://goddamn.co.uk/viewvc/perlmods/HTML-HTML5-Microdata-Parser/
+version: 0.01
 
 use inc::Module::Install;
 
+my $dist = 'HTML-HTML5-Microdata-Parser';
+my $fn   = "lib/$dist.pm"; $fn =~ s#-#/#g;
+
+name                $dist;
+perl_version_from   $fn;
+version_from        $fn;
+abstract_from       $fn;
+author              'Toby Inkster <tobyink@cpan.org>';
 license             'perl';
 
-name                'HTML-HTML5-Microdata-Parser';
-author              'Toby Inkster <tobyink@cpan.org>';
-perl_version_from   'lib/HTML/HTML5/Microdata/Parser.pm';
-version_from        'lib/HTML/HTML5/Microdata/Parser.pm';
-abstract_from       'lib/HTML/HTML5/Microdata/Parser.pm';
-
 test_requires       'Test::More' => '0.61';
 
-requires            'XML::LibXML'    => 0;
+requires            'Data::Dumper'        => 0;
+requires            'Encode'              => 0;
+requires            'HTML::HTML5::Parser' => 0;
+requires            'HTML::HTML5::Sanity' => 0;
+requires            'RDF::Trine'          => '0.112';
+requires            'URI::Escape'         => 0;
+requires            'URI::URL'            => 0;
+requires            'XML::LibXML'         => '1.60';
 
+resources(
+	'homepage'   => "http://search.cpan.org/dist/$dist/",
+	'repository' => "http://goddamn.co.uk/viewvc/perlmods/$dist/",
+	'bugtracker' => "http://rt.cpan.org/Dist/Display.html?Queue=$dist",
+	);
+	
+write_doap_changes;
+write_doap_changes_xml;
+
+include 'Test::Signature';
 auto_install;
-
-sign;
-
-WriteAll;
-
-use Pod::Text;
-my $parser = Pod::Text->new (sentence => 0, width => 78);
-$parser->parse_from_file('lib/HTML/HTML5/Microdata/Parser.pm', 'README');
+WriteAll(
+	'meta' => 1,
+	'sign' => 1,
+	);
+#!/usr/bin/perl
+
+use 5.010;
+use strict;
+use warnings;
+use lib "lib";
+use HTML::HTML5::Microdata::Parser;
+
+my $h = <<HTML;
+<html lang="">
+<head>
+	<title >Foo bar</title>
+	<link rel="up up up FOOBLE alternate stylesheet fooble http://EXAMPLE.COM/" href="foo.css">
+	<meta name="http://search.cpan.org/dist/HTML-HTML5-Microdata-Parser/#auto_config"
+	  content="xhtml_time=1" />
+	  <meta  http-equiv=content-language content=en-gb-oed>
+	</head>
+
+<div itemscope>
+ <p>My name is <span itemprop="name">Elizabeth</span>.</p>
+</div>
+
+<div itemscope>
+ <p>My name is <span itemprop="name">Daniel</span>.</p>
+</div>
+
+<div itemscope>
+ <p>My name is <span itemprop="name">Neil</span>.</p>
+ <p>My band is called <span itemprop="band">Four Parts Water</span>.</p>
+ <p>I am <span itemprop="nationality">British</span>.</p>
+ <p itemprop="http://example.net/">Foo</p>
+</div>
+
+<section xml:lang="en-us" itemref="fooble" itemscope itemid="#hedral" itemtype="http://example.org/animals#cat">
+ <h1 itemprop="name">Hedral</h1>
+ <p itemprop="desc">Hedral is a male american domestic
+ shorthair, with a fluffy black fur with white paws and belly.</p>
+ <img itemprop="img" src="hedral.jpeg" alt="" title="Hedral, age 18 months">
+</section>
+
+<p id="fooble">
+  <time itemprop="some-date" datetime="2009-12">this month</time>
+</p>
+
+HTML
+
+my $p = HTML::HTML5::Microdata::Parser->new($h, 'http://example.com/', {'auto_config'=>1});
+$p->consume;
+my $i = $p->graph->as_stream;
+
+while (my $st = $i->next)
+{
+	say $st->as_string;
+}
+

foo.pl

-#!/usr/bin/perl
-
-use 5.010;
-use strict;
-use warnings;
-use lib "lib";
-use HTML::HTML5::Microdata::Parser;
-
-my $h = <<HTML;
-<html lang="">
-<head>
-	<title >Foo bar</title>
-	<link rel="up up up FOOBLE alternate stylesheet fooble http://EXAMPLE.COM/" href="foo.css">
-	<meta name="http://search.cpan.org/dist/HTML-HTML5-Microdata-Parser/#auto_config"
-	  content="xhtml_time=1" />
-	  <meta  http-equiv=content-language content=en-gb-oed>
-	</head>
-
-<div itemscope>
- <p>My name is <span itemprop="name">Elizabeth</span>.</p>
-</div>
-
-<div itemscope>
- <p>My name is <span itemprop="name">Daniel</span>.</p>
-</div>
-
-<div itemscope>
- <p>My name is <span itemprop="name">Neil</span>.</p>
- <p>My band is called <span itemprop="band">Four Parts Water</span>.</p>
- <p>I am <span itemprop="nationality">British</span>.</p>
- <p itemprop="http://example.net/">Foo</p>
-</div>
-
-<section xml:lang="en-us" itemref="fooble" itemscope itemid="#hedral" itemtype="http://example.org/animals#cat">
- <h1 itemprop="name">Hedral</h1>
- <p itemprop="desc">Hedral is a male american domestic
- shorthair, with a fluffy black fur with white paws and belly.</p>
- <img itemprop="img" src="hedral.jpeg" alt="" title="Hedral, age 18 months">
-</section>
-
-<p id="fooble">
-  <time itemprop="some-date" datetime="2009-12">this month</time>
-</p>
-
-HTML
-
-my $p = HTML::HTML5::Microdata::Parser->new($h, 'http://example.com/', {'auto_config'=>1});
-$p->consume;
-my $i = $p->graph->as_stream;
-
-while (my $st = $i->next)
-{
-	say $st->as_string;
-}
-

lib/HTML/HTML5/Microdata/Parser.pm

 
 This package aims to have a roughly compatible API to RDF::RDFa::Parser.
 
+Microdata is an experimental metadata format, not in wide use. Use this module
+at your own risk.
+
 =over 8
 
 =item $p = HTML::HTML5::Microdata::Parser->new($html, $baseuri, \%options, $storage)
 
 =head1 COPYRIGHT AND LICENSE
 
-Copyright (C) 2009 by Toby Inkster
+Copyright (C) 2009-2010 by Toby Inkster
 
 This library is free software; you can redistribute it and/or modify
 it under the same terms as Perl itself, either Perl version 5.8.1 or,
+use lib 'inc';
+use Test::More tests => 1;
+use Test::Signature;
+signature_ok();
+use Test::More tests => 1;
+BEGIN { use_ok('HTML::HTML5::Microdata::Parser') };
+

t/HTML-HTML5-Microdata-Parser.t

-# Before `make install' is performed this script should be runnable with
-# `make test'. After `make install' it should work as `perl HTML-HTML5-Microdata-Parser.t'
-
-#########################
-
-# change 'tests => 1' to 'tests => last_test_to_print';
-
-use Test::More tests => 1;
-BEGIN { use_ok('HTML::HTML5::Microdata::Parser') };
-
-#########################
-
-# Insert your test code below, the Test::More module is use()ed here so read
-# its man page ( perldoc Test::More ) for help writing this test script.
-