diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index b6fa213e..4b4607d7 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -613,7 +613,7 @@ credits = [ 'https://raw.githubusercontent.com/padrino/padrino-framework/master/padrino/LICENSE.txt' ], [ 'pandas', - '2008-2020, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team', + '2008-2021, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team', 'BSD', 'https://raw.githubusercontent.com/pydata/pandas/master/LICENSE' ], [ diff --git a/docs/file-scrapers.md b/docs/file-scrapers.md index 49f0c741..5289d980 100644 --- a/docs/file-scrapers.md +++ b/docs/file-scrapers.md @@ -163,6 +163,15 @@ dpkg -x $PACKAGE ./ mv ./usr/share/doc/openjdk-16-jre-headless/api/ path/to/devdocs/docs/openjdk~$VERSION ``` +## Pandas + +```sh +mkdir docs/pandas~1 +cd docs/pandas~1 +curl https://pandas.pydata.org/docs/pandas.zip +bsdtar xf pandas.zip +``` + ## PHP Click the link under the "Many HTML files" column on https://www.php.net/download-docs.php, extract the tarball, change its name to `php` and put it in `/path/to/devdocs/docs/`. diff --git a/lib/docs/filters/pandas/clean_html.rb b/lib/docs/filters/pandas/clean_html.rb index 4b0fd3bf..86900be4 100644 --- a/lib/docs/filters/pandas/clean_html.rb +++ b/lib/docs/filters/pandas/clean_html.rb @@ -23,6 +23,9 @@ module Docs node['data-language'] = 'python' end + # table of contents "on this page" + css('.toc-item').remove + # sidebar css('ul.nav.bd-sidenav').remove @@ -30,8 +33,7 @@ module Docs css('.headerlink').remove # next and previous section buttons - css('next-link').remove - css('prev-link').remove + css('.prev-next-area').remove css('footer').remove diff --git a/lib/docs/scrapers/pandas.rb b/lib/docs/scrapers/pandas.rb index b1eccb71..925c9e04 100644 --- a/lib/docs/scrapers/pandas.rb +++ b/lib/docs/scrapers/pandas.rb @@ -1,5 +1,5 @@ module Docs - class Pandas < UrlScraper + class Pandas < FileScraper self.name = 'pandas' self.type = 'sphinx' self.root_path = 'index.html' @@ -8,22 +8,22 @@ module Docs code: 'https://github.com/pydata/pandas' } - html_filters.push 'pandas/clean_html', 'pandas/entries' - options[:skip] = %w(internals.html release.html contributing.html whatsnew.html) options[:skip_patterns] = [/whatsnew\//] options[:attribution] = <<-HTML - © 2008–2020, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team
+ © 2008–2021, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team
Licensed under the 3-clause BSD License. HTML version '1' do - self.release = '1.2.0' + self.release = '1.3.4' self.base_url = "https://pandas.pydata.org/pandas-docs/version/#{self.release}/" html_filters.push 'pandas/clean_html', 'pandas/entries' + options[:container] = 'main section' + options[:skip_patterns] = [ /development/, /getting_started/,