Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
First commit, completed, but un-debugged, reader.
- Loading branch information
0 parents
commit 7fdefd6
Showing
76 changed files
with
21,706 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/usr/bin/env ruby -rubygems | ||
# -*- encoding: utf-8 -*- | ||
|
||
Gem::Specification.new do |gem| | ||
gem.version = File.read('VERSION').chomp | ||
gem.date = File.mtime('VERSION').strftime('%Y-%m-%d') | ||
|
||
gem.name = "rdf-microdata" | ||
gem.homepage = "http://github.com/gkellogg/rdf-microdata" | ||
gem.license = 'Public Domain' if gem.respond_to?(:license=) | ||
gem.summary = "Microdata reader for Ruby." | ||
gem.description = gem.summary | ||
gem.rubyforge_project = 'rdf-microdata' | ||
|
||
gem.authors = ['Gregg Kellogg'] | ||
gem.email = 'public-rdf-ruby@w3.org' | ||
|
||
gem.platform = Gem::Platform::RUBY | ||
gem.files = %w(AUTHORS README UNLICENSE VERSION) + Dir.glob('lib/**/*.rb') | ||
#gem.bindir = %q(bin) | ||
#gem.executables = %w(json_ld) | ||
#gem.default_executable = gem.executables.first | ||
gem.require_paths = %w(lib) | ||
gem.extensions = %w() | ||
gem.test_files = %w() | ||
gem.has_rdoc = false | ||
|
||
gem.required_ruby_version = '>= 1.8.1' | ||
gem.requirements = [] | ||
gem.add_runtime_dependency 'rdf', '>= 0.3.3' | ||
gem.add_runtime_dependency 'nokogiri', '>= 1.4.4' | ||
gem.add_development_dependency 'yard' , '>= 0.6.0' | ||
gem.add_development_dependency 'rspec', '>= 2.5.0' | ||
gem.add_development_dependency 'rdf-spec', '>= 0.3.2' | ||
gem.add_development_dependency 'rdf-n3', '>= 0.3.3' | ||
gem.add_development_dependency 'rdf-isomorphic', '>= 0.3.4' | ||
gem.post_install_message = nil | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--title "Microdata reader for RDF.rb." | ||
--output-dir doc/yard | ||
--protected | ||
--no-private | ||
--hide-void-return | ||
--markup markdown | ||
--readme README.md | ||
- | ||
History.md | ||
AUTHORS | ||
VERSION | ||
UNLICENSE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* Gregg Kellogg <gregg@kellogg-assoc.com> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
### 0.0.1 | ||
* Initial release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
README.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
# RDF::Microdata reader/writer | ||
|
||
[Microdata][] parser for RDF.rb. | ||
|
||
## DESCRIPTION | ||
RDF::Microdata is a Microdata reader for Ruby using the [RDF.rb][RDF.rb] library suite. | ||
|
||
## FEATURES | ||
RDF::Microdata parses [Microdata][] into statements or triples. | ||
|
||
* Microdata parser. | ||
* Uses Nokogiri for parsing HTML | ||
|
||
Install with 'gem install rdf-microdata' | ||
|
||
## Usage | ||
|
||
### Reading RDF data in the RDFa format | ||
|
||
graph = RDF::Graph.load("etc/foaf.html", :format => :microdata) | ||
|
||
## Dependencies | ||
* [RDF.rb](http://rubygems.org/gems/rdf) (>= 0.3.3) | ||
* [Nokogiri](http://rubygems.org/gems/nokogiri) (>= 1.3.3) | ||
|
||
## Documentation | ||
Full documentation available on [RubyForge](http://rdf.rubyforge.org/microdata) | ||
|
||
### Principle Classes | ||
* {RDF::Microdata::Format} | ||
* {RDF::Microdata::HTML} | ||
Asserts :html format, text/html mime-type and .html file extension. | ||
* {RDF::RDFa::Reader} | ||
|
||
### Additional vocabularies | ||
|
||
## TODO | ||
* Add support for LibXML and REXML bindings, and use the best available | ||
* Consider a SAX-based parser for improved performance | ||
|
||
## Resources | ||
* [RDF.rb][RDF.rb] | ||
* [Documentation](http://rdf.rubyforge.org/microdata) | ||
* [History](file:file.History.html) | ||
* [Microdata][] | ||
|
||
## Author | ||
* [Gregg Kellogg](http://github.com/gkellogg) - <http://kellogg-assoc.com/> | ||
|
||
## 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` or `AUTHORS` 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 the `README`. 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. | ||
|
||
## FEEDBACK | ||
|
||
* gregg@kellogg-assoc.com | ||
* <http://rubygems.org/rdf-microdata> | ||
* <http://github.com/gkellogg/rdf-microdata> | ||
* <http://lists.w3.org/Archives/Public/public-rdf-ruby/> | ||
|
||
[RDF.rb]: http://rdf.rubyforge.org/ | ||
[YARD]: http://yardoc.org/ | ||
[YARD-GS]: http://rubydoc.info/docs/yard/file/docs/GettingStarted.md | ||
[PDD]: http://lists.w3.org/Archives/Public/public-rdf-ruby/2010May/0013.html | ||
[Microdata]: http://www.w3.org/TR/2011/WD-microdata-20110525/ "HTML Microdata" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
require 'rubygems' | ||
|
||
task :default => [ :spec ] | ||
|
||
namespace :gem do | ||
desc "Build the rdf-microdata-#{File.read('VERSION').chomp}.gem file" | ||
task :build do | ||
sh "gem build .gemspec" | ||
end | ||
|
||
desc "Release the rdf-microdata-#{File.read('VERSION').chomp}.gem file" | ||
task :release do | ||
sh "gem push rdf-microdata-#{File.read('VERSION').chomp}.gem" | ||
end | ||
end | ||
|
||
require 'rspec/core/rake_task' | ||
desc 'Run specifications' | ||
RSpec::Core::RakeTask.new(:spec) do |spec| | ||
spec.rspec_opts = %w(--options spec/spec.opts) if File.exists?('spec/spec.opts') | ||
end | ||
|
||
desc "Run specs through RCov" | ||
RSpec::Core::RakeTask.new("spec:rcov") do |spec| | ||
spec.rcov = true | ||
spec.rcov_opts = %q[--exclude "spec"] | ||
end | ||
|
||
desc "Generate HTML report specs" | ||
RSpec::Core::RakeTask.new("doc:spec") do |spec| | ||
spec.rspec_opts = ["--format", "html", "-o", "doc/spec.html"] | ||
end | ||
|
||
require 'yard' | ||
namespace :doc do | ||
YARD::Rake::YardocTask.new | ||
end | ||
|
||
task :default => :spec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
This is free and unencumbered software released into the public domain. | ||
|
||
Anyone is free to copy, modify, publish, use, compile, sell, or | ||
distribute this software, either in source code form or as a compiled | ||
binary, for any purpose, commercial or non-commercial, and by any | ||
means. | ||
|
||
In jurisdictions that recognize copyright laws, the author or authors | ||
of this software dedicate any and all copyright interest in the | ||
software to the public domain. We make this dedication for the benefit | ||
of the public at large and to the detriment of our heirs and | ||
successors. We intend this dedication to be an overt act of | ||
relinquishment in perpetuity of all present and future rights to this | ||
software under copyright law. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | ||
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
OTHER DEALINGS IN THE SOFTWARE. | ||
|
||
For more information, please refer to <http://unlicense.org/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
0.0.1 |
Oops, something went wrong.