1
0

numpy.rb 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. module Docs
  2. class Numpy < FileScraper
  3. self.name = 'NumPy'
  4. self.type = 'sphinx'
  5. self.dir = '/Users/Thibaut/DevDocs/Docs/numpy/reference/'
  6. self.root_path = 'index.html'
  7. self.links = {
  8. home: 'http://www.numpy.org/',
  9. code: 'https://github.com/numpy/numpy'
  10. }
  11. html_filters.push 'numpy/entries', 'numpy/clean_html', 'sphinx/clean_html'
  12. # .main contains more than the page's content alone, but we need something
  13. # that includes the navigation bar as well in order to guess the type of
  14. # most pages.
  15. options[:container] = '.main'
  16. options[:skip_patterns] = [
  17. /.*(?<!\.html)\z/,
  18. /\Agenerated\/numpy\.chararray\.[\w\-]+.html\z/ # duplicate
  19. ]
  20. options[:attribution] = <<-HTML
  21. &copy; 2008&ndash;2016 NumPy Developers<br>
  22. Licensed under the NumPy License.
  23. HTML
  24. version '1.11' do
  25. self.release = '1.11.0'
  26. self.base_url = "https://docs.scipy.org/doc/numpy-#{self.release}/reference/"
  27. end
  28. version '1.10' do
  29. self.release = '1.10.4'
  30. self.base_url = "https://docs.scipy.org/doc/numpy-#{self.release}/reference/"
  31. end
  32. end
  33. end