Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bduggan/p6-rdf-turtle
RDF Turtle parser
https://github.com/bduggan/p6-rdf-turtle
rdf turtle-rdf
Last synced: about 17 hours ago
JSON representation
RDF Turtle parser
- Host: GitHub
- URL: https://github.com/bduggan/p6-rdf-turtle
- Owner: bduggan
- License: mit
- Created: 2018-06-22T14:45:19.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-08-06T04:50:53.000Z (over 6 years ago)
- Last Synced: 2024-11-21T07:18:49.025Z (2 months ago)
- Topics: rdf, turtle-rdf
- Language: Perl 6
- Size: 210 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# RDF::Turtle
[![Build Status](https://travis-ci.org/bduggan/p6-rdf-turtle.svg)](https://travis-ci.org/bduggan/p6-rdf-turtle)
# Description
This is a parser for the Terse RDF Triple Language.
See [https://www.w3.org/TeamSubmission/turtle/](https://www.w3.org/TeamSubmission/turtle/).
Sample usage of RDF::Turtle:
```p6
my $parsed = parse-turtle('file.ttl'.IO.slurp);
my $triples = $parsed.made;
for @$triples -> ($subject, $predicate, $object) {
say "$subject $predicate $object .";
}
```Also included is a sample command line parser, [eg/parse.p6](https://github.com/bduggan/p6-rdf-turtle/blob/master/eg/parse.p6).
Sample usage:
Parse a TTL file:
./eg/parse.p6 input.ttl
Convert to N-triples format:
./eg/parse.p6 input.ttl --triples
The spec tests are included in [t/tests](https://github.com/bduggan/p6-rdf-turtle/tree/master/t/tests). As of this
writing, all of the good tests are parsed, and some of the correct
outputs are generated.