Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions lib/docs/scrapers/numpy.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
module Docs
# Requires downloading the documents to local disk first.
# Go to https://numpy.org/doc/, click "HTML+zip" to download
# (example url: https://numpy.org/doc/2.2/numpy-html.zip),
# then extract into "docs/numpy~#{version}/"
Comment on lines +2 to +5
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instructions for all file scrapers are present in https://github.com/freeCodeCamp/devdocs/blob/main/docs/file-scrapers.md

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah thanks. I didn't know that.

class Numpy < FileScraper
self.name = 'NumPy'
self.type = 'sphinx'
Expand Down Expand Up @@ -26,6 +30,18 @@ class Numpy < FileScraper
Licensed under the 3-clause BSD License.
HTML

version '2.2' do
self.release = '2.2'
self.base_url = "https://numpy.org/doc/#{self.version}/"
options[:container] = nil
end

version '2.1' do
self.release = '2.1'
self.base_url = "https://numpy.org/doc/#{self.version}/"
options[:container] = nil
end

version '2.0' do
self.release = '2.0.1'
self.base_url = "https://numpy.org/doc/#{self.version}/"
Expand Down
Binary file modified public/icons/docs/numpy/16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/icons/docs/numpy/16@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion public/icons/docs/numpy/SOURCE
Original file line number Diff line number Diff line change
@@ -1 +1 @@
https://github.com/numpy/numpy/blob/master/doc/source/_static/numpylogo.svg
https://github.com/numpy/numpy/tree/main/doc/source/_static/favicon