diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index d788b500..a868b281 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -573,7 +573,7 @@ credits = [ 'https://raw.githubusercontent.com/npm/npm/master/LICENSE' ], [ 'NumPy', - '2005-2020 NumPy Developers', + '2005-2021 NumPy Developers', 'BSD', 'https://raw.githubusercontent.com/numpy/numpy/master/LICENSE.txt' ], [ diff --git a/lib/docs/filters/numpy/clean_html.rb b/lib/docs/filters/numpy/clean_html.rb index 65fb345c..54871eed 100644 --- a/lib/docs/filters/numpy/clean_html.rb +++ b/lib/docs/filters/numpy/clean_html.rb @@ -2,7 +2,7 @@ module Docs class Numpy class CleanHtmlFilter < Filter def call - at_css('#spc-section-body') + at_css('#spc-section-body, main > div') end end end diff --git a/lib/docs/filters/numpy/entries.rb b/lib/docs/filters/numpy/entries.rb index 7cfaca77..e6fbb7d1 100644 --- a/lib/docs/filters/numpy/entries.rb +++ b/lib/docs/filters/numpy/entries.rb @@ -12,6 +12,16 @@ module Docs end def get_type + if version >= "1.20" + if slug.start_with?('user') + return 'User Guide' + elsif slug.start_with?('dev') + return 'Development' + end + li_a = css('nav li.active > a') + return li_a.last.content if li_a + end + nav_items = css('.nav.nav-pills.pull-left > li') if nav_items[5] diff --git a/lib/docs/scrapers/numpy.rb b/lib/docs/scrapers/numpy.rb index 080a0d28..50fc304e 100644 --- a/lib/docs/scrapers/numpy.rb +++ b/lib/docs/scrapers/numpy.rb @@ -22,10 +22,16 @@ module Docs ] options[:attribution] = <<-HTML - © 2005–2020 NumPy Developers
+ © 2005–2021 NumPy Developers
Licensed under the 3-clause BSD License. HTML + version '1.20' do + self.release = '1.20.1' + self.base_url = "https://numpy.org/doc/#{self.version}/" + options[:container] = nil + end + version '1.19' do self.release = '1.19.0' self.base_url = "https://numpy.org/doc/#{self.version}/"