statsmodels.rb 976 B

1234567891011121314151617181920212223242526272829
  1. module Docs
  2. class Statsmodels < UrlScraper
  3. self.type = 'sphinx'
  4. self.release = '0.9.0'
  5. self.base_url = 'http://www.statsmodels.org/stable/'
  6. self.root_path = 'index.html'
  7. self.links = {
  8. home: 'http://www.statsmodels.org/',
  9. code: 'https://github.com/statsmodels/statsmodels/'
  10. }
  11. html_filters.push 'statsmodels/entries', 'statsmodels/clean_html', 'sphinx/clean_html'
  12. options[:skip] = %w(about.html search.html genindex.html)
  13. options[:skip_patterns] = [/\Arelease/, /\Adev/, /\A_modules/, /\Adatasets/]
  14. options[:attribution] = <<-HTML
  15. &copy; 2009&ndash;2012 Statsmodels Developers<br>
  16. &copy; 2006&ndash;2008 Scipy Developers<br>
  17. &copy; 2006 Jonathan E. Taylor<br>
  18. Licensed under the 3-clause BSD License.
  19. HTML
  20. def get_latest_version(opts)
  21. doc = fetch_doc('http://www.statsmodels.org/stable/', opts)
  22. doc.at_css('.sphinxsidebarwrapper h3 + p > b').content[1..-1]
  23. end
  24. end
  25. end