python.rb 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. module Docs
  2. class Python < FileScraper
  3. self.type = 'sphinx'
  4. self.root_path = 'library/index.html'
  5. options[:only_patterns] = [/\Alibrary\//]
  6. options[:skip] = %w(
  7. library/2to3.html
  8. library/formatter.html
  9. library/index.html
  10. library/intro.html
  11. library/undoc.html
  12. library/unittest.mock-examples.html
  13. library/sunau.html)
  14. options[:attribution] = <<-HTML
  15. &copy; 1990&ndash;2015 Python Software Foundation<br>
  16. Licensed under the PSF License.
  17. HTML
  18. version '3.6' do
  19. self.release = '3.6.0'
  20. self.dir = '/Users/Thibaut/DevDocs/Docs/Python36' # docs.python.org/3.6/download.html
  21. self.base_url = 'https://docs.python.org/3.6/'
  22. html_filters.push 'python/entries_v3', 'sphinx/clean_html', 'python/clean_html'
  23. end
  24. version '3.5' do
  25. self.release = '3.5.2'
  26. self.dir = '/Users/Thibaut/DevDocs/Docs/Python35' # docs.python.org/3.5/download.html
  27. self.base_url = 'https://docs.python.org/3.5/'
  28. html_filters.push 'python/entries_v3', 'sphinx/clean_html', 'python/clean_html'
  29. end
  30. version '2.7' do
  31. self.release = '2.7.12'
  32. self.dir = '/Users/Thibaut/DevDocs/Docs/Python27' # docs.python.org/2.7/download.html
  33. self.base_url = 'https://docs.python.org/2.7/'
  34. html_filters.push 'python/entries_v2', 'sphinx/clean_html', 'python/clean_html'
  35. end
  36. end
  37. end