d3.rb 849 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. module Docs
  2. class D3 < UrlScraper
  3. self.name = 'D3.js'
  4. self.slug = 'd3'
  5. self.type = 'd3'
  6. self.version = '3.5.2'
  7. self.base_url = 'https://github.com/mbostock/d3/wiki/'
  8. self.root_path = 'API-Reference'
  9. html_filters.push 'd3/clean_html', 'd3/entries'
  10. options[:container] = '#wiki-wrapper'
  11. options[:only] = %w(
  12. Selections
  13. Transitions
  14. Arrays
  15. Math
  16. Requests
  17. Formatting
  18. CSV
  19. Localization
  20. Colors
  21. Namespaces
  22. Internals)
  23. options[:only_patterns] = [
  24. /\-Scales\z/,
  25. /\ASVG\-/,
  26. /\ATime\-/,
  27. /\-Layout\z/,
  28. /\AGeo\-/,
  29. /\-Geom\z/,
  30. /\-Behavior\z/]
  31. options[:skip_patterns] = [/\//]
  32. options[:attribution] = <<-HTML
  33. &copy; 2014 Michael Bostock<br>
  34. Licensed under the BSD License.
  35. HTML
  36. end
  37. end