[devdocsgjs/main: 58/239] Update Python documentation (3.10.1)
- From: Andy Holmes <andyholmes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [devdocsgjs/main: 58/239] Update Python documentation (3.10.1)
- Date: Fri, 8 Apr 2022 07:47:35 +0000 (UTC)
commit 937bf3b76f91124e8da3cdd143cbdad86f0921a5
Author: Simon Legner <Simon Legner gmail com>
Date: Tue Dec 7 19:29:18 2021 +0100
Update Python documentation (3.10.1)
Re-enable most non library docs.
Fixes #1601.
lib/docs/filters/python/entries_v3.rb | 9 ++++++++-
lib/docs/scrapers/python.rb | 21 +++++++++++++++++----
python-3.10.1-docs-html.tar.bz2 | Bin 0 -> 7259268 bytes
3 files changed, 25 insertions(+), 5 deletions(-)
---
diff --git a/lib/docs/filters/python/entries_v3.rb b/lib/docs/filters/python/entries_v3.rb
index 43c88e39..a28eef24 100644
--- a/lib/docs/filters/python/entries_v3.rb
+++ b/lib/docs/filters/python/entries_v3.rb
@@ -26,6 +26,13 @@ module Docs
end
def get_type
+ return 'Language Reference' if slug.start_with? 'reference'
+ return 'Python/C API' if slug.start_with? 'c-api'
+ return 'Tutorial' if slug.start_with? 'tutorial'
+
+ return 'Basics' unless slug.start_with? 'library/'
+ return 'Basics' if slug.start_with? 'library/index'
+
return 'Logging' if slug.start_with? 'library/logging'
return 'Asynchronous I/O' if slug.start_with? 'library/asyncio'
@@ -53,7 +60,7 @@ module Docs
end
def additional_entries
- return [] if root_page? || !include_default_entry? || name == 'errno'
+ return [] if root_page? || slug.start_with?('library/index') || !include_default_entry? || name ==
'errno'
clean_id_attributes
entries = []
diff --git a/lib/docs/scrapers/python.rb b/lib/docs/scrapers/python.rb
index ce765253..fe104503 100644
--- a/lib/docs/scrapers/python.rb
+++ b/lib/docs/scrapers/python.rb
@@ -1,18 +1,31 @@
module Docs
class Python < FileScraper
self.type = 'python'
- self.root_path = 'library/index.html'
+ self.root_path = 'index.html'
self.links = {
home: 'https://www.python.org/',
code: 'https://github.com/python/cpython'
}
- options[:only_patterns] = [/\Alibrary\//]
+ options[:only_patterns] = [
+ # /\Ac-api/,
+ /\Adistributing/,
+ # /\Adistutils/,
+ /\Aextending/,
+ /\Afaq/,
+ /\Ahowto/,
+ /\Aindex.html/,
+ # /\Ainstall/,
+ /\Ainstalling/,
+ /\Alibrary/,
+ /\Areference/,
+ /\Atutorial/,
+ /\Ausing/,
+ ]
options[:skip] = %w(
library/2to3.html
library/formatter.html
- library/index.html
library/intro.html
library/undoc.html
library/unittest.mock-examples.html
@@ -24,7 +37,7 @@ module Docs
HTML
version '3.10' do
- self.release = '3.10.0'
+ self.release = '3.10.1'
self.base_url = "https://docs.python.org/#{self.version}/"
html_filters.push 'python/entries_v3', 'sphinx/clean_html', 'python/clean_html'
diff --git a/python-3.10.1-docs-html.tar.bz2 b/python-3.10.1-docs-html.tar.bz2
new file mode 100644
index 00000000..5864f992
Binary files /dev/null and b/python-3.10.1-docs-html.tar.bz2 differ
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]