1
0

python.rb 1.5 KB

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