seebi / rdf.sh

A multi-tool shell script for doing Semantic Web jobs on the command line.
GNU General Public License v3.0
120 stars 9 forks source link

Feature: use any23 for RDF retrieval #8

Closed depressiveRobot closed 8 years ago

depressiveRobot commented 9 years ago

It would be nice to be able to use rover feature of the any23 libray instead of curl. This would allow rdf.sh to work with microdata/RDFa too.

For example:

$ any23 rover -t -f turtle http://schema.org/Event
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

------------------------------------------------------------------------
Apache Any23 :: rover
------------------------------------------------------------------------

[Fatal Error] :133:71: The entity "nbsp" was referenced, but not declared.
@prefix dcterms: <http://purl.org/dc/terms/> .

<http://schema.org/Event> dcterms:title "Event - schema.org"@en ;
    <http://www.w3.org/ns/rdfa#usesVocabulary> <http://schema.org/> ;
    a <http://www.w3.org/2000/01/rdf-schema#Class> ;
    <http://www.w3.org/2002/07/owl#equivalentClass> <http://purl.org/dc/dcmitype/Event> ;
    <http://www.w3.org/2000/01/rdf-schema#label> "Event"@en ;
    <http://www.w3.org/2000/01/rdf-schema#comment> "An event happening at a certain time and location, such as a concert, lecture, or festival. Ticketing information may be added via the 'offers' property. Repeated events may be structured as separate Event objects."@en ;
    <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://schema.org/Event> .

<http://schema.org/attendee> a <http://www.w3.org/2000/01/rdf-schema#Property> ;
    <http://www.w3.org/2000/01/rdf-schema#label> "attendee"@en ;
    <http://schema.org/rangeIncludes> <http://schema.org/Organization> .

------------------------------------------------------------------------
Apache Any23 SUCCESS
Total time: 1s
Finished at: Thu Jan 29 14:23:45 CET 2015
Final Memory: 65M/479M
------------------------------------------------------------------------
$ rdf desc http://schema.org/Event
rapper: Error - URI http://schema.org/Event - Failed to guess parser from content type '(none)'
rapper: Failed to parse file <stdin> guess content
roqet: invalid output result format `ntriples' for `--results'
Try 'roqet -h' for a list of valid formats
Try `roqet --help' for more information.
grep: repetition-operator operand invalid
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .