d3.rb 965 B

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