Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/generate #40

Merged
merged 25 commits into from May 1, 2016
Merged

Feature/generate #40

merged 25 commits into from May 1, 2016

Conversation

gkellogg
Copy link
Member

  • Add Vocabulary.to_ttl, to_jsonld, and to_html to generate pretty version of Turtle, JSON-LD and HTML+RDFa for the vocabulary, using some heuristics on the values from the Vocabulary description.
  • Generate triples from graph, rather than directly from vocabulary, and allow the graph to be provided as an optional argument. Also, allow additional prefixes to be added via optional argument. This allows the vocabulary definition to be used to get data that may be excluded from the built-in version, including literal language and datatypes.
  • Add gen-vocab CLI command.
  • HTML+RDFa can use either ERB or Haml templates (defaults to etc/template.erb). CLI help points to repository location containing templates, allowing customization.

Note, there are CLI changes on the develop branch or RDF.rb, which need to be released along with this as a version 2.0.1.

gkellogg and others added 21 commits April 20, 2016 19:09
…cabulary, using some heuristics on the values from the Vocabulary description.
…d allow the graph to be provided as an optional argument. Also, allow additional prefixes to be added via optional argument.
…on, along with prefixes to be added to the outer context.
…aining Haml and ERB templates for example use.
…he to_jsonld serialization should perhaps check the datatype and the range of the term definition in the context to serialize this better. Shouldn't require any changes to HTML generation.
@no-reply
Copy link
Member

Awesome. I'll be able to give this a more serious look over the weekend.

The failing tests are rbx specific; they seem familiar from my rdf-ldp work, but I don't think I ever tracked down the source.

@gkellogg
Copy link
Member Author

I thought I had avoided that problem here. I'll check again. It stems from a problem with RDF::Vocabulary::Term#to_uri that may relate to named argument handling in Rubinius.

@no-reply no-reply merged commit d527444 into develop May 1, 2016
@no-reply no-reply deleted the feature/generate branch May 1, 2016 23:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants