App-skos2jskos
view release on metacpan or search on metacpan
script/skos2jskos view on Meta::CPAN
use RDF::Query;
use RDF::Query::Client;
my $source = $opt{sparql} || RDF::Trine::Model->new;
if ( $opt{sparql} ) {
info "Getting RDF from SPARQL endpoint " . $opt{sparql};
}
elsif ( $ARGV[0] =~ qr{^https?://} ) {
info "Reading RDF from $ARGV[0]";
RDF::Trine->default_useragent->ssl_opts( verify_hostname => 0 );
RDF::Trine::Parser->parse_url_into_model( $ARGV[0], $source );
debug $source->size . " triples";
}
else {
info "Reading RDF files";
my $size = 0;
foreach my $file (@ARGV) {
my $parser = RDF::Trine::Parser->guess_parser_by_filename($file);
$parser->parse_file_into_model( "file://$file", $file, $source );
debug $source->size - $size . " triples from $file";
( run in 2.149 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )