File: example7.pl

package info (click to toggle)
libhtml-microformats-perl 0.105-6
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 1,340 kB
  • sloc: perl: 14,121; makefile: 10; sh: 1
file content (22 lines) | stat: -rwxr-xr-x 484 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/perl

use lib "lib";
use HTML::Microformats;
use strict;
use JSON;
use LWP::Simple qw(get);
use Data::Dumper;
use RDF::TrineShortcuts;

my $uri  = 'http://csarven.ca/cv';
my $html = get($uri);
utf8::upgrade($html);

my $doc  = HTML::Microformats->new_document($html, $uri);
$doc->assume_all_profiles;

my @resumes = $doc->objects('hResume');
my $resume  = $resumes[0];

# print to_json($resume, {pretty=>1, convert_blessed=>1});
print rdf_string($resume->model, 'rdfxml');