Structured Data Linter
Extract and validate embedded RDF markup in HTML and other formats.
DESCRIPTION
The Structured Data Linter digests structured data, in the form of HTML marked-up with RDFa or Microdata, or other RDF technologies supported in [Linked Data][linkeddata].
The linter is part of the structured-data.org, and runs at linter.structured-data.org
- Includes N-Triples support using RDF.rb.
- Includes RDF/XML support using the RDF::RDFXML gem.
- Includes Turtle and Notation3 support using the RDF::N3 gem.
- Includes RDFa support using the RDF::RDFa gem.
- Includes RDF/JSON support using the [RDF::JSON][] gem.
- Includes TriX support using the RDF::TriX gem.
- Includes Microdata support using the RDF::Microdata gem.
- Includes JSON-LD support using the JSON::LD gem.
Output is expressed as HTML+RDFa in a Snippet format.
Code layout
This application is represented as a Sinatra application implemented in Ruby.
config.ru -- [Rack][] configuration file, to start application
lib
rdf
linter
parser.rb -- Parse and transform input to RDFa.
rdfa_template.rb -- RDFa output templates in [Haml][]
snippets -- Snippet templates
views -- Templates for view generation in [Erubis][]
vocab_defs.rb -- Vocabulary definitions
writer.rb -- Sub-class of [RDFa][] writer for generating snippet output.
linter.rb -- Controller defining HTTP endpoints
public
spec -- Tests
test_data -- Test Data
Dependencies
- Haml (>= 3.0.0)
- Erubis (>= 2.6.6)
- RDF.rb (>= 0.3.3)
- Linked Data (>= 0.3.2)
- Linked Data for Rack (>= 0.3.1)
- Linked Data for Sinatra (>= 0.3.1)
- Nokogiri (>= 1.4.4)
- RDF::JSON (>= 0.3.1)
- RDF::Microdata (>= 0.1.0)
- RDF::N3 (>= 0.3.3)
- RDF::RDFa (>= 0.3.3)
- RDF::RDFXML (>= 0.3.3)
- RDF::TriX (>= 0.3.1)
- JSON::LD (>= 0.0.4)
AUTHORS
- Gregg Kellogg - http://kellogg-assoc.com/
- Stéphane Corlosquet
Setup notes
-
public/.htaccess
-
Bundle installed using:
bundle install --path vendor/bundler
-
Start the server with:
bundle exec shotgun -p 3000 config.ru
FEEDBACK
Contributing
- Do your best to adhere to the existing coding conventions and idioms.
- Don't use hard tabs, and don't leave trailing whitespace on any line.
- Do document every method you add using [YARD][] annotations. Read the [tutorial][YARD-GS] or just look at the existing code for examples.
- Don't touch the
.gemspec
,VERSION
orAUTHORS
files. If you need to change them, do so on your private branch only. - Do feel free to add yourself to the
CREDITS
file and the corresponding list in the theREADME
. Alphabetical order applies. - Do note that in order for us to merge any non-trivial changes (as a rule of thumb, additions larger than about 15 lines of code), we need an explicit [public domain dedication][PDD] on record from you.
License
This is free and unencumbered public domain software. For more information, see http://unlicense.org/ or the accompanying {file:UNLICENSE} file.