| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- module Docs
- class D3 < UrlScraper
- self.name = 'D3.js'
- self.slug = 'd3'
- self.type = 'd3'
- self.links = {
- home: 'https://d3js.org/',
- code: 'https://github.com/d3/d3'
- }
- options[:container] = '.markdown-body'
- options[:attribution] = <<-HTML
- © 2010–2016 Michael Bostock<br>
- Licensed under the BSD License.
- HTML
- version '4' do
- self.release = '4.2.6'
- self.base_url = 'https://github.com/d3/'
- self.root_path = 'd3/blob/master/API.md'
- html_filters.push 'd3/clean_html', 'd3/entries_v4'
- options[:only_patterns] = [/\Ad3[\-\w]+\z/, /\Ad3\/blob\/master\/changes\.md\z/i]
- options[:skip_patterns] = [/3\.x-api-reference/]
- options[:fix_urls] = ->(url) do
- url.sub! %r{/blob/master/readme.md}i, ''
- url
- end
- end
- version '3' do
- self.release = '3.5.17'
- self.base_url = 'https://github.com/d3/d3-3.x-api-reference/blob/master/'
- self.root_path = 'API-Reference.md'
- html_filters.push 'd3/clean_html', 'd3/entries_v3', 'title'
- options[:root_title] = 'D3.js'
- options[:only_patterns] = [/\.md\z/]
- end
- end
- end
|