numpy.rb 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. module Docs
  2. class Numpy < FileScraper
  3. self.name = 'NumPy'
  4. self.type = 'sphinx'
  5. self.root_path = 'routines.html'
  6. self.links = {
  7. home: 'http://www.numpy.org/',
  8. code: 'https://github.com/numpy/numpy'
  9. }
  10. html_filters.push 'numpy/entries', 'numpy/clean_html'
  11. # .main contains more than the page's content alone, but we need something
  12. # that includes the navigation bar as well in order to guess the type of
  13. # most pages.
  14. options[:container] = '.main'
  15. # "generated" pages seem to be autogenerated from python docstrings.
  16. # "routines" are mostly lists that help organize the generated pages.
  17. # Everything else is manual-like and probably not desired in Devdocs.
  18. options[:only_patterns] = [
  19. /routines\.?.*\.html/,
  20. /generated.*/]
  21. options[:attribution] = <<-HTML
  22. &copy; Copyright 2008-2015, The Scipy community.<br>
  23. Licensed under a BSD-new License.
  24. HTML
  25. version '1.10' do
  26. self.release = '1.10'
  27. self.dir = '/vagrant/numpy-html/reference/'
  28. # self.base_url = 'http://docs.scipy.org/doc/numpy/reference/'
  29. end
  30. end
  31. end