From 75a085b92d1ce5711f04903e6a150d8caa8a2a55 Mon Sep 17 00:00:00 2001 From: Mustafa Cagri Ardic Date: Thu, 18 Apr 2024 22:29:35 +0100 Subject: [PATCH] add pandas 2.2.2 documentation --- docs/file-scrapers.md | 5 ++++- lib/docs/scrapers/pandas.rb | 23 +++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/docs/file-scrapers.md b/docs/file-scrapers.md index 2cc99165..403c8333 100644 --- a/docs/file-scrapers.md +++ b/docs/file-scrapers.md @@ -183,10 +183,13 @@ mv ./usr/share/doc/openjdk-16-jre-headless/api/ docs/openjdk~$VERSION ## Pandas +From the home directory; `devdocs`, execute below: + ```sh -curl https://pandas.pydata.org/docs/pandas.zip | bsdtar --extract --file - --directory=docs/pandas~1 +curl https://pandas.pydata.org/docs/pandas.zip -o tmp.zip && unzip tmp.zip -d docs/pandas~2 && rm tmp.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 `docs/`. diff --git a/lib/docs/scrapers/pandas.rb b/lib/docs/scrapers/pandas.rb index d748c297..c95f7561 100644 --- a/lib/docs/scrapers/pandas.rb +++ b/lib/docs/scrapers/pandas.rb @@ -16,6 +16,29 @@ module Docs Licensed under the 3-clause BSD License. HTML + version '2' do + self.release = '2.2.2' + 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/, + /whatsnew/ + ] + + options[:skip] = [ + 'panel.html', + 'pandas.pdf', + 'pandas.zip', + 'ecosystem.html' + ] + + end + version '1' do self.release = '1.5.0' self.base_url = "https://pandas.pydata.org/pandas-docs/version/#{self.release}/"