Update Statsmodels documentation (0.8.0)

pull/630/head
Thibaut Courouble 8 years ago
parent 799d9d17da
commit 9575c2a947

@ -17,10 +17,10 @@ module Docs
node.before(node.children).remove
end
css('div[class*="highlight-"]').each do |node|
css('div[class*="highlight-"]', 'div[class*="hl-"]').each do |node|
pre = node.at_css('pre')
pre.content = pre.content
lang = node['class'][/highlight\-(\w+)/, 1]
lang = node['class'][/highlight\-(\w+)/, 1] || node['class'][/hl\-(\w+)/, 1]
lang = 'php' if lang == 'ci'
lang = 'markup' if lang == 'html+django'
lang = 'python' if lang == 'default' || lang.start_with?('python') || lang.start_with?('ipython')

@ -2,7 +2,7 @@ module Docs
class Statsmodels
class CleanHtmlFilter < Filter
def call
@doc = at_css('.body')
@doc = at_css('.body', '#notebook-container')
if root_page?
at_css('h1').content = 'Statsmodels'
@ -11,6 +11,10 @@ module Docs
at_css('#indices-and-tables').remove
end
css('div.cell', 'div.inner_cell', 'div.text_cell_render', 'div.input_area').each do |node|
node.before(node.children).remove
end
doc
end
end

@ -9,7 +9,7 @@ module Docs
name.remove! %r{\A(class(method)?) }
name.remove! %r{\Astatsmodels\.}
else
name = at_css('h1').content.strip
name = at_css('h1', 'h2').content.strip
name.prepend 'Manual: ' if type == 'Manual'
name.prepend 'Example: ' if type == 'Examples'
end

@ -1,11 +1,11 @@
module Docs
class Statsmodels < UrlScraper
self.type = 'sphinx'
self.release = '0.6.1'
self.base_url = 'http://statsmodels.sourceforge.net/stable/'
self.release = '0.8.0'
self.base_url = 'http://www.statsmodels.org/stable/'
self.root_path = 'index.html'
self.links = {
home: 'http://statsmodels.sourceforge.net/',
home: 'http://www.statsmodels.org/',
code: 'https://github.com/statsmodels/statsmodels/'
}

Loading…
Cancel
Save