Update Matplotlib documentation (2.0.0)

pull/602/head
Thibaut Courouble 8 years ago
parent 4234488cbb
commit f26e397660

@ -346,7 +346,7 @@ credits = [
'https://daringfireball.net/projects/markdown/license'
], [
'Matplotlib',
'2012-2016 Matplotlib Development Team. All rights reserved.',
'2012-2017 Matplotlib Development Team. All rights reserved.',
'Custom',
'https://raw.githubusercontent.com/matplotlib/matplotlib/master/LICENSE/LICENSE'
], [

@ -18,13 +18,16 @@ module Docs
name.remove! 'mpl_toolkits.'
name.remove! ' API'
name.remove! %r{ \(.*\)}
name.downcase!
name
end
def get_type
return TYPE_BY_SLUG[slug] if TYPE_BY_SLUG.key?(slug)
name.split('.').first
type = name.split('.').first
type.downcase!
type.remove! ' module'
type.remove! ' class'
type
end
def additional_entries
@ -32,19 +35,19 @@ module Docs
css('.class > dt[id]', '.exception > dt[id]', '.attribute > dt[id]').each do |node|
entry_name = node['id'].remove('matplotlib.').remove('mpl_toolkits.')
entries << [entry_name, node['id']]
entries << [entry_name, node['id']] unless entry_name.casecmp(name) == 0
end
css('.data > dt[id]').each do |node|
if node['id'].split('.').last.upcase! # skip constants
entry_name = node['id'].remove('matplotlib.').remove('mpl_toolkits.')
entries << [entry_name, node['id']]
entries << [entry_name, node['id']] unless entry_name.casecmp(name) == 0
end
end
css('.function > dt[id]', '.method > dt[id]', '.classmethod > dt[id]').each do |node|
entry_name = node['id'].remove('matplotlib.').remove('mpl_toolkits.')
entries << [entry_name + '()', node['id']]
entries << [entry_name + '()', node['id']] unless entry_name.casecmp(name) == 0
end
entries

@ -16,10 +16,19 @@ module Docs
options[:skip] = %w(api_changes.html tutorial.html faq.html)
options[:attribution] = <<-HTML
&copy; 2012&ndash;2016 Matplotlib Development Team. All rights reserved.<br>
&copy; 2012&ndash;2017 Matplotlib Development Team. All rights reserved.<br>
Licensed under the Matplotlib License Agreement.
HTML
version '2.0' do
self.release = '2.0.0'
self.base_urls = [
"http://matplotlib.org/#{release}/api/",
"http://matplotlib.org/#{release}/mpl_toolkits/mplot3d/",
"http://matplotlib.org/#{release}/mpl_toolkits/axes_grid/api/"
]
end
version '1.5' do
self.release = '1.5.3'
self.base_urls = [

Loading…
Cancel
Save