From 20445fd37e5cc4980bcced7b9c388f3e31a44bc2 Mon Sep 17 00:00:00 2001 From: Aditya Ardiya Date: Sun, 16 Jan 2022 02:12:01 +0900 Subject: [PATCH 0001/1286] Improve point_cloud_library clean_html --- lib/docs/filters/point_cloud_library/clean_html.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/docs/filters/point_cloud_library/clean_html.rb b/lib/docs/filters/point_cloud_library/clean_html.rb index 143345d682..29f1faa031 100644 --- a/lib/docs/filters/point_cloud_library/clean_html.rb +++ b/lib/docs/filters/point_cloud_library/clean_html.rb @@ -5,6 +5,18 @@ def call @doc = at_css('.contents') css('.dynheader.closed').remove css('.permalink').remove + css('.memSeparator').remove + + # Change div.fragment to C++ code with syntax highlight + css('div.fragment').each do |node| + node.name = 'pre' + node['data-language'] = 'cpp' + node_content = "" + node.css('div').each do |inner_node| + node_content += inner_node.text + "\n" + end + node.content = node_content + end doc end end From 01b599b6444b6b09c4fbfafcf40ee2613bd25548 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Tue, 27 Sep 2022 20:59:57 +0200 Subject: [PATCH 0002/1286] Update Bash documentation (5.2) --- lib/docs/filters/bash/clean_html.rb | 3 +++ lib/docs/scrapers/bash.rb | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/docs/filters/bash/clean_html.rb b/lib/docs/filters/bash/clean_html.rb index 13234027ca..1baf1629c1 100644 --- a/lib/docs/filters/bash/clean_html.rb +++ b/lib/docs/filters/bash/clean_html.rb @@ -2,12 +2,15 @@ module Docs class Bash class CleanHtmlFilter < Filter def call + @doc = at_css('> div[id]') if at_css('> div[id]') # Remove the navigation header and footer and the lines underneath and above it at_css('.header + hr').remove line_above = at_xpath('//div[@class="header"]/preceding::hr[1]') line_above.remove unless line_above.nil? css('.header').remove + css('.copiable-anchor').remove + # Remove chapter and section numbers from title title_node = at_css('h1, h2, h3, h4, h5, h6') title_node.content = title_node.content.gsub(/(\d+\.?)+/, '').strip diff --git a/lib/docs/scrapers/bash.rb b/lib/docs/scrapers/bash.rb index ef46f017ac..3c91a05608 100644 --- a/lib/docs/scrapers/bash.rb +++ b/lib/docs/scrapers/bash.rb @@ -1,7 +1,7 @@ module Docs class Bash < FileScraper self.type = 'bash' - self.release = '5.1' + self.release = '5.2' self.base_url = 'https://www.gnu.org/software/bash/manual/html_node' self.root_path = 'index.html' self.links = { From c891a9d5d43a84492637549633f973825f5d8f34 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Tue, 27 Sep 2022 21:15:31 +0200 Subject: [PATCH 0003/1286] Update pandas documentation (1.5.0) --- lib/docs/scrapers/pandas.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/docs/scrapers/pandas.rb b/lib/docs/scrapers/pandas.rb index f95bf575d1..d748c297d1 100644 --- a/lib/docs/scrapers/pandas.rb +++ b/lib/docs/scrapers/pandas.rb @@ -17,7 +17,7 @@ class Pandas < FileScraper HTML version '1' do - self.release = '1.4.0' + self.release = '1.5.0' self.base_url = "https://pandas.pydata.org/pandas-docs/version/#{self.release}/" html_filters.push 'pandas/clean_html', 'pandas/entries' From 92dbcc6f56eee96ad94dc812170003cc16b2d846 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Tue, 27 Sep 2022 21:22:11 +0200 Subject: [PATCH 0004/1286] Update i3 documentation (4.21) --- lib/docs/scrapers/i3.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/docs/scrapers/i3.rb b/lib/docs/scrapers/i3.rb index abc4e791aa..caee54d013 100644 --- a/lib/docs/scrapers/i3.rb +++ b/lib/docs/scrapers/i3.rb @@ -3,7 +3,7 @@ class I3 < UrlScraper self.name = 'i3' self.type = 'simple' self.slug = 'i3' - self.release = '4.20.1' + self.release = '4.21' self.base_url = 'https://i3wm.org/docs/userguide.html' self.links = { home: 'https://i3wm.org/', From 93ffb3906427bcb7e3c368087fdcfc9be4d54fbb Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Tue, 27 Sep 2022 21:36:09 +0200 Subject: [PATCH 0005/1286] Update Support Tables documentation (1.0.30001412) --- lib/docs/scrapers/support_tables.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/docs/scrapers/support_tables.rb b/lib/docs/scrapers/support_tables.rb index e51d75a145..5004f33561 100644 --- a/lib/docs/scrapers/support_tables.rb +++ b/lib/docs/scrapers/support_tables.rb @@ -7,7 +7,7 @@ class SupportTables < Doc self.name = 'Support Tables' self.slug = 'browser_support_tables' self.type = 'support_tables' - self.release = '1.0.30001376' + self.release = '1.0.30001412' def build_pages url = 'https://github.com/Fyrd/caniuse/raw/main/data.json' From 5d7e8b95d2f05397d3a601b91af69fb66a9e331f Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Tue, 27 Sep 2022 21:46:04 +0200 Subject: [PATCH 0006/1286] leaflet: get_npm_version --- lib/docs/scrapers/leaflet.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/docs/scrapers/leaflet.rb b/lib/docs/scrapers/leaflet.rb index e5acbcd82d..404ce9ede1 100644 --- a/lib/docs/scrapers/leaflet.rb +++ b/lib/docs/scrapers/leaflet.rb @@ -70,9 +70,7 @@ class Leaflet < UrlScraper end def get_latest_version(opts) - doc = fetch_doc('https://leafletjs.com/reference-versions.html', opts) - link = doc.at_css('.container > ul > li:last-child > a').content - link.sub(/[a-zA-Z\s]*/, '') + get_npm_version('leaflet', opts) end end end From 02444cfacbd4919bae60b21fd6cea01250c23848 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Tue, 27 Sep 2022 21:47:51 +0200 Subject: [PATCH 0007/1286] puppeteer: get_npm_version --- lib/docs/scrapers/puppeteer.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/docs/scrapers/puppeteer.rb b/lib/docs/scrapers/puppeteer.rb index e221456801..357e65f2ee 100644 --- a/lib/docs/scrapers/puppeteer.rb +++ b/lib/docs/scrapers/puppeteer.rb @@ -16,8 +16,7 @@ class Puppeteer < Github HTML def get_latest_version(opts) - contents = get_github_file_contents('GoogleChrome', 'puppeteer', 'README.md', opts) - contents.scan(/\/v([0-9.]+)\/docs\/api\.md/)[0][0] + get_npm_version('puppeteer', opts) end end end From 3f4e8ffe14e89c792ec4fa2cb74c6976b4f4a5c3 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Tue, 27 Sep 2022 21:54:53 +0200 Subject: [PATCH 0008/1286] haskell: fix get_latest_version --- lib/docs/scrapers/haskell.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/docs/scrapers/haskell.rb b/lib/docs/scrapers/haskell.rb index dc537243b2..9cfe7f66e4 100755 --- a/lib/docs/scrapers/haskell.rb +++ b/lib/docs/scrapers/haskell.rb @@ -78,9 +78,9 @@ class Haskell < UrlScraper end def get_latest_version(opts) - doc = fetch_doc('https://downloads.haskell.org/~ghc/latest/docs/html/', opts) + doc = fetch_doc('https://www.haskell.org/ghc/download.html', opts) links = doc.css('a').to_a - versions = links.map {|link| link['href'].scan(/ghc-([0-9.]+)/)} + versions = links.map {|link| link.content.scan(/\A([0-9.]+)\Z/)} versions.find {|version| !version.empty?}[0][0] end From 26f7c1425b17c3ddfab1b402f9a8d79faf643a83 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Tue, 27 Sep 2022 21:55:31 +0200 Subject: [PATCH 0009/1286] Update Scala documentation (3.2.0) --- lib/docs/scrapers/scala.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/lib/docs/scrapers/scala.rb b/lib/docs/scrapers/scala.rb index dcf28b633c..ca4ff6517d 100644 --- a/lib/docs/scrapers/scala.rb +++ b/lib/docs/scrapers/scala.rb @@ -22,6 +22,22 @@ class Scala < FileScraper # 3. From the Dotty folder, run this command in the terminal: # $ sbt scaladoc/generateScalaDocumentation # 4. Extract scaladoc/output/scala3/api/ into docs/scala~3.1 + version '3.2' do + self.release = '3.2.0' + self.base_url = 'https://scala-lang.org/api/3.2.0/' + self.root_path = 'index.html' + + options[:skip_patterns] = [ + # Ignore class names with include “#”, which cause issues with the scraper + /%23/, + + # Ignore local links to the Java documentation created by a Scaladoc bug + /java\/lang/, + ] + + html_filters.push 'scala/entries_v3', 'scala/clean_html_v3' + end + version '3.1' do self.release = '3.1.1' self.base_url = 'https://scala-lang.org/api/3.1.1/' From bb64013a05da45a32e81a611400a1272cbc62b58 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Tue, 27 Sep 2022 22:00:23 +0200 Subject: [PATCH 0010/1286] Update CMake documentation (3.24) --- .../templates/pages/about_tmpl.coffee | 2 +- lib/docs/scrapers/cmake.rb | 22 +++++++++++++++---- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index 06ab009977..27b3929cb7 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -173,7 +173,7 @@ credits = [ 'https://github.com/clojure/clojure/blob/master/epl-v10.html' ], [ 'CMake', - '2000-2019 Kitware, Inc. and Contributors', + '2000-2022 Kitware, Inc. and Contributors', 'BSD', 'https://cmake.org/licensing/' ], [ diff --git a/lib/docs/scrapers/cmake.rb b/lib/docs/scrapers/cmake.rb index dc79429aee..d43d1cd5c0 100644 --- a/lib/docs/scrapers/cmake.rb +++ b/lib/docs/scrapers/cmake.rb @@ -16,10 +16,25 @@ class Cmake < UrlScraper options[:skip_patterns] = [/\Agenerator/, /\Acpack_gen/, /\Ainclude/, /\Arelease/, /tutorial\/(\w*%20)+/] options[:attribution] = <<-HTML - © 2000–2021 Kitware, Inc. and Contributors
+ © 2000–2022 Kitware, Inc. and Contributors
Licensed under the BSD 3-clause License. HTML + version '3.24' do + self.release = '3.24' + self.base_url = "https://cmake.org/cmake/help/v#{self.version}/" + end + + version '3.23' do + self.release = '3.23' + self.base_url = "https://cmake.org/cmake/help/v#{self.version}/" + end + + version '3.22' do + self.release = '3.22' + self.base_url = "https://cmake.org/cmake/help/v#{self.version}/" + end + version '3.21' do self.release = '3.21' self.base_url = "https://cmake.org/cmake/help/v#{self.version}/" @@ -106,9 +121,8 @@ class Cmake < UrlScraper end def get_latest_version(opts) - doc = fetch_doc('https://cmake.org/documentation/', opts) - link = doc.at_css('.entry-content ul > li > strong > a > big') - link.content.scan(/([0-9.]+)/)[0][0] + tags = get_gitlab_tags('gitlab.kitware.com', 'cmake', 'cmake', opts) + tags[0]['name'][1..] end end end From 150c56e0ced82a6b8d01400bf050bd93db50fcea Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Tue, 27 Sep 2022 22:09:40 +0200 Subject: [PATCH 0011/1286] Update Kubectl documentation (1.25) --- lib/docs/scrapers/kubectl.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/docs/scrapers/kubectl.rb b/lib/docs/scrapers/kubectl.rb index 0f888ddfec..9e33a27cae 100644 --- a/lib/docs/scrapers/kubectl.rb +++ b/lib/docs/scrapers/kubectl.rb @@ -21,7 +21,7 @@ class Kubectl < UrlScraper # latest version has a special URL that does not include the version identifier version do - self.release = "1.23" + self.release = "1.25" self.base_url = "https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands" end From c99e6e531fc3fee4b790ebfd9d5e6f285b71a7c6 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Tue, 27 Sep 2022 22:09:43 +0200 Subject: [PATCH 0012/1286] Update Kubernetes documentation (1.25) --- lib/docs/scrapers/kubernetes.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/docs/scrapers/kubernetes.rb b/lib/docs/scrapers/kubernetes.rb index 143c16ae21..4b0aa323ca 100644 --- a/lib/docs/scrapers/kubernetes.rb +++ b/lib/docs/scrapers/kubernetes.rb @@ -20,7 +20,7 @@ class Kubernetes < UrlScraper # latest version has a special URL that does not include the version identifier version do - self.release = "1.23" + self.release = "1.25" self.base_url = "https://kubernetes.io/docs/reference/kubernetes-api/" end From 99818942c50180b3eb4d5b024f7a03c06f987661 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Tue, 27 Sep 2022 22:13:56 +0200 Subject: [PATCH 0013/1286] Update Elisp documentation (28.2) --- assets/javascripts/templates/pages/about_tmpl.coffee | 2 +- lib/docs/scrapers/elisp.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index 27b3929cb7..161cd8c778 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -283,7 +283,7 @@ credits = [ 'https://raw.githubusercontent.com/electron/electron/master/LICENSE' ], [ 'Elisp', - '1990-1996, 1998-2021 Free Software Foundation, Inc.', + '1990-1996, 1998-2022 Free Software Foundation, Inc.', 'GPLv3', 'https://www.gnu.org/licenses/gpl-3.0.html' ], [ diff --git a/lib/docs/scrapers/elisp.rb b/lib/docs/scrapers/elisp.rb index 767b9f82ba..4ddffefe8a 100644 --- a/lib/docs/scrapers/elisp.rb +++ b/lib/docs/scrapers/elisp.rb @@ -1,7 +1,7 @@ module Docs class Elisp < FileScraper self.type = 'elisp' - self.release = '27.2' + self.release = '28.2' self.base_url= 'https://www.gnu.org/software/emacs/manual/html_node/elisp/' self.root_path = 'index.html' self.links = { @@ -57,7 +57,7 @@ class Elisp < FileScraper end options[:attribution]= <<-HTML - Copyright © 1990-1996, 1998-2021 Free Software Foundation, Inc.
+ Copyright © 1990-1996, 1998-2022 Free Software Foundation, Inc.
Licensed under the GNU GPL license. HTML From b3a108a200b24a7d0fe93f206bf38f9b834b2dfa Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Thu, 29 Sep 2022 19:36:30 +0200 Subject: [PATCH 0014/1286] Update Deno documentation (1.26.0) --- lib/docs/filters/deno/clean_html.rb | 6 ++++++ lib/docs/scrapers/deno.rb | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/docs/filters/deno/clean_html.rb b/lib/docs/filters/deno/clean_html.rb index 748744d090..c2b1befd46 100644 --- a/lib/docs/filters/deno/clean_html.rb +++ b/lib/docs/filters/deno/clean_html.rb @@ -13,6 +13,12 @@ def call node['data-language'] = 'typescript' node.name = 'pre' end + css('.tw-8ej7ai').each do |node| + code = node.at_css('.font-mono') + next unless code + code.parent.name = 'blockquote' + code.name = 'code' + end css('*[class]').remove_attribute('class') xpath('//a[text()="[src]"]').remove diff --git a/lib/docs/scrapers/deno.rb b/lib/docs/scrapers/deno.rb index 4bfd29e70a..9f01d8578a 100644 --- a/lib/docs/scrapers/deno.rb +++ b/lib/docs/scrapers/deno.rb @@ -2,7 +2,7 @@ module Docs class Deno < UrlScraper self.name = 'Deno' self.type = 'simple' - self.release = '1.25.0' + self.release = '1.26.0' self.base_url = 'https://doc.deno.land/deno/stable/' self.links = { home: 'https://deno.land/', From 6d0f24e71fb8ceb22996a881d8db0191f4c65f2f Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Fri, 30 Sep 2022 20:54:03 +0200 Subject: [PATCH 0015/1286] Update Kotlin documentation (1.7.20) --- lib/docs/scrapers/kotlin.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/docs/scrapers/kotlin.rb b/lib/docs/scrapers/kotlin.rb index a7b10e96a0..610f97f792 100644 --- a/lib/docs/scrapers/kotlin.rb +++ b/lib/docs/scrapers/kotlin.rb @@ -32,7 +32,7 @@ class Kotlin < UrlScraper HTML version '1.7' do - self.release = '1.7.0' + self.release = '1.7.20' end version '1.6' do From 4c77efb8866e1106f65edff6ad5680799e005848 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Fri, 30 Sep 2022 20:57:54 +0200 Subject: [PATCH 0016/1286] Update LaTeX documentation (May 2022) --- lib/docs/scrapers/latex.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/docs/scrapers/latex.rb b/lib/docs/scrapers/latex.rb index 816f1d64ed..9fe51a9114 100644 --- a/lib/docs/scrapers/latex.rb +++ b/lib/docs/scrapers/latex.rb @@ -4,7 +4,7 @@ class Latex < UrlScraper self.name = 'LaTeX' self.slug = 'latex' self.type = 'simple' - self.release = 'April 2021' + self.release = 'May 2022' self.links = { home: 'https://ctan.org/pkg/latex2e-help-texinfo/' } From 378ce59ce577006918c9d99a2d84135b3da8d64a Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Fri, 30 Sep 2022 21:03:47 +0200 Subject: [PATCH 0017/1286] Update Tailwind CSS documentation (3.1.8) --- lib/docs/scrapers/tailwindcss.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/docs/scrapers/tailwindcss.rb b/lib/docs/scrapers/tailwindcss.rb index 408b99bf7f..e21fc13d39 100644 --- a/lib/docs/scrapers/tailwindcss.rb +++ b/lib/docs/scrapers/tailwindcss.rb @@ -5,7 +5,7 @@ class Tailwindcss < UrlScraper self.slug = 'tailwindcss' self.base_url = 'https://tailwindcss.com/docs' self.root_path = '/' - self.release = '3.0.23' + self.release = '3.1.8' self.links = { home: 'tps://tailwindcss.com/', code: 'https://github.com/tailwindlabs/tailwindcss' From d19bb432ca0526e72dbf3266c213bab6ef5e427a Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Fri, 30 Sep 2022 21:24:04 +0200 Subject: [PATCH 0018/1286] Update React Router documentation (6.4.1) --- lib/docs/filters/react_router/entries.rb | 8 ++++++++ lib/docs/scrapers/react_router.rb | 8 +++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/lib/docs/filters/react_router/entries.rb b/lib/docs/filters/react_router/entries.rb index 862cf57296..a76b7641f7 100644 --- a/lib/docs/filters/react_router/entries.rb +++ b/lib/docs/filters/react_router/entries.rb @@ -1,6 +1,14 @@ module Docs class ReactRouter class EntriesFilter < Docs::EntriesFilter + def get_name + at_css('.markdown h1').content + end + + def get_type + slug.split('/').first.capitalize + end + def additional_entries entries = [] css('h2[id], h3[id]').each do |node| diff --git a/lib/docs/scrapers/react_router.rb b/lib/docs/scrapers/react_router.rb index 3d04d0fe35..64318f5be2 100644 --- a/lib/docs/scrapers/react_router.rb +++ b/lib/docs/scrapers/react_router.rb @@ -3,15 +3,17 @@ class ReactRouter < UrlScraper self.name = 'React Router' self.slug = 'react_router' self.type = 'simple' - self.release = '6.3.0' - self.base_url = 'https://reactrouterdotcom.fly.dev/docs/en/v6/api' + self.release = '6.4.1' + self.base_url = 'https://reactrouterdotcom.fly.dev/docs/en/v6' self.links = { home: 'https://reactrouterdotcom.fly.dev/', code: 'https://github.com/remix-run/react-router' } - html_filters.push 'react_router/entries', 'react_router/clean_html', 'title' + html_filters.push 'react_router/entries', 'react_router/clean_html' + + options[:skip_patterns] = [/upgrading/] options[:attribution] = <<-HTML © React Training 2015-2019
From 6d69e1e86ecaffe8b3a2e1e865b7215eddf42e88 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Fri, 30 Sep 2022 22:06:21 +0200 Subject: [PATCH 0019/1286] Update Laravel documentation (9.3.8) --- lib/docs/filters/laravel/clean_html.rb | 2 +- lib/docs/scrapers/laravel.rb | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/lib/docs/filters/laravel/clean_html.rb b/lib/docs/filters/laravel/clean_html.rb index e43ebda241..9eba084a72 100644 --- a/lib/docs/filters/laravel/clean_html.rb +++ b/lib/docs/filters/laravel/clean_html.rb @@ -56,7 +56,7 @@ def api end def other - @doc = at_css('.docs_body') + @doc = at_css('#main-content') # Clean up headings css('h2 > a').each do |node| diff --git a/lib/docs/scrapers/laravel.rb b/lib/docs/scrapers/laravel.rb index 51a0ccede0..7641afd0ff 100644 --- a/lib/docs/scrapers/laravel.rb +++ b/lib/docs/scrapers/laravel.rb @@ -10,7 +10,7 @@ class Laravel < UrlScraper html_filters.push 'laravel/entries', 'laravel/clean_html' options[:container] = ->(filter) { - filter.subpath.start_with?('/api') ? '#content' : '.page_contain' + filter.subpath.start_with?('/api') ? '#content' : '#docsScreen' } options[:skip_patterns] = [ @@ -29,6 +29,20 @@ class Laravel < UrlScraper Laravel is a trademark of Taylor Otwell. HTML + version '9' do + self.release = '9.3.8' + self.root_path = '/api/9.x/index.html' + self.initial_paths = %w(/docs/9.x/installation /api/9.x/classes.html) + + options[:only_patterns] = [%r{\A/api/9\.x/}, %r{\A/docs/9\.x/}] + + options[:fix_urls] = ->(url) do + url.sub! %r{9.x/+}, "9.x/" + url.sub! %r{#{Regexp.escape(Laravel.base_url)}/docs\/(?!\d)}, "#{Laravel.base_url}/docs/9.x/" + url + end + end + version '8' do self.release = '8.4.1' self.root_path = '/api/8.x/index.html' From ed475f72e3b45e021d922031a7ca22c28a282de3 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Sun, 2 Oct 2022 10:21:04 +0200 Subject: [PATCH 0020/1286] manifest.json: add $schema --- public/manifest.json | 1 + 1 file changed, 1 insertion(+) diff --git a/public/manifest.json b/public/manifest.json index 301c56d15a..625a0a8101 100644 --- a/public/manifest.json +++ b/public/manifest.json @@ -1,4 +1,5 @@ { + "$schema": "https://json.schemastore.org/web-manifest-combined.json", "name": "DevDocs", "short_name": "DevDocs", "description": "API Documentation Browser", From ec4885d169a6ca80ca171c66319a7a73fc8798c5 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Sun, 2 Oct 2022 10:34:56 +0200 Subject: [PATCH 0021/1286] manifest.json: add url_handler for devdocs.io Ref: https://web.dev/pwa-url-handler/ --- public/manifest.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/public/manifest.json b/public/manifest.json index 625a0a8101..d458b9e0a8 100644 --- a/public/manifest.json +++ b/public/manifest.json @@ -42,5 +42,10 @@ "sizes": "512x512", "type": "image/png" } + ], + "url_handlers": [ + { + "origin": "https://devdocs.io" + } ] } From 6e419996c57dd8ceeff1bb1ad8ddd28fb0e29af2 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Sun, 2 Oct 2022 10:55:11 +0200 Subject: [PATCH 0022/1286] python: include h2 entries for library docs See #696. --- lib/docs/filters/python/entries_v3.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/docs/filters/python/entries_v3.rb b/lib/docs/filters/python/entries_v3.rb index 033427f46f..fd3f5945e0 100644 --- a/lib/docs/filters/python/entries_v3.rb +++ b/lib/docs/filters/python/entries_v3.rb @@ -57,7 +57,7 @@ def get_type end def include_h2? - return slug.start_with?('reference') || slug.start_with?('tutorial') || slug.start_with?('using') + return slug.start_with?('library') || slug.start_with?('reference') || slug.start_with?('tutorial') || slug.start_with?('using') end def include_default_entry? @@ -81,6 +81,7 @@ def additional_entries if include_h2? css('section[id] > h2').each do |node| name = node.content.remove("\u{00b6}") + name.concat " (#{self.name})" if slug.start_with?('library') entries << [name, node.parent['id']] end end From 61362e6e6efe50a0a35695c13c7261327fcfdb75 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Sun, 2 Oct 2022 11:34:33 +0200 Subject: [PATCH 0023/1286] python: add statement entries See https://github.com/freeCodeCamp/devdocs/issues/696#issuecomment-1239665712 --- lib/docs/filters/python/entries_v3.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/docs/filters/python/entries_v3.rb b/lib/docs/filters/python/entries_v3.rb index fd3f5945e0..fe47465021 100644 --- a/lib/docs/filters/python/entries_v3.rb +++ b/lib/docs/filters/python/entries_v3.rb @@ -83,6 +83,8 @@ def additional_entries name = node.content.remove("\u{00b6}") name.concat " (#{self.name})" if slug.start_with?('library') entries << [name, node.parent['id']] + statement = name[/The (.+) statement/, 1] + entries << ["#{statement} (statement)", node.parent['id'], 'Statements'] if statement && slug.start_with?('reference') end end From 1213629e9cd50434d195542a027e85ad1cd3d79a Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Sun, 2 Oct 2022 12:34:22 +0200 Subject: [PATCH 0024/1286] python: add operators, regex, symbols form index See https://github.com/freeCodeCamp/devdocs/issues/696#issuecomment-1243554434 --- lib/docs/filters/python/entries_v3.rb | 24 ++++++++++++++++++++++++ lib/docs/scrapers/python.rb | 2 +- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/lib/docs/filters/python/entries_v3.rb b/lib/docs/filters/python/entries_v3.rb index fe47465021..e7fcb4fd98 100644 --- a/lib/docs/filters/python/entries_v3.rb +++ b/lib/docs/filters/python/entries_v3.rb @@ -61,11 +61,13 @@ def include_h2? end def include_default_entry? + return false if slug.starts_with?('genindex') return true if slug == 'library/asyncio' !at_css('.body > .section:only-child > .toctree-wrapper:last-child') && !type.in?(%w(Superseded)) end def additional_entries + return additional_entries_index if slug.starts_with?('genindex') return [] if root_page? || slug.start_with?('library/index') || !include_default_entry? || name == 'errno' clean_id_attributes entries = [] @@ -99,6 +101,28 @@ def clean_id_attributes node.remove end end + + def additional_entries_index + css('.genindextable td > ul > li').each_with_object [] do |node, entries| + name = node.children.first + next unless name.text? + name = name.text.strip() + next if name[/^\w/] || name[/^-+\w/] + node.css('> ul > li > a').each do |inner_node| + inner_name = inner_node.text.strip() + next if inner_name[/\[\d+\]/] + type = case inner_name + when 'operator' + 'Operators' + when 'in regular expressions' + 'Regular Expression' + else + 'Symbols' + end + entries << ["#{name} (#{inner_name})", inner_node['href'], type] + end + end + end end end end diff --git a/lib/docs/scrapers/python.rb b/lib/docs/scrapers/python.rb index 6f3c6f1e64..09d84204d7 100644 --- a/lib/docs/scrapers/python.rb +++ b/lib/docs/scrapers/python.rb @@ -7,7 +7,7 @@ class Python < FileScraper code: 'https://github.com/python/cpython' } - options[:skip_patterns] = [/genindex/, /whatsnew/] + options[:skip_patterns] = [/whatsnew/] options[:skip] = %w( library/2to3.html library/formatter.html From 1de7a61a97f005ef0283d1052746a4aa61389a9c Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Sun, 2 Oct 2022 12:39:56 +0200 Subject: [PATCH 0025/1286] python: add glossary entries --- lib/docs/filters/python/entries_v3.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/docs/filters/python/entries_v3.rb b/lib/docs/filters/python/entries_v3.rb index e7fcb4fd98..90c9a97065 100644 --- a/lib/docs/filters/python/entries_v3.rb +++ b/lib/docs/filters/python/entries_v3.rb @@ -31,6 +31,7 @@ def get_type return 'Tutorial' if slug.start_with? 'tutorial' return 'Software Packaging & Distribution' if slug.start_with? 'distributing' return 'Software Packaging & Distribution' if slug.start_with? 'distutils' + return 'Glossary' if slug.start_with? 'glossary' return 'Basics' unless slug.start_with? 'library/' return 'Basics' if slug.start_with? 'library/index' @@ -76,6 +77,10 @@ def additional_entries entries << [node['id'], node['id']] end + css('.glossary > dt[id]').each do |node| + entries << [node.content, node['id']] + end + css('.function > dt[id]', '.method > dt[id]', '.staticmethod > dt[id]', '.classmethod > dt[id]').each do |node| entries << [node['id'] + '()', node['id']] end From 3e196ecec0f8f72ec8ddda9e32fdc9c5d5076aa3 Mon Sep 17 00:00:00 2001 From: Tim Lim Date: Sun, 2 Oct 2022 18:49:17 +0800 Subject: [PATCH 0026/1286] Fix table overflow when there is long data that exceeds page width --- assets/stylesheets/global/_base.scss | 3 +++ 1 file changed, 3 insertions(+) diff --git a/assets/stylesheets/global/_base.scss b/assets/stylesheets/global/_base.scss index ec7be4f2ab..d331c3d9be 100644 --- a/assets/stylesheets/global/_base.scss +++ b/assets/stylesheets/global/_base.scss @@ -134,6 +134,9 @@ table { border-collapse: separate; border-spacing: 0; border-radius: 3px; + display: inline-block; + overflow-x: auto; + max-width: 100%; } caption { From 8bbbb9e6342b821ba4a8af6a550ab3face0b962e Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Sun, 2 Oct 2022 16:06:26 +0200 Subject: [PATCH 0027/1286] Add Svelte documentation (3.50.1) --- assets/javascripts/news.json | 4 +++ .../templates/pages/about_tmpl.coffee | 5 ++++ lib/docs/filters/svelte/clean_html.rb | 11 +++++++ lib/docs/filters/svelte/entries.rb | 27 +++++++++++++++++ lib/docs/scrapers/svelte.rb | 28 ++++++++++++++++++ public/icons/docs/svelte/16.png | Bin 0 -> 954 bytes public/icons/docs/svelte/16@2x.png | Bin 0 -> 1373 bytes public/icons/docs/svelte/SOURCE | 1 + 8 files changed, 76 insertions(+) create mode 100644 lib/docs/filters/svelte/clean_html.rb create mode 100644 lib/docs/filters/svelte/entries.rb create mode 100644 lib/docs/scrapers/svelte.rb create mode 100644 public/icons/docs/svelte/16.png create mode 100644 public/icons/docs/svelte/16@2x.png create mode 100644 public/icons/docs/svelte/SOURCE diff --git a/assets/javascripts/news.json b/assets/javascripts/news.json index 73d07cc10e..e596a931fd 100644 --- a/assets/javascripts/news.json +++ b/assets/javascripts/news.json @@ -1,4 +1,8 @@ [ + [ + "2022-10-02", + "New documentation: Svelte" + ], [ "2022-09-21", "Added HTTP/3 to HTTP" diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index 161cd8c778..cda606e45c 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -871,6 +871,11 @@ credits = [ '2009-2012 Statsmodels Developers
© 2006-2008 Scipy Developers
© 2006 Jonathan E. Taylor', 'BSD', 'https://raw.githubusercontent.com/statsmodels/statsmodels/master/LICENSE.txt' + ], [ + 'Svelte', + '2016–2022 Rich Harris and contributors', + 'MIT', + 'https://raw.githubusercontent.com/sveltejs/svelte/master/LICENSE.md' ], [ 'Symfony', '2004-2017 Fabien Potencier', diff --git a/lib/docs/filters/svelte/clean_html.rb b/lib/docs/filters/svelte/clean_html.rb new file mode 100644 index 0000000000..579b27b7f6 --- /dev/null +++ b/lib/docs/filters/svelte/clean_html.rb @@ -0,0 +1,11 @@ +module Docs + class Svelte + class CleanHtmlFilter < Filter + def call + @doc = at_css('main > .content') + at_css('h1').content = 'Svelte' + doc + end + end + end +end diff --git a/lib/docs/filters/svelte/entries.rb b/lib/docs/filters/svelte/entries.rb new file mode 100644 index 0000000000..ab7236ff93 --- /dev/null +++ b/lib/docs/filters/svelte/entries.rb @@ -0,0 +1,27 @@ +module Docs + class Svelte + class EntriesFilter < Docs::EntriesFilter + def get_type + 'Svelte' + end + + def additional_entries + type = 'Svelte' + subtype = nil + css('h2, h3, h4').each_with_object [] do |node, entries| + if node.name == 'h2' + type = node.content.strip + subtype = nil + elsif node.name == 'h3' + subtype = node.content.strip + subtype = nil unless subtype[/Component directives|Element directives/] + end + next if type == 'Before we begin' + name = node.content.strip + name.concat " (#{subtype})" if subtype && node.name == 'h4' + entries << [name, node['id'], subtype || type] + end + end + end + end +end diff --git a/lib/docs/scrapers/svelte.rb b/lib/docs/scrapers/svelte.rb new file mode 100644 index 0000000000..822f1847ed --- /dev/null +++ b/lib/docs/scrapers/svelte.rb @@ -0,0 +1,28 @@ +module Docs + class Svelte < UrlScraper + self.name = 'Svelte' + self.slug = 'svelte' + self.type = 'simple' + self.links = { + home: 'https://svelte.dev/', + code: 'https://github.com/sveltejs/svelte' + } + + options[:root_title] = 'Svelte' + + options[:attribution] = <<-HTML + © 2016–2022 Rich Harris and contributors
+ Licensed under the MIT License. + HTML + + options[:skip] = %w(team.html plugins/) + + self.release = '3.50.1' + self.base_url = 'https://svelte.dev/docs' + html_filters.push 'svelte/entries', 'svelte/clean_html' + + def get_latest_version(opts) + get_npm_version('svelte', opts) + end + end +end diff --git a/public/icons/docs/svelte/16.png b/public/icons/docs/svelte/16.png new file mode 100644 index 0000000000000000000000000000000000000000..d84820150d86b4ca095b40abbfcbacd74ecb5629 GIT binary patch literal 954 zcmZvadr(Ya7{eYQ-nVZGh$q4O*JM|!$j-xWk=H=&b;US-uHQa-}}v(^A$#Gl^(*eLPCg# zS|y92tJlEm=0x+{TtLWADw*2}*}@XinLvo-Fd?JU zj@2#;p@u7`*2rBy3HierKSOEKLPB^o(NQ`%wGj5d2qjoVKy%377-SrxqopnlTGK4~ zH-y%daR5UL2Ru}v%wS8mJ4R8Fp6Gyw0uG(>)TMb4rn<@lyY#Rg#*u8q`3+df^Ksvb z-*(XFQ7ts15IF)zbI{d+mK)fn!JP}p(n2u|H_OrS0S8l|bjJdM*l{>jfK(|=v+=zL zZBLL82(>46>v66K`Kz&*55p|G1R}IzOT$9a>-X z|H8T;=*FXL3oac%UL53t;%T-H`rD*jjF#Rc_t2HHkqfK4`nvBaee>FFi=~ZKuJ7ND z=bv~t!LzkSaKE^;UU<7{vW++KLtC($)qXqtBj>HC|MH`=LcDC=su3ZZ=rG>8NTqD4 zpZm2Y+St@Gscy_OV*=qT6bez2@A7&69yaln%(RU3p0D|Gv-5;{^XZbBJ(VZDqDk{; z-}KBMUweDIzkB;Q2`qbl{p`zOoL#b*NEM$sb7o0IT|+~_q|>L2iHSS-8Qs?OZ-PQ~ z%d~wLghk;zQN`8Xy{$8Ysy`oFW3rS_&+23J%r5zZDHRtt`1^F4Y;vDN-f_=61Y@JZ zd78^d+RoQzm$_6oiF{H{n)hw4iI3cPG(Jap>v&kRyHle!HK@9(baQ}ltHM$)$`7r} xwU3N?+-lHUEmyBxw_Y>Kw!K)>{N^5c$dHW2;N;iM<|O*TL@n3Ksv;8d{{Y&Dtvvt$ literal 0 HcmV?d00001 diff --git a/public/icons/docs/svelte/16@2x.png b/public/icons/docs/svelte/16@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..d74293e1b3c5e88047475f9a17a6696d33fbf869 GIT binary patch literal 1373 zcmV-j1)}004R>004l5008;`004mK004C`008P>0026e000+ooVrmw00007 zbV*G`2j&U_4h0(#{F1f+000JJOGiWi{{a60|De66lK=n&k4Z#9RCwCGmw9YeMHI#l zON-io${G;$4?sbKA>tAR4oe9sv?{_MT56*r5F-{av1kNTP?1JZYNRA$RBV;VqC^yt zML{Fhv?vip#3fX)l+scPQkJ&wXU4hjE^p~;p*qRr<=*>pzHesE_nk8$=P}Th%~l&R zf~TM|1eF|A@=#ff%9E&MpwhEdi9`fzhe{eM8&Ro6g@}0ul^;-fE3PAfpQ`pA850!kJT0e-2L8K<>G`SB7i%hG98uQ z0>CElW2vxf8-zl{94D&b`E37joN|&gK7k1EKB%lkr9J>Yu{XSz2esAFprOX#bNTO( zJ-~k)E1d*RNZ?9TJ`VtoN`iS4VP9!9aNSAxcm*t&1l!jJcf}l$M_>;s-4hXLkIHKS z@Jan(!|PD@cQp9kZ(+`OOYk;<`}#vwx%d6Ecl^0fj>>!A|E_4@ z<42)zAx!8M%=pnAVB!5xvIQC&VADz%-X{G0Fe?2M5t!#nY-}ee{xk^O*a#(?t?W$T zub7|7?QH90{j=+g^Pb3Lb~_%RNBz-|;ytZVAy@)5_m4lla?W{G{?Rlm24I9a|v_?LqUp^cFu~a_7?}j?3lamFt^aTt6utnJ z2fg=4|B5uCMa>~#WOB$=f;s1}KZ*?;sfgPJ3Ua;g4fXKUczbM?!25BX&_`efDvbdn zy0e>gw4aLYs?7XxC*;q7^v*#=y!EV)V1vySkHC7z=;9JcaaEv>{rV*}?lS9&W{$hm zE5~6)yqjmMVR#s2Od0Gyf)%K=X^McU*$3V2U-B@#{D=jMWjOvC5la!9i(vFceko2* zlmmlNskRB&9==*{<+pnWkXmB(_qIsICnN$ z5v5yT)<~;}U|+Zzl`hR`Mv@$3@WmRN>BFMB;qOqn$7yDzB?K-(WtAJqY-es76mNu@N?RRI9J8K~H`(Sx zaMj09S>pHo^XZ2Bp;8<$BLifPBu8QDO_0$!@(vI}WjiWkP-)v5_kio1n@=bpz1Wuz z(`wB{rP~Ex$07ol%$s1%`c>wkF<6z6`Iipry?JdMg6RI*VS818Ud f{U-c>UBmwY=DkUUPA?3700000NkvXXu0mjfIy!6E literal 0 HcmV?d00001 diff --git a/public/icons/docs/svelte/SOURCE b/public/icons/docs/svelte/SOURCE new file mode 100644 index 0000000000..b4d677f6a0 --- /dev/null +++ b/public/icons/docs/svelte/SOURCE @@ -0,0 +1 @@ +https://svelte.dev/favicon.png From 73af877589c4784d438e3448ec2feffacd08e3f1 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Mon, 3 Oct 2022 21:40:18 +0200 Subject: [PATCH 0028/1286] Update Sequelize documentation (6.23.2) --- lib/docs/filters/sequelize/clean_html.rb | 34 +++++------------------- lib/docs/filters/sequelize/entries.rb | 19 ++++++++----- lib/docs/scrapers/sequelize.rb | 17 ++++++++++-- 3 files changed, 33 insertions(+), 37 deletions(-) diff --git a/lib/docs/filters/sequelize/clean_html.rb b/lib/docs/filters/sequelize/clean_html.rb index 4f452198ab..a7d9bc05b6 100644 --- a/lib/docs/filters/sequelize/clean_html.rb +++ b/lib/docs/filters/sequelize/clean_html.rb @@ -2,26 +2,9 @@ module Docs class Sequelize class CleanHtmlFilter < Filter def call - @doc = at_css('.content') + @doc = at_css('article', '.content') - # Clean up the home page - if root_page? || subpath == "index.html" - # Remove logo - css('.manual-user-index > div > div.logo').remove - - # Convert title to proper h1 element - at_css('.manual-user-index > div > div.sequelize').name = 'h1' - - # Remove badges (NPM, Travis, test coverage, etc.) - css('.manual-user-index > p:nth-child(4)').remove - - # Remove image cards pointing to entries of the manual - css('.manual-cards').remove - - # Pull the header out of its container - header = at_css('h1') - header.parent.parent.parent.add_previous_sibling header - else + if at_css('header > h1') # Pull the header out of its container header = at_css('h1') header.parent.add_previous_sibling header @@ -36,18 +19,13 @@ def call end # Add syntax highlighting to code blocks - css('pre > code[class^="lang-"]').each do |node| - pre = node.parent - # Convert the existing language definitions to Prism-compatible attributes - pre['data-language'] = 'javascript' if node['class'] == 'lang-js' || node['class'] == 'lang-javascript' - pre['data-language'] = 'json' if node['class'] == 'lang-json' - pre['data-language'] = 'shell' if node['class'] == 'lang-sh' || node['class'] == 'lang-bash' - pre['data-language'] = 'sql' if node['class'] == 'lang-sql' - pre['data-language'] = 'typescript' if node['class'] == 'lang-ts' + css('pre[class^="prism-code language-"]').each do |node| + node['data-language'] = node['class'][/language-(\w+)/, 1] if node['class'] and node['class'][/language-(\w+)/] + node.content = node.css('.token-line').map(&:content).join("\n") end # Return the cleaned-up document - doc + at_css('.markdown') || doc end end end diff --git a/lib/docs/filters/sequelize/entries.rb b/lib/docs/filters/sequelize/entries.rb index 6cf7ed0e7a..056b593dc1 100644 --- a/lib/docs/filters/sequelize/entries.rb +++ b/lib/docs/filters/sequelize/entries.rb @@ -8,19 +8,19 @@ def get_name # Assign the pages to main categories def get_type - if path.start_with?('manual/') + if base_url.path.include?('/docs/') 'Manual' - elsif path.include?('lib/data-types') + elsif path.include?('src/data-types') 'datatypes' - elsif path.include?('lib/errors/validation') + elsif path.include?('src/errors/validation') 'errors/validation' - elsif path.include?('lib/errors/database') + elsif path.include?('src/errors/database') 'errors/database' - elsif path.include?('lib/errors/connection') + elsif path.include?('src/errors/connection') 'errors/connection' - elsif path.include?('lib/errors') + elsif path.include?('src/errors') 'errors' - elsif path.include?('lib/associations') + elsif path.include?('src/associations') 'associations' elsif path.include?('master/variable') 'variables' @@ -28,6 +28,11 @@ def get_type 'classes' end end + + def include_default_entry? + at_css('.card > h2:contains("📄️")').nil? + end + end end end diff --git a/lib/docs/scrapers/sequelize.rb b/lib/docs/scrapers/sequelize.rb index aecf54bf55..f170abfeb1 100644 --- a/lib/docs/scrapers/sequelize.rb +++ b/lib/docs/scrapers/sequelize.rb @@ -1,5 +1,7 @@ module Docs class Sequelize < UrlScraper + include MultipleBaseUrls + self.name = 'Sequelize' self.slug = 'sequelize' self.type = 'simple' @@ -20,9 +22,20 @@ class Sequelize < UrlScraper Licensed under the MIT License. HTML + def initial_urls + [ + "https://sequelize.org/docs/v6/", + "https://sequelize.org/api/v6/identifiers.html", + ] + end + version '6' do - self.release = '6.5.0' - self.base_url = "https://sequelize.org/master/" + self.release = '6.23.2' + self.base_url = "https://sequelize.org/docs/v6/" + self.base_urls = [ + "https://sequelize.org/docs/v6/", + "https://sequelize.org/api/v6/", + ] end version '5' do From 526cc1a80ab895535792cbbc6a392b8521e0a0f2 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Mon, 3 Oct 2022 22:35:59 +0200 Subject: [PATCH 0029/1286] Update NumPy documentation (1.23.0) --- .../templates/pages/about_tmpl.coffee | 2 +- lib/docs/filters/numpy/entries.rb | 18 +++++++++++------- lib/docs/scrapers/numpy.rb | 12 +++++++++--- 3 files changed, 21 insertions(+), 11 deletions(-) diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index cda606e45c..06214a7e0b 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -623,7 +623,7 @@ credits = [ 'https://raw.githubusercontent.com/npm/npm/master/LICENSE' ], [ 'NumPy', - '2005-2021 NumPy Developers', + '2005-2022 NumPy Developers', 'BSD', 'https://raw.githubusercontent.com/numpy/numpy/master/LICENSE.txt' ], [ diff --git a/lib/docs/filters/numpy/entries.rb b/lib/docs/filters/numpy/entries.rb index f6c43dd702..605a668f19 100644 --- a/lib/docs/filters/numpy/entries.rb +++ b/lib/docs/filters/numpy/entries.rb @@ -5,9 +5,9 @@ def get_name if dt = at_css('dt') name = dt_to_name(dt) else - name = at_css('h1').content.strip + name = at_xpath('//h1/text()').text.strip end - name.remove! "\u{00B6}" + name.remove! %r{#\Z} name end @@ -18,8 +18,12 @@ def get_type elsif slug.start_with?('dev') return 'Development' end - li_a = css('nav li.active > a') - return li_a.last.content if li_a && li_a.last + if css('nav li.toctree-l2.active .toctree-l3').length > 7 + li_a = css('nav li.toctree-l2.active > a') + else + li_a = css('nav li.toctree-l1.active > a') + end + return li_a.last.xpath('./text()').text.remove('( )').strip if li_a && li_a.last end nav_items = css('.nav.nav-pills.pull-left > li') @@ -29,8 +33,8 @@ def get_type elsif nav_items[4] && nav_items[4].content !~ /Manual|Reference/ type = nav_items[4].content else - type = at_css('h1').content.strip - type.remove! "\u{00B6}" + type = at_xpath('//h1/text()').text.strip + type.remove! %r{#\Z} # Handle some edge cases that aren't properly categorized in the docs if type.start_with?('numpy.polynomial.') || type.start_with?('numpy.poly1d.') @@ -90,7 +94,7 @@ def dt_to_name(dt) name.remove! %r{[\=\[].*} name.remove! %r{\A(class(method)?|exception) } name.remove! %r{\s—.*} - name.remove! '¶' + name.remove! %r{#\Z} end end end diff --git a/lib/docs/scrapers/numpy.rb b/lib/docs/scrapers/numpy.rb index 22fba84355..a31ba8ed1f 100644 --- a/lib/docs/scrapers/numpy.rb +++ b/lib/docs/scrapers/numpy.rb @@ -22,18 +22,24 @@ class Numpy < FileScraper ] options[:attribution] = <<-HTML - © 2005–2021 NumPy Developers
+ © 2005–2022 NumPy Developers
Licensed under the 3-clause BSD License. HTML + version '1.23' do + self.release = '1.23.0' + self.base_url = "https://numpy.org/doc/#{self.version}/" + options[:container] = nil + end + version '1.22' do - self.release = '1.22.0' + self.release = '1.22.4' self.base_url = "https://numpy.org/doc/#{self.version}/" options[:container] = nil end version '1.21' do - self.release = '1.21.5' + self.release = '1.21.6' self.base_url = "https://numpy.org/doc/#{self.version}/" options[:container] = nil end From 850366459b748e9b9a70dcdc2c2bea3a1c575353 Mon Sep 17 00:00:00 2001 From: Tim Lim Date: Tue, 4 Oct 2022 21:41:58 +0800 Subject: [PATCH 0030/1286] Add Moment.js Timezone (0.5.37) --- .../templates/pages/about_tmpl.coffee | 5 +++ assets/stylesheets/application.css.scss | 1 + .../stylesheets/pages/_moment_timezone.scss | 5 +++ .../filters/moment_timezone/clean_html.rb | 29 +++++++++++++++++ lib/docs/filters/moment_timezone/entries.rb | 23 ++++++++++++++ lib/docs/scrapers/moment_timezone.rb | 30 ++++++++++++++++++ public/icons/docs/moment_timezone/16.png | Bin 0 -> 1377 bytes public/icons/docs/moment_timezone/16@2x.png | Bin 0 -> 1717 bytes public/icons/docs/moment_timezone/SOURCE | 1 + 9 files changed, 94 insertions(+) create mode 100644 assets/stylesheets/pages/_moment_timezone.scss create mode 100644 lib/docs/filters/moment_timezone/clean_html.rb create mode 100644 lib/docs/filters/moment_timezone/entries.rb create mode 100644 lib/docs/scrapers/moment_timezone.rb create mode 100644 public/icons/docs/moment_timezone/16.png create mode 100644 public/icons/docs/moment_timezone/16@2x.png create mode 100644 public/icons/docs/moment_timezone/SOURCE diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index cda606e45c..2b5a4fb285 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -581,6 +581,11 @@ credits = [ 'JS Foundation and other contributors', 'MIT', 'https://raw.githubusercontent.com/moment/moment/master/LICENSE' + ], [ + 'Moment.js Timezone', + 'JS Foundation and other contributors', + 'MIT', + 'https://raw.githubusercontent.com/moment/moment-timezone/master/LICENSE' ], [ 'Mongoose', '2010 LearnBoost', diff --git a/assets/stylesheets/application.css.scss b/assets/stylesheets/application.css.scss index 8a6221b68a..d6189c5d8c 100644 --- a/assets/stylesheets/application.css.scss +++ b/assets/stylesheets/application.css.scss @@ -87,6 +87,7 @@ 'pages/mkdocs', 'pages/modernizr', 'pages/moment', + 'pages/moment_timezone', 'pages/nginx', 'pages/node', 'pages/npm', diff --git a/assets/stylesheets/pages/_moment_timezone.scss b/assets/stylesheets/pages/_moment_timezone.scss new file mode 100644 index 0000000000..b30da34db3 --- /dev/null +++ b/assets/stylesheets/pages/_moment_timezone.scss @@ -0,0 +1,5 @@ +._moment_timezone { + > h2 { @extend %block-heading; } + > h3 { @extend %block-label, %label-blue; } + code { @extend %label; } +} diff --git a/lib/docs/filters/moment_timezone/clean_html.rb b/lib/docs/filters/moment_timezone/clean_html.rb new file mode 100644 index 0000000000..e6e0b6d1e8 --- /dev/null +++ b/lib/docs/filters/moment_timezone/clean_html.rb @@ -0,0 +1,29 @@ +module Docs + class MomentTimezone + class CleanHtmlFilter < Filter + def call + # Set id attributes on headings + css('a.docs-section-target', 'a.docs-method-target').each do |node| + node.next_element['id'] = node['id'] + node.remove + end + + css('> article', '.docs-method-prose', '.docs-method-signature', 'h2 > a', 'h3 > a', 'pre > code').each do |node| + node.before(node.children).remove + end + + css('.docs-method-edit', 'hr').remove + + css('pre').each do |node| + if node.content =~ /\A + Licensed under the MIT License. + HTML + + def get_latest_version(opts) + get_github_tags('moment', 'moment-timezone', opts)[0]['name'] + end + end +end diff --git a/public/icons/docs/moment_timezone/16.png b/public/icons/docs/moment_timezone/16.png new file mode 100644 index 0000000000000000000000000000000000000000..29c6b987285c5851ede8830fc59b20b48bee1a81 GIT binary patch literal 1377 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|T2doC(|mmy zw18|523AHP24;{FAY@>aVqgWc85q16rQz%#Mh&PMCI*J~Oa>OHnkXO*0v4nJa0`PlBg3pY5xV%QuQiw3qZOUY$~jP%-qzHM1_jnoV;SI3R@+x3M(KRB&@Hb09I0xZL1XF8=&Bv zUzDm~re~mMpk&9TprBw=l#*r@P?Wt5Z@Sn2DRmzV368|&p4rRy77T3YHG z80i}s=>k>g7FXt#Bv$C=6)QswftllyTAW;zSx}OhpQivaH!&%{w8U0P31kr*K-^i9 znTD__uNdkrpa=CqGWv#k2KsQbfm&@qqE`MznW;dVLFU^T+JIG}h(YbK(Fa+Mb#~tdfOb~3}*8D5mp{C)-0@0F1xk?dT3nCo77G?$t{J9cl zu-5Z)K~enkH|varPPDVX+xvUo-tV`v-)`m?4qF-&Sg~gF?)Lm#HQi>NFPz3(1v=B zaXh-eHt6Ry=aBBpDTN0v@6?aH7=G*dzuQyit-N&NhM=Hz?DSu6n|?j8R@7p6!ae;a zgGQf;)_Upn-^$ARuei;uWJ{1f`N=o!C(l*>)}LuzV$141)8pTMnSJ|x$BB61tACkS zRsT4a_TqM~&z0K_Uk)$6nX}I8kbRY7K_L51=cKj1V&Wbh&)@g)9V@;UGqJOL@dq`% zY1!93p4{)ux*xF7Xkz-N)f(RQLATy-P&+NN;#1A}l$XXr)txhLZ@T$s!+n|B<~?R@ z`|KCKmpD?x;;Mge*(=t{8%~iz%nnm7%`;N_-Rrunb*HSa-SQd#9Zpp8cdnJJK3{8e zfANj%9JR04@X8r$M?Av#A zmquN*%>QlW(L%a4ytgzZEcP%jeZ1BGcU#_*7{52H3QlVpY!5HG_UQf0vq3wS2(+~3 ziMQy@XL!KBMr6tAzh3P7-7D`st!Xrp=RR%E_kgo6Yq#jmReKxuh*q`)Ut~=*`?lbV z-{d0-Ny*RI6PABoX!`rZypWcUErkI`U+&#u_g&$7%gfZNjq7c;F@G+YJ~i%XN<#k@ z`A3I!tNG`1K71{leBO+0rAg3k9<}Ue|L47ryt(gFIKw{0Y1b6)-Rjt&y)@06Pt7EB_D_6gwRzd$ q3ws%L!jd@@W-nKKee(CZ&;Kpg>OCnM(+X_m$R!ZUn zsEIs?8sxIw2Ix{SfFPnsG=>KPLKKDAu7+|imUg%QfBeqBJI%Iick#h6&30zaIdi@< zXU>^9zZ7@a3M&Jykq@hBN=mm7R3L@S6O!`m1y4+3IuZRNr2L@gdYgaW#wFcM>)(8`j|e4O zuxpI|8GNo+R?xgA}R=!ydkbHdN8`uzSZV@MO$O@UZz zPq+DKq9=L{u+Ka@{~LBYgNH9(n*Q^qs%WV%_?!WSBqUpYMhcow*itt|M(_8}`IEik za8W(ZeFl`}vN7>?jV!7Pz2^xOz4nPSZ+PwjHiD0%=SJI99TQ4RbHLf)a69ju!I`Io zEXR(dFr!OD{)z>rps7%FGgCO5-8I2QPNz5u_Pl=JymTn^eO9_E;AUN{laG`!?BHez zG^`UM7If-2j&^wP34P|wOV-@A!Pl|$<7B)<8q#rBsLoTaX&e*CmLE7f%!oCHkHYo< z=XpHUf+@gdS#8rRZeP<|aAT2HI$%%YJOcH*M1EX%kg@E$1x#6p8*cPC)y|g;Qf>S| zsa96g^by?mMxw$2$0Rx|vdS;tqGQ>Ex`(Qct5@`y$5ZqSUsk`LwT3CaUKt$Odcp>; z3>XQDWvQ=e8XJn>t4g4!9FnxEr6S7BQtcTkE9}h4|Gs!tpnw;}Hb^HJ)4tkcce{OA z>|%kkv1%blzCHE@eTEW;+_g;sn2=}~vj=Rr5B!2ubNpCYuE=Q^r^;#@7xRQ~Q|=iX zIZd!k3cg;Mh&DqhvBteJ@EA$D$~-jtM&m)ch7`U885m5rFzzCfUC@r7#8~{o>lq8F zjYb6yFzgqN?{+4kjR);MGSo2$G!R(}rBKzdW2DVZ_m5~}$nRO3N-T!ugi4u*G><*0 z`eDJs;k+2`8z!Y%4@Z3nL$2X>)D&X6Aj=DOE6XHn68=v{Po(u?0lQZ?I;6vP3P)R_ zFy{D^6UnsRZmFv{*zB)t?2MWd;Lgp7a(WDxzgoO_OUh?kV+owG1OLK+7@K1Zeh^AJ z^js_C9v4S@sNQ=-(+;llUdQ<5nKi+kuzFiUu(9Xz9od5pAmFxOCpYEAD?37)syg*r z?&DZI{7c0u8FsnTeq1m=$DF=RX3wk%Ozuk)VvpYwf`_X6(?OezxY?kD`cw|fU35FY z7b}b-kf&LIiwW*=@AFgKr$J$c6vns6j4^!}n3$%egSS7+p2N#i`ZF{ZV=J!VSO6fX zWS}r2cf;q1x4w;yAYt8`NPTwM7lRGMSe;1gKSlsODa1RyvBrFj#n_4qNWK<9p2XMW zzJ`icJiSQ+%rXq82EdWzXJ%&c-I4BH7+SKTpir-448~$i##VOqiUN`a;$@WRibmET z7drGJ-5Zv&Go^H8ph!vMM^>bHsd~eZC7Q1>xM*c;+cjLh@)HRm4?me)$(WWo4-sMM zh1{Dsuo7QjBHVr$(^yHKD3EN-$0@}bX2nW0;jy1%U^2}%z%G$cy)uDoI4+}F>b=d# z^*8ZDHpLpD;4_r+K;b=_maexXEeQE5ce75`ZOa2omu0=d!KE|6jw6ppaSg|16t2__ zmSxV;$6**W8RH4*K;!(2WK#K_y2{P0%dQKdn=u$m>#)yMPf``7nNHWcxFlaf2&a4% z0nm*o-w`#<%Wx%mn2G&UJu#t2niEsbOD|_ZwcB@J>6Sd-k*zC zRG;~OD9g1Gu^RC%eVAw??&_zRHiCQG8+YU5G|>nibMg9re4hUcgc&?W0xcuC00000 LNkvXXu0mjfdNwsg literal 0 HcmV?d00001 diff --git a/public/icons/docs/moment_timezone/SOURCE b/public/icons/docs/moment_timezone/SOURCE new file mode 100644 index 0000000000..f361647785 --- /dev/null +++ b/public/icons/docs/moment_timezone/SOURCE @@ -0,0 +1 @@ +https://momentjs.com/static/img/moment-timezone-favicon.png \ No newline at end of file From 89badcc9ed395145c929a2f3546ab86f1386e2a9 Mon Sep 17 00:00:00 2001 From: Tim Lim Date: Wed, 5 Oct 2022 19:29:37 +0800 Subject: [PATCH 0031/1286] Reuse existing moment files --- assets/stylesheets/application.css.scss | 1 - .../stylesheets/pages/_moment_timezone.scss | 5 ---- .../filters/moment_timezone/clean_html.rb | 29 ------------------- lib/docs/scrapers/moment_timezone.rb | 4 +-- 4 files changed, 2 insertions(+), 37 deletions(-) delete mode 100644 assets/stylesheets/pages/_moment_timezone.scss delete mode 100644 lib/docs/filters/moment_timezone/clean_html.rb diff --git a/assets/stylesheets/application.css.scss b/assets/stylesheets/application.css.scss index d6189c5d8c..8a6221b68a 100644 --- a/assets/stylesheets/application.css.scss +++ b/assets/stylesheets/application.css.scss @@ -87,7 +87,6 @@ 'pages/mkdocs', 'pages/modernizr', 'pages/moment', - 'pages/moment_timezone', 'pages/nginx', 'pages/node', 'pages/npm', diff --git a/assets/stylesheets/pages/_moment_timezone.scss b/assets/stylesheets/pages/_moment_timezone.scss deleted file mode 100644 index b30da34db3..0000000000 --- a/assets/stylesheets/pages/_moment_timezone.scss +++ /dev/null @@ -1,5 +0,0 @@ -._moment_timezone { - > h2 { @extend %block-heading; } - > h3 { @extend %block-label, %label-blue; } - code { @extend %label; } -} diff --git a/lib/docs/filters/moment_timezone/clean_html.rb b/lib/docs/filters/moment_timezone/clean_html.rb deleted file mode 100644 index e6e0b6d1e8..0000000000 --- a/lib/docs/filters/moment_timezone/clean_html.rb +++ /dev/null @@ -1,29 +0,0 @@ -module Docs - class MomentTimezone - class CleanHtmlFilter < Filter - def call - # Set id attributes on headings - css('a.docs-section-target', 'a.docs-method-target').each do |node| - node.next_element['id'] = node['id'] - node.remove - end - - css('> article', '.docs-method-prose', '.docs-method-signature', 'h2 > a', 'h3 > a', 'pre > code').each do |node| - node.before(node.children).remove - end - - css('.docs-method-edit', 'hr').remove - - css('pre').each do |node| - if node.content =~ /\A Date: Wed, 5 Oct 2022 19:30:43 +0800 Subject: [PATCH 0032/1286] Use https for link --- lib/docs/scrapers/moment_timezone.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/docs/scrapers/moment_timezone.rb b/lib/docs/scrapers/moment_timezone.rb index 6a01d33a76..225d35f3c2 100644 --- a/lib/docs/scrapers/moment_timezone.rb +++ b/lib/docs/scrapers/moment_timezone.rb @@ -8,7 +8,7 @@ class MomentTimezone < UrlScraper self.root_path = '/docs/' self.initial_paths = %w(/docs/) self.links = { - home: 'http://momentjs.com/timezone/', + home: 'https://momentjs.com/timezone/', code: 'https://github.com/moment/moment-timezone/' } From 4aaf0d20a83edc4409bf88e7df14b308d489130a Mon Sep 17 00:00:00 2001 From: Tim Lim Date: Wed, 5 Oct 2022 19:31:03 +0800 Subject: [PATCH 0033/1286] Consolidate Moment and Moment Timezone in credits --- assets/javascripts/templates/pages/about_tmpl.coffee | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index 2b5a4fb285..5cd5a01bb6 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -577,15 +577,10 @@ credits = [ 'MIT', 'https://modernizr.com/license/' ], [ - 'Moment.js', + 'Moment.js
Moment.js Timezone', 'JS Foundation and other contributors', 'MIT', 'https://raw.githubusercontent.com/moment/moment/master/LICENSE' - ], [ - 'Moment.js Timezone', - 'JS Foundation and other contributors', - 'MIT', - 'https://raw.githubusercontent.com/moment/moment-timezone/master/LICENSE' ], [ 'Mongoose', '2010 LearnBoost', From fc94d6c0fb285101f088a5780623d8e1d07d1018 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Wed, 5 Oct 2022 20:52:46 +0200 Subject: [PATCH 0034/1286] moment_timezone: avoid multiple "Intro" entries Hard to distinguish in search. --- lib/docs/filters/moment_timezone/entries.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/docs/filters/moment_timezone/entries.rb b/lib/docs/filters/moment_timezone/entries.rb index 8ed604e20b..7e2005ea63 100644 --- a/lib/docs/filters/moment_timezone/entries.rb +++ b/lib/docs/filters/moment_timezone/entries.rb @@ -9,10 +9,8 @@ def additional_entries css('[id]').each do |node| if node.name == 'h2' type = node.content - name = "Intro" - else - name = node.content.strip end + name = node.content.strip entries << [name, node['id'], type] end From cc8df8aae24df1c4191e3a67789003fedbc6a295 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Wed, 5 Oct 2022 21:03:41 +0200 Subject: [PATCH 0035/1286] Update Python documentation (3.11.0rc2) --- lib/docs/scrapers/python.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/docs/scrapers/python.rb b/lib/docs/scrapers/python.rb index 09d84204d7..275e737941 100644 --- a/lib/docs/scrapers/python.rb +++ b/lib/docs/scrapers/python.rb @@ -21,6 +21,13 @@ class Python < FileScraper Licensed under the PSF License. HTML + version '3.11' do + self.release = '3.11.0rc2' + self.base_url = "https://docs.python.org/#{self.version}/" + + html_filters.push 'python/entries_v3', 'sphinx/clean_html', 'python/clean_html' + end + version '3.10' do self.release = '3.10.7' self.base_url = "https://docs.python.org/#{self.version}/" From dde51842f42b8a0787f140950e37ebbccb950a2d Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Wed, 5 Oct 2022 21:49:10 +0200 Subject: [PATCH 0036/1286] Update Git documentation (2.38.0) --- lib/docs/scrapers/git.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/docs/scrapers/git.rb b/lib/docs/scrapers/git.rb index 3480daa8c4..ba3efe02bf 100644 --- a/lib/docs/scrapers/git.rb +++ b/lib/docs/scrapers/git.rb @@ -1,7 +1,7 @@ module Docs class Git < UrlScraper self.type = 'git' - self.release = '2.37.0' + self.release = '2.38.0' self.base_url = 'https://git-scm.com/docs' self.initial_paths = %w(/git.html) self.links = { From 77d7e2ea770b4e79146fc5322ceacedc91bf5e1c Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Wed, 5 Oct 2022 22:42:21 +0200 Subject: [PATCH 0037/1286] python: add all statements from index Previously, only non-text statements (such as `**`) were added. Now also `for`, `if`, `elif`, `else`, ... are added See https://github.com/freeCodeCamp/devdocs/issues/696#issuecomment-1243554434 --- lib/docs/filters/python/entries_v3.rb | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/docs/filters/python/entries_v3.rb b/lib/docs/filters/python/entries_v3.rb index 90c9a97065..2db966d62e 100644 --- a/lib/docs/filters/python/entries_v3.rb +++ b/lib/docs/filters/python/entries_v3.rb @@ -90,8 +90,6 @@ def additional_entries name = node.content.remove("\u{00b6}") name.concat " (#{self.name})" if slug.start_with?('library') entries << [name, node.parent['id']] - statement = name[/The (.+) statement/, 1] - entries << ["#{statement} (statement)", node.parent['id'], 'Statements'] if statement && slug.start_with?('reference') end end @@ -112,19 +110,25 @@ def additional_entries_index name = node.children.first next unless name.text? name = name.text.strip() - next if name[/^\w/] || name[/^-+\w/] + next if name[/Python Enhancement Proposals/] node.css('> ul > li > a').each do |inner_node| inner_name = inner_node.text.strip() next if inner_name[/\[\d+\]/] + href = inner_node['href'] + next if (name[/^\w/] || name[/^-+\w/]) && !href[/stmts/] type = case inner_name + when 'keyword' + 'Keywords' when 'operator' 'Operators' when 'in regular expressions' 'Regular Expression' + when /statement/ + 'Statements' else 'Symbols' end - entries << ["#{name} (#{inner_name})", inner_node['href'], type] + entries << ["#{name} (#{inner_name})", href, type] end end end From dbd1637d4760f5fa92386d9dbb92d191b8709ff7 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Sat, 8 Oct 2022 20:40:17 +0200 Subject: [PATCH 0038/1286] Update CakePHP documentation (4.4.6) --- lib/docs/scrapers/cakephp.rb | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/lib/docs/scrapers/cakephp.rb b/lib/docs/scrapers/cakephp.rb index 248df29ba1..db21f51f11 100644 --- a/lib/docs/scrapers/cakephp.rb +++ b/lib/docs/scrapers/cakephp.rb @@ -17,6 +17,33 @@ class Cakephp < UrlScraper We are not endorsed by or affiliated with CakePHP. HTML + version '4.4' do + self.release = '4.4.6' + self.base_url = "https://api.cakephp.org/#{self.version}/" + + html_filters.push 'cakephp/clean_html_39_plus', 'cakephp/entries_39_plus' + + options[:container] = '.page-container' + end + + version '4.3' do + self.release = '4.3.10' + self.base_url = "https://api.cakephp.org/#{self.version}/" + + html_filters.push 'cakephp/clean_html_39_plus', 'cakephp/entries_39_plus' + + options[:container] = '.page-container' + end + + version '4.2' do + self.release = '4.2.10' + self.base_url = "https://api.cakephp.org/#{self.version}/" + + html_filters.push 'cakephp/clean_html_39_plus', 'cakephp/entries_39_plus' + + options[:container] = '.page-container' + end + version '4.1' do self.release = '4.1.6' self.base_url = "https://api.cakephp.org/#{self.version}/" @@ -153,8 +180,7 @@ class Cakephp < UrlScraper end def get_latest_version(opts) - doc = fetch_doc('https://cakephp.org', opts) - doc.at_css('.title-home h1').content.scan(/\d\.\d*\.*\d*\.*\d*\.*/)[0] + get_latest_github_release('cakephp', 'cakephp', opts) end private From 4913f97edfa9799b4c9b6f3e86a19de0ce16f937 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Sat, 8 Oct 2022 21:54:25 +0200 Subject: [PATCH 0039/1286] Update OpenJDK documentation (19) --- docs/file-scrapers.md | 7 +++++++ lib/docs/scrapers/openjdk.rb | 10 ++++++++++ 2 files changed, 17 insertions(+) diff --git a/docs/file-scrapers.md b/docs/file-scrapers.md index 2b1843c516..206a711718 100644 --- a/docs/file-scrapers.md +++ b/docs/file-scrapers.md @@ -176,6 +176,13 @@ Search 'Openjdk' in https://www.debian.org/distrib/packages, find the `openjdk-$ download it, extract it with `dpkg -x $PACKAGE ./` and move `./usr/share/doc/openjdk-16-jre-headless/api/` to `path/to/devdocs/docs/openjdk~$VERSION` +``` +curl http://ftp.at.debian.org/debian/pool/main/o/openjdk-19/openjdk-19-doc_19+36-2_all.deb && +tar xf openjdk-19-doc_19+36-2_all.deb +tar xf data.tar.xz +mv ./usr/share/doc/openjdk-19-jre-headless/api/ path/to/devdocs/docs/openjdk~$VERSION +``` + If you use or have access to a Debian-based GNU/Linux distribution you can run the following command: ```sh apt download openjdk-$VERSION-doc diff --git a/lib/docs/scrapers/openjdk.rb b/lib/docs/scrapers/openjdk.rb index 6a8fdb9635..2ede8d5dda 100644 --- a/lib/docs/scrapers/openjdk.rb +++ b/lib/docs/scrapers/openjdk.rb @@ -37,6 +37,16 @@ class Openjdk < FileScraper NEWFILTERS = ['openjdk/entries_new', 'openjdk/clean_html_new'] + version '19' do + self.release = '19' + self.root_path = 'index.html' + self.base_url = 'https://docs.oracle.com/en/java/javase/19/docs/api/' + + html_filters.push NEWFILTERS + + options[:container] = 'main' + end + version '18' do self.release = '18' self.root_path = 'index.html' From fcbdddc741f0e52fa3a8c73a1a16e035b1a70055 Mon Sep 17 00:00:00 2001 From: Tim Lim Date: Thu, 6 Oct 2022 21:56:31 +0800 Subject: [PATCH 0040/1286] Add FastAPI (0.85.0) documentation --- .../templates/pages/about_tmpl.coffee | 5 ++ assets/stylesheets/application.css.scss | 1 + assets/stylesheets/pages/_fastapi.scss | 22 +++++++ lib/docs/filters/fastapi/clean_html.rb | 32 ++++++++++ lib/docs/filters/fastapi/container.rb | 9 +++ lib/docs/filters/fastapi/entries.rb | 55 ++++++++++++++++++ lib/docs/scrapers/fastapi.rb | 30 ++++++++++ public/icons/docs/fastapi/16.png | Bin 0 -> 1364 bytes public/icons/docs/fastapi/16@2x.png | Bin 0 -> 1664 bytes public/icons/docs/fastapi/SOURCE | 1 + 10 files changed, 155 insertions(+) create mode 100644 assets/stylesheets/pages/_fastapi.scss create mode 100644 lib/docs/filters/fastapi/clean_html.rb create mode 100644 lib/docs/filters/fastapi/container.rb create mode 100644 lib/docs/filters/fastapi/entries.rb create mode 100644 lib/docs/scrapers/fastapi.rb create mode 100644 public/icons/docs/fastapi/16.png create mode 100644 public/icons/docs/fastapi/16@2x.png create mode 100644 public/icons/docs/fastapi/SOURCE diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index f34f861f44..2a20f48a39 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -326,6 +326,11 @@ credits = [ '2019 by Falcon contributors', 'Apache', 'https://raw.githubusercontent.com/falconry/falcon/master/LICENSE' + ], [ + 'FastAPI', + '2018 Sebastián Ramírez', + 'MIT', + 'https://github.com/tiangolo/fastapi/blob/master/LICENSE' ], [ 'Fish', '2005–2009 Axel Liljencrantz, 2009–2022 fish-shell contributors', diff --git a/assets/stylesheets/application.css.scss b/assets/stylesheets/application.css.scss index 8a6221b68a..e7a725e797 100644 --- a/assets/stylesheets/application.css.scss +++ b/assets/stylesheets/application.css.scss @@ -58,6 +58,7 @@ 'pages/ember', 'pages/erlang', 'pages/express', + 'pages/fastapi', 'pages/git', 'pages/github', 'pages/gnuplot', diff --git a/assets/stylesheets/pages/_fastapi.scss b/assets/stylesheets/pages/_fastapi.scss new file mode 100644 index 0000000000..5f56c1ce61 --- /dev/null +++ b/assets/stylesheets/pages/_fastapi.scss @@ -0,0 +1,22 @@ +._fastapi { + > h2 { @extend %block-heading; } + > h3 { @extend %block-label, %label-blue; } + + code { @extend %label; } + + .tabbed-block { + border: 1px dashed black; + padding: 0.5rem 1rem 0; + margin-bottom: 1rem; + } + .tabbed-block label { + font-weight: var(--bolderFontWeight); + } + + .admonition { @extend %note; } + .admonition.tip { @extend %note-green; } + .admonition.note { @extend %note-blue; } + .admonition-title { + font-weight: var(--bolderFontWeight); + } +} diff --git a/lib/docs/filters/fastapi/clean_html.rb b/lib/docs/filters/fastapi/clean_html.rb new file mode 100644 index 0000000000..f9fc7cdb43 --- /dev/null +++ b/lib/docs/filters/fastapi/clean_html.rb @@ -0,0 +1,32 @@ +module Docs + class Fastapi + class CleanHtmlFilter < Filter + + def call + doc.css('.headerlink').each do |node| + node.remove + end + + doc.css('.tabbed-set').each do |node| + labels = node.css('.tabbed-labels label') + blocks = node.css('.tabbed-content .tabbed-block') + + blocks.each_with_index do |block_node, i| + block_node.prepend_child(labels[i]) if labels[i] + end + + node.css('> input, .tabbed-labels').remove + end + + doc.css('pre').each do |node| + node['class'] = "language-python" + node['data-language'] = "python" + node.content = node.at_css('code').content + end + + doc + end + + end + end +end diff --git a/lib/docs/filters/fastapi/container.rb b/lib/docs/filters/fastapi/container.rb new file mode 100644 index 0000000000..418015c328 --- /dev/null +++ b/lib/docs/filters/fastapi/container.rb @@ -0,0 +1,9 @@ +module Docs + class Fastapi + class ContainerFilter < Filter + def call + at_css '.md-content > .md-content__inner' + end + end + end +end diff --git a/lib/docs/filters/fastapi/entries.rb b/lib/docs/filters/fastapi/entries.rb new file mode 100644 index 0000000000..d2923bf889 --- /dev/null +++ b/lib/docs/filters/fastapi/entries.rb @@ -0,0 +1,55 @@ +module Docs + class Fastapi + class EntriesFilter < Docs::EntriesFilter + + def sanitized_path + path.gsub(/index$/, "") + end + + def path_parts + sanitized_path.split("/") + end + + def get_name + at_css('h1').content + end + + def get_name_other + header = at_css('h1') + if header + header.content + else + path_parts.last.titleize + end + end + + def get_type + if path_parts.length <= 1 + data = at_css('h1').content + else + data = path_parts[0...path_parts.length-1].join(": ").titleize + ": " + at_css('h1').content + end + + data + end + + def path_count + path_parts.length + end + + def additional_entries + entries = [] + type = get_type + + css('h2').each do |node| + name = node.content + id = path + "#" + node['id'] + entries << [name, id, type] + end + + entries + end + + end + end +end diff --git a/lib/docs/scrapers/fastapi.rb b/lib/docs/scrapers/fastapi.rb new file mode 100644 index 0000000000..b0749776f4 --- /dev/null +++ b/lib/docs/scrapers/fastapi.rb @@ -0,0 +1,30 @@ +module Docs + class Fastapi < UrlScraper + self.name = 'Fastapi' + self.type = 'fastapi' + self.release = '0.85.0' + self.base_url = 'https://fastapi.tiangolo.com/' + self.root_path = '/' + self.links = { + home: 'https://fastapi.tiangolo.com/', + code: 'https://github.com/tiangolo/fastapi' + } + + options[:only_patterns] = [ + /\Afeatures\//, /\Apython-types\//, + /\Atutorial\//, /\Aadvanced\//, /\Aasync\//, + /\Adeployment\//, /\Aproject-generation\// + ] + + html_filters.push 'fastapi/container', 'fastapi/clean_html', 'fastapi/entries' + + options[:attribution] = <<-HTML + © This project is licensed under the terms of the MIT license. + HTML + + def get_latest_version(opts) + get_latest_github_release('tiangolo', 'fastapi', opts) + end + + end +end diff --git a/public/icons/docs/fastapi/16.png b/public/icons/docs/fastapi/16.png new file mode 100644 index 0000000000000000000000000000000000000000..34d0637067b7353eb1b2a24e10277324e88debd7 GIT binary patch literal 1364 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBDAAG{;hE;^%b*2hb1<+n z3NbJPS&Tr)z$nE4G7ZRL@M4sPvx68lplX;H7}_%#SfFa6fHVkr05M1pgl1mAh%j*h z6I`{x0%imor0saV%ts)_S>O>_%)r1c48n{Iv*t)JFfg6S42dX-@b$4u&d=3LOvz75 z)vL%Y0O?||sjvbvb5lza6)JLb@`|l0Y?Z(&tblBgu)dN4SV>8?tx|+H?jfSfFg)+ zA4CH}eP~{0i5*M}nlQSq2!uSs8e~Cq4gN)$slb2)yUP&jEMzex^&sC_1!PvF=0vz; z=BDNqgZyF)bQo3%bdApWIr&Aw1&PV2c0hZ;T9Aa$RfDaG#AOYV1XQDqJ}9n{;vSN) zz@osEWyfWs4^O3bT#H{kng`4wX`U{QAr^wQlXvU61`0UnbG5L{SI`Pn5UO`r_&``i zYpVYTREPKGY zDUrQeU`mmh^;XV^FI?{vtNZ&Ex~kLwypGs z^34ZoMla7lw*HoO>ch(5HpR(=@aGtq3dG=4nhK&5hbC%6}1}ZB&UHx3vIVCg! E046!H)Bpeg literal 0 HcmV?d00001 diff --git a/public/icons/docs/fastapi/16@2x.png b/public/icons/docs/fastapi/16@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..79505801089e6c053bede0eedab690a9a938e84a GIT binary patch literal 1664 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz#^NA%Cx&(BWL^R}EvXTnX}-P; zT0k}j11qBt12aeo5Hc`IF|dN!3=Ce3(r|VVqXtwB69YqgCIbspO%#v@0S_Ps>W0$H z3m6e5E?|PIR#?D{V1u;9@8SOdq&N#aB8wRqxP?KOkzv*x37~0_nIRD+5xzcF$@#f@ zi7EL>sd^Q;1t47vHWgMtW^QUpqC!P(PF}H9g{=};g%ywu64qBz04piUwpEJo4N!2- zFG^J~(=*UBP_pAvP*AWbN=dT{a&d!d2l8x{GD=Dctn~HE%ggo3jrH=2()A53EiLs8 zjP#9+bb%^#i!1X=5-W7`ij^UTz|3(;Elw`VEGWs$&r<-Io0ybeT4JlD1hNPYAnq*5 zOhed|R}A$Q(1ZFQ8GS=N1AVyJK&>_)Q7iwV%v7MwAoJ}EZNMr~#Gv-r=z}araty?$ zU{Rn~?YM08;lXCdB^mdSoq>VHz|+MsB!YA8H0$-Dt`cqE*+h4`FxrZCHM%`oYS6&w z%=Cy;bk>{)`WrTE+rDM7a1WjzCQtf_CcKdAb{R)pVa^~dGSg)_t&ZvMHbch7IP{641m7U_iE zXr6P2&p(u`;Ox5PrabfGOe4GAe}WbbY0|T9-kmmasjNbIZ?0-%wksJ8$t~O|^ zU;IAo#hp)D+y9r|E{}7&zxDTm0_k+8IrRySMbFAQQ-N8TXYv&M6v46Zj zq(nB}?Xj9?`ILReZcbBy#al0bDg7d3W9DX_J$+`qT-Qd&lq6}d>km|(YyNj%d+@RF z7vUpHR?-V!+~JFt{-}4Q(rZS}Ycsd`rHmGgbNlyPGre)*{zCmnt0h1BysX`;Go4K* zKUd=~%d>sl+T~1E^6nRXrGE-p={p2!*+q5j^|9f!J-N8Jqf7WbAMd{P3=(@Hxth!L zl2e`1Z+&5!-M;9KqgCfY_m}U>*h(zJ^S(({^VhMqM%u+x?Y-x`h3(2#yG^lY?3sAC z$fqjTb5-5$)G%NCEHljN2V)(Ftn{9><_{i!(7SR?Eo0?Y`6J8hzLc_xMc(9Qt6son zqH%W3vf@5|XTj!g*AINX@V>=@^Q!5L8y$D8Pkd1gyC(Rn(9rpG%xOt6=X0^`^4bh+ z>jFP|d;dOv(4rvba6{O^t%BDgUBdX>*_7XE9utq6*~qre(BY%n9j?2N^?rB!cb&U( zez5cZYRDi~5i}$mxYp!c+EpJGFC|x1U6~8sdSMbjJ!#+<;&a4W5b0(-Uusuxq^`%|k51CE( d6ZEP6!|b-C Date: Sun, 9 Oct 2022 00:11:58 -0500 Subject: [PATCH 0041/1286] update docker trademark guidelines - added media resources --- public/icons/docs/docker/SOURCE | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/icons/docs/docker/SOURCE b/public/icons/docs/docker/SOURCE index 98fb49444a..424bf8edb4 100644 --- a/public/icons/docs/docker/SOURCE +++ b/public/icons/docs/docker/SOURCE @@ -1 +1,2 @@ -https://www.docker.com/brand-guidelines +https://www.docker.com/company/newsroom/media-resources/ +https://www.docker.com/legal/trademark-guidelines/ From 503f24bff323cf65a28cdadb8fae5b66a1e8562c Mon Sep 17 00:00:00 2001 From: "Fabian S. Varon Valencia" Date: Sun, 9 Oct 2022 00:49:32 -0500 Subject: [PATCH 0042/1286] replace broken link logos --- public/icons/docs/backbone/SOURCE | 2 +- public/icons/docs/cakephp/SOURCE | 2 +- public/icons/docs/clojure/SOURCE | 2 +- public/icons/docs/cordova/SOURCE | 2 +- public/icons/docs/crystal/SOURCE | 2 +- public/icons/docs/cypress/SOURCE | 2 +- public/icons/docs/dart/SOURCE | 2 +- public/icons/docs/django/SOURCE | 2 +- public/icons/docs/elixir/SOURCE | 4 ++-- public/icons/docs/ember/SOURCE | 2 +- public/icons/docs/gnu_cobol/SOURCE | 2 +- public/icons/docs/immutable/SOURCE | 2 +- public/icons/docs/jasmine/SOURCE | 2 +- 13 files changed, 14 insertions(+), 14 deletions(-) diff --git a/public/icons/docs/backbone/SOURCE b/public/icons/docs/backbone/SOURCE index 3225ed399e..827f555154 100644 --- a/public/icons/docs/backbone/SOURCE +++ b/public/icons/docs/backbone/SOURCE @@ -1 +1 @@ -http://backbonejs.org/docs/images/favicon.ico +https://github.com/jashkenas/backbone/blob/master/favicon.ico diff --git a/public/icons/docs/cakephp/SOURCE b/public/icons/docs/cakephp/SOURCE index e0d1c9dd1e..fd4749b214 100644 --- a/public/icons/docs/cakephp/SOURCE +++ b/public/icons/docs/cakephp/SOURCE @@ -1 +1 @@ -https://github.com/cakephp/cakephp-api-docs/blob/master/templates/cakephp/resources/favicon.png +https://github.com/cakephp/cakephp-api-docs/tree/2.x/static/assets/resources/favicons diff --git a/public/icons/docs/clojure/SOURCE b/public/icons/docs/clojure/SOURCE index 2e1bba857e..f3fc2c896d 100644 --- a/public/icons/docs/clojure/SOURCE +++ b/public/icons/docs/clojure/SOURCE @@ -1 +1 @@ -http://en.wikipedia.org/wiki/File:Clojure_logo.gif +https://en.wikipedia.org/wiki/File:Clojure_logo.svg diff --git a/public/icons/docs/cordova/SOURCE b/public/icons/docs/cordova/SOURCE index 1a7cbc9886..fed50b12ef 100644 --- a/public/icons/docs/cordova/SOURCE +++ b/public/icons/docs/cordova/SOURCE @@ -1 +1 @@ -http://cordova.apache.org/artwork.html +https://cordova.apache.org/artwork/ diff --git a/public/icons/docs/crystal/SOURCE b/public/icons/docs/crystal/SOURCE index aa9d98c466..a0471d0f62 100644 --- a/public/icons/docs/crystal/SOURCE +++ b/public/icons/docs/crystal/SOURCE @@ -1 +1 @@ -https://crystal-lang.org/images/favico.ico +https://crystal-lang.org/media/ diff --git a/public/icons/docs/cypress/SOURCE b/public/icons/docs/cypress/SOURCE index 3ea998300f..62d5e08e76 100644 --- a/public/icons/docs/cypress/SOURCE +++ b/public/icons/docs/cypress/SOURCE @@ -1 +1 @@ -https://github.com/cypress-io/cypress-documentation/raw/develop/themes/cypress/source/img/favicon.ico +https://github.com/cypress-io/cypress/tree/develop/assets diff --git a/public/icons/docs/dart/SOURCE b/public/icons/docs/dart/SOURCE index dd21f7e713..1defd9811f 100644 --- a/public/icons/docs/dart/SOURCE +++ b/public/icons/docs/dart/SOURCE @@ -1 +1 @@ -https://github.com/dart-lang/logos +https://dart.dev/brand diff --git a/public/icons/docs/django/SOURCE b/public/icons/docs/django/SOURCE index 2eaa39c2ca..87e06af346 100644 --- a/public/icons/docs/django/SOURCE +++ b/public/icons/docs/django/SOURCE @@ -1 +1 @@ -https://github.com/django/djangoproject.com/raw/master/static/favicon.ico +https://github.com/django/djangoproject.com/blob/main/djangoproject/static/img/favicon.ico diff --git a/public/icons/docs/elixir/SOURCE b/public/icons/docs/elixir/SOURCE index ba422b56a9..9bf12112ff 100644 --- a/public/icons/docs/elixir/SOURCE +++ b/public/icons/docs/elixir/SOURCE @@ -1,2 +1,2 @@ -http://elixir-lang.org/docs/stable/elixir/assets/logo.png -with permission from José Valim (https://twitter.com/josevalim/status/657125748659126272) +https://raw.githubusercontent.com/elixir-lang/elixir-lang.github.com/main/images/logo/logo-dark.png#gh-dark-mode-only +https://elixir-lang.org/images/logo/logo.png diff --git a/public/icons/docs/ember/SOURCE b/public/icons/docs/ember/SOURCE index 87f67da0c6..cd344e131c 100644 --- a/public/icons/docs/ember/SOURCE +++ b/public/icons/docs/ember/SOURCE @@ -1 +1 @@ -https://github.com/tschundeee/emberjsfavicon +https://emberjs.com/logos/ diff --git a/public/icons/docs/gnu_cobol/SOURCE b/public/icons/docs/gnu_cobol/SOURCE index 9aa7d9a2c9..6151bbab94 100644 --- a/public/icons/docs/gnu_cobol/SOURCE +++ b/public/icons/docs/gnu_cobol/SOURCE @@ -1 +1 @@ -https://sourceforge.net/p/open-cobol/icon +https://gnucobol.sourceforge.io/images/shire_200.png diff --git a/public/icons/docs/immutable/SOURCE b/public/icons/docs/immutable/SOURCE index 4ab56fe011..e1643a301d 100644 --- a/public/icons/docs/immutable/SOURCE +++ b/public/icons/docs/immutable/SOURCE @@ -1 +1 @@ -https://raw.githubusercontent.com/facebook/immutable-js/master/pages/src/static/favicon.png +https://github.com/immutable-js/immutable-js/blob/main/website/public/favicon.png \ No newline at end of file diff --git a/public/icons/docs/jasmine/SOURCE b/public/icons/docs/jasmine/SOURCE index f1e9404942..c411da5511 100644 --- a/public/icons/docs/jasmine/SOURCE +++ b/public/icons/docs/jasmine/SOURCE @@ -1 +1 @@ -https://github.com/jasmine/jasmine.github.io/tree/main/images +https://github.com/jasmine/jasmine/blob/main/images/jasmine_favicon.png From 2e551a31f647cdbb5d8f465bd8026a3309c93054 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Sun, 9 Oct 2022 09:24:32 +0200 Subject: [PATCH 0043/1286] fastapi: fix name "FastAPI" --- lib/docs/scrapers/fastapi.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/docs/scrapers/fastapi.rb b/lib/docs/scrapers/fastapi.rb index b0749776f4..241e47b0d4 100644 --- a/lib/docs/scrapers/fastapi.rb +++ b/lib/docs/scrapers/fastapi.rb @@ -1,6 +1,6 @@ module Docs class Fastapi < UrlScraper - self.name = 'Fastapi' + self.name = 'FastAPI' self.type = 'fastapi' self.release = '0.85.0' self.base_url = 'https://fastapi.tiangolo.com/' From 06bcaa05e423331225fa95114d69f38612fa59b9 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Sun, 9 Oct 2022 09:24:44 +0200 Subject: [PATCH 0044/1286] fastapi: fix attribution --- lib/docs/scrapers/fastapi.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/docs/scrapers/fastapi.rb b/lib/docs/scrapers/fastapi.rb index 241e47b0d4..01f1ab90a5 100644 --- a/lib/docs/scrapers/fastapi.rb +++ b/lib/docs/scrapers/fastapi.rb @@ -19,7 +19,8 @@ class Fastapi < UrlScraper html_filters.push 'fastapi/container', 'fastapi/clean_html', 'fastapi/entries' options[:attribution] = <<-HTML - © This project is licensed under the terms of the MIT license. + © 2018 Sebastián Ramírez
+ Licensed under the MIT License. HTML def get_latest_version(opts) From 3f2cee980c174e68c2281cd4fcf3947f91d17d44 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Sun, 9 Oct 2022 09:24:58 +0200 Subject: [PATCH 0045/1286] fastapi: remove sponsors --- lib/docs/filters/fastapi/clean_html.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/docs/filters/fastapi/clean_html.rb b/lib/docs/filters/fastapi/clean_html.rb index f9fc7cdb43..44e6a62dee 100644 --- a/lib/docs/filters/fastapi/clean_html.rb +++ b/lib/docs/filters/fastapi/clean_html.rb @@ -3,8 +3,10 @@ class Fastapi class CleanHtmlFilter < Filter def call - doc.css('.headerlink').each do |node| - node.remove + doc.css('.headerlink').remove + + if root_page? + doc.css('#sponsors ~ p', '#sponsors').remove end doc.css('.tabbed-set').each do |node| From add806dd0fa04d83243cc52876e1cbb2ee8f8704 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Sun, 9 Oct 2022 09:25:42 +0200 Subject: [PATCH 0046/1286] fastapi: add news entry --- assets/javascripts/news.json | 4 ++++ lib/docs/filters/fastapi/entries.rb | 19 ++----------------- 2 files changed, 6 insertions(+), 17 deletions(-) diff --git a/assets/javascripts/news.json b/assets/javascripts/news.json index e596a931fd..cb2b1f3472 100644 --- a/assets/javascripts/news.json +++ b/assets/javascripts/news.json @@ -1,4 +1,8 @@ [ + [ + "2022-10-09", + "New documentation: FastAPI" + ], [ "2022-10-02", "New documentation: Svelte" diff --git a/lib/docs/filters/fastapi/entries.rb b/lib/docs/filters/fastapi/entries.rb index d2923bf889..c410bb244b 100644 --- a/lib/docs/filters/fastapi/entries.rb +++ b/lib/docs/filters/fastapi/entries.rb @@ -14,27 +14,12 @@ def get_name at_css('h1').content end - def get_name_other - header = at_css('h1') - if header - header.content - else - path_parts.last.titleize - end - end - def get_type if path_parts.length <= 1 - data = at_css('h1').content + at_css('h1').content else - data = path_parts[0...path_parts.length-1].join(": ").titleize + ": " + at_css('h1').content + path_parts[0...-1].join(": ").titleize + ": " + at_css('h1').content end - - data - end - - def path_count - path_parts.length end def additional_entries From cd41d39abca98f074c4019816c4f7aa657de0f2e Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Sun, 9 Oct 2022 21:04:34 +0200 Subject: [PATCH 0047/1286] Add Vitest documentation (0.24.0) --- assets/javascripts/news.json | 2 +- .../templates/pages/about_tmpl.coffee | 5 ++++ lib/docs/filters/vite/clean_html.rb | 1 + lib/docs/filters/vitest/entries.rb | 28 ++++++++++++++++++ lib/docs/scrapers/vitest.rb | 28 ++++++++++++++++++ public/icons/docs/vitest/16.png | Bin 0 -> 893 bytes public/icons/docs/vitest/16@2x.png | Bin 0 -> 1668 bytes public/icons/docs/vitest/SOURCE | 1 + 8 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 lib/docs/filters/vitest/entries.rb create mode 100644 lib/docs/scrapers/vitest.rb create mode 100644 public/icons/docs/vitest/16.png create mode 100644 public/icons/docs/vitest/16@2x.png create mode 100644 public/icons/docs/vitest/SOURCE diff --git a/assets/javascripts/news.json b/assets/javascripts/news.json index cb2b1f3472..b951eabdad 100644 --- a/assets/javascripts/news.json +++ b/assets/javascripts/news.json @@ -1,7 +1,7 @@ [ [ "2022-10-09", - "New documentation: FastAPI" + "New documentations: FastAPI, Vitest" ], [ "2022-10-02", diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index 2a20f48a39..087e7e3d7f 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -936,6 +936,11 @@ credits = [ '2019–present, Yuxi (Evan) You and Vite contributors', 'MIT', 'https://github.com/vitejs/vite/blob/main/LICENSE' + ], [ + 'Vitest', + '2021-Present Anthony Fu
2021-Present Matias Capeletto
', + 'MIT', + 'https://github.com/vitest-dev/vitest/blob/main/LICENSE' ], [ 'Vue Router', '2013-present Evan You', diff --git a/lib/docs/filters/vite/clean_html.rb b/lib/docs/filters/vite/clean_html.rb index 18cf1d5509..7691765895 100644 --- a/lib/docs/filters/vite/clean_html.rb +++ b/lib/docs/filters/vite/clean_html.rb @@ -2,6 +2,7 @@ module Docs class Vite class CleanHtmlFilter < Filter def call + return "

Vitest

A Vite-native unit test framework. It's fast!

" if root_page? && current_url.host == 'vitest.dev' return '

Vite

' if root_page? @doc = at_css('main h1').parent diff --git a/lib/docs/filters/vitest/entries.rb b/lib/docs/filters/vitest/entries.rb new file mode 100644 index 0000000000..03527ef693 --- /dev/null +++ b/lib/docs/filters/vitest/entries.rb @@ -0,0 +1,28 @@ +module Docs + class Vitest + class EntriesFilter < Docs::EntriesFilter + def get_name + name = at_css('h1').content + name.sub! %r{\s*#\s*}, '' + name + end + + def get_type + name = at_css('h1').content + name.sub! %r{\s*#\s*}, '' + name + end + + def additional_entries + return [] if root_page? + css('h2[id], h3[id]').each_with_object [] do |node, entries| + text = node.content.strip + text.sub! %r{\s*#\s*}, '' + next if text == 'Example' + text.prepend "#{name}: " unless slug.starts_with?('api') || slug.starts_with?('config') + entries << [text, node['id']] + end + end + end + end +end diff --git a/lib/docs/scrapers/vitest.rb b/lib/docs/scrapers/vitest.rb new file mode 100644 index 0000000000..8b5a27a315 --- /dev/null +++ b/lib/docs/scrapers/vitest.rb @@ -0,0 +1,28 @@ +module Docs + class Vitest < UrlScraper + self.name = 'Vitest' + self.slug = 'vitest' + self.type = 'simple' + self.links = { + home: 'https://vitest.dev/', + code: 'https://github.com/vitest-dev/vitest' + } + + options[:root_title] = 'Vitest' + + options[:attribution] = <<-HTML + © 2021-Present Anthony Fu
+ © 2021-Present Matias Capeletto
+ Licensed under the MIT License. + HTML + + self.release = '0.24.0' + self.base_url = 'https://vitest.dev/' + self.initial_paths = %w(guide/) + html_filters.push 'vitest/entries', 'vite/clean_html' + + def get_latest_version(opts) + get_npm_version('vitest', opts) + end + end +end diff --git a/public/icons/docs/vitest/16.png b/public/icons/docs/vitest/16.png new file mode 100644 index 0000000000000000000000000000000000000000..fd44a6bb81f1521ca4d996e25d1b4df9fcf0c804 GIT binary patch literal 893 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbL!WQl7;NpOBzNqJ&XDnogBxn5>o zc5!lIL8@MUQTpt6Hc~)EEa{HEjtmSN`?>!lvI6-E$sR$z3=CCj3=9n|3=F@3LJcn% z7)lKo7+xhXFj&oCU=S~uvn$XBD8XLh>Fdh=jEhsqOslL!Yb8*Kv%n*=80ZdZ5M~VA zC2)g*fiWz=C&U#f`RBOy|NRa{Go@M=$Shl}STtL@Zl3htKwX!2eOmFa zFstWXM#3U{{(fp^WEEyA`uD(?QI%gY&zw;+VcE~vyCLk}m5i>x7jwK_D#m6NdRc9m zFk8@xTq~crcU)6H=QG7G7v`P*DN*EG&rB9p&fBt}C}&Lac6TXU&mQv#$hqL@;us=v zIXQuW*-aq9fvKm*Xj6|yjb$aPTZ-M{MU#x2#D$d?cV#us+Qk;pFmvY2*1+J^3ml@| z!~3W9_B!4_Fk$ZD6FU|xIB;aj4`+>26M`!2L fr`?^N%{LfUA5*^fws2=UC}cfd{an^LB{Ts5>>q1; literal 0 HcmV?d00001 diff --git a/public/icons/docs/vitest/16@2x.png b/public/icons/docs/vitest/16@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..051339ca942bd2dbe81b840d45f9b19fb3f661c0 GIT binary patch literal 1668 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE3?yBabR7dyk|nMYCBgY=CFO}lsSM@i<$9TU z*~Q6;1*v-ZMd`EO*+>Buv7|ftIx;Y9?C1WI$Oa@a2CEqi4B`cIb_Lo1CD=C6}Jp92))EbxddW?&GI24Tj) zT>>{47?@TD_=LCuCI1}P{(D0A&vBi<$94an(EfK!@BeAtKgYEH9@qJQQsXyJ_L$b6 z6WV`{Y5hK<{`;i%@8ep(k82jqk}8@hRWMVsaF*o%#SFiXX%^3xE}1P;G+R1rj#%Y% znd0ffg|nmzW=Z`$qV@Nbbnt(`7TdCF-Zi z-O(wBPtbU<%R=-63TABQ5l69+PGMC7d&XvlaDw#h=rf{}Y#v);0$Pk5q zfkUK9qLo2{7Z}2DlYs#XMKeJm4?%EQGzLO3P!|rxFw-P}kpedjB3L+G5@H~bTQ~#C z28zIyf!M$V07idK=s*=iM5cq?2A2hU8LAlQ5~w)XRWLQcbOIAcFbd{KgKPo1f0oq$ z|Nn0@8_zD@-l;}!j%sBky=OYu_tA9H!8_RfXobi%^{Y|de=Wk=3tsHLiEjp$lzAEmxmeV_}o;jL~w+gnPbVsSb-K|$2O$jHd>@zj3*goBG4rcTr~)SM}}+{T(c z*()o`Dv!0NM{?%(&6^6f9;BQ(xwqb4pM5%$Uf!`kO~1c$S4tE{1%%Z6|MyqO&EUY4 z=c#A(SWn&8*IvJ3&8oB~&eNZZC#+eym!GlpD{oKJ3^5b4yX}ov(%ckR?AWlOqhp1H zhoiT4%)Yg;a{`@$yreiJTCA;hryOa}lK8y)Ay-wEq~uc7rN4ivdl+~4%rU9#(g|RF zd?oX8`k6Vbljhs9Yv}9Rmf!osTEwHoEv_47;~Eyn_`>+8s`qrpr_kl{`{gm)};o+XJS?+yKUuHWVIu&#I*NuI z+jjBZuQxl}`5Qm+rELf(yCPy)|4=cYb@FDR#ocNi{~oDkvWL6ayx7SZzmF-T@M`Q~ zW}W)CySkQZ7x`3HI*0z?aDLKSdobC+GNN#_BN3`#NBL5cG2$fIs3PMbn{RD)irKOiQ bDzPveo6eYU@re9ZP;T&a^>bP0l+XkKQ$@Q3 literal 0 HcmV?d00001 diff --git a/public/icons/docs/vitest/SOURCE b/public/icons/docs/vitest/SOURCE new file mode 100644 index 0000000000..911a2163a4 --- /dev/null +++ b/public/icons/docs/vitest/SOURCE @@ -0,0 +1 @@ +https://vitest.dev/logo.svg From d9f2f335102f0c9a95e79645bf71902bbfd91acd Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Sun, 9 Oct 2022 21:19:47 +0200 Subject: [PATCH 0048/1286] Update Crystal documentation (1.6.0) --- lib/docs/scrapers/crystal.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/docs/scrapers/crystal.rb b/lib/docs/scrapers/crystal.rb index 96cf93313b..27fe2f9f74 100644 --- a/lib/docs/scrapers/crystal.rb +++ b/lib/docs/scrapers/crystal.rb @@ -2,7 +2,7 @@ module Docs class Crystal < UrlScraper include MultipleBaseUrls self.type = 'crystal' - self.release = '1.5.0' + self.release = '1.6.0' self.base_urls = [ "https://crystal-lang.org/api/#{release}/", "https://crystal-lang.org/reference/#{release[0..2]}/", From e62beb6af9d93504e9545213437810110d70c478 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 9 Oct 2022 23:05:39 +0300 Subject: [PATCH 0049/1286] feature/correct-gtk-introduction-link changing gtk4 link to point to correct one --- lib/docs/scrapers/gtk.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/docs/scrapers/gtk.rb b/lib/docs/scrapers/gtk.rb index cfa8595628..092b713d45 100644 --- a/lib/docs/scrapers/gtk.rb +++ b/lib/docs/scrapers/gtk.rb @@ -74,7 +74,7 @@ class Gtk < UrlScraper version '4.0' do self.release = '4.0.0' - self.base_url = "https://developer.gnome.org/gtk4/#{self.version}/" + self.base_url = "https://developer-old.gnome.org/gtk4/stable/" options[:root_title] = 'GTK 4 Reference Manual' options[:skip] = GTK4_SKIP From d7463786b3802d9b8f867f2a334e5bf30fa31463 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 9 Oct 2022 23:10:22 +0300 Subject: [PATCH 0050/1286] feature/correct-gtk-introduction-link changing gtk4 link to point to correct one using self.version --- lib/docs/scrapers/gtk.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/docs/scrapers/gtk.rb b/lib/docs/scrapers/gtk.rb index 092b713d45..5ac6c37047 100644 --- a/lib/docs/scrapers/gtk.rb +++ b/lib/docs/scrapers/gtk.rb @@ -74,7 +74,7 @@ class Gtk < UrlScraper version '4.0' do self.release = '4.0.0' - self.base_url = "https://developer-old.gnome.org/gtk4/stable/" + self.base_url = "https://developer-old.gnome.org/gtk4/#{self.version}/" options[:root_title] = 'GTK 4 Reference Manual' options[:skip] = GTK4_SKIP From 03d3f206d10b9e1b5e87e675d7bb3fdd6d963dbb Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Mon, 10 Oct 2022 23:03:44 +0200 Subject: [PATCH 0051/1286] Add Astro documentation (1.4.7) --- assets/javascripts/news.json | 4 ++ .../templates/pages/about_tmpl.coffee | 5 +++ lib/docs/filters/astro/clean_html.rb | 28 +++++++++++++ lib/docs/filters/astro/entries.rb | 25 ++++++++++++ lib/docs/scrapers/astro.rb | 38 ++++++++++++++++++ public/icons/docs/astro/16.png | Bin 0 -> 900 bytes public/icons/docs/astro/16@2x.png | Bin 0 -> 1057 bytes public/icons/docs/astro/SOURCE | 2 + 8 files changed, 102 insertions(+) create mode 100644 lib/docs/filters/astro/clean_html.rb create mode 100644 lib/docs/filters/astro/entries.rb create mode 100644 lib/docs/scrapers/astro.rb create mode 100644 public/icons/docs/astro/16.png create mode 100644 public/icons/docs/astro/16@2x.png create mode 100644 public/icons/docs/astro/SOURCE diff --git a/assets/javascripts/news.json b/assets/javascripts/news.json index b951eabdad..1dbc759f20 100644 --- a/assets/javascripts/news.json +++ b/assets/javascripts/news.json @@ -1,4 +1,8 @@ [ + [ + "2022-10-10", + "New documentation: Astro" + ], [ "2022-10-09", "New documentations: FastAPI, Vitest" diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index 087e7e3d7f..387a8f52e7 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -101,6 +101,11 @@ credits = [ '2018 The Apache Software Foundation
Apache and the Apache feather logo are trademarks of The Apache Software Foundation.', 'Apache', 'https://www.apache.org/licenses/LICENSE-2.0' + ], [ + 'Astro', + '2022 withastro', + 'MIT', + 'https://github.com/withastro/docs/blob/main/LICENSE' ], [ 'Async', '2010-2018 Caolan McMahon', diff --git a/lib/docs/filters/astro/clean_html.rb b/lib/docs/filters/astro/clean_html.rb new file mode 100644 index 0000000000..245bf8b86b --- /dev/null +++ b/lib/docs/filters/astro/clean_html.rb @@ -0,0 +1,28 @@ +module Docs + class Astro + class CleanHtmlFilter < Filter + def call + @doc = at_css('article > section') + + css('.anchor-link').remove + + css('pre').each do |node| + node.content = node.css('.line').map(&:content).join("\n") + node['data-language'] = node.ancestors('figure').first['class'][/lang-(\w+)/, 1] + node.remove_attribute('style') + end + + css('figcaption').each do |node| + node.name = 'div' + node['class'] = '_pre-heading' + end + + css('figure').each do |node| + node.before(node.children).remove + end + + doc + end + end + end +end diff --git a/lib/docs/filters/astro/entries.rb b/lib/docs/filters/astro/entries.rb new file mode 100644 index 0000000000..c451058cdd --- /dev/null +++ b/lib/docs/filters/astro/entries.rb @@ -0,0 +1,25 @@ +module Docs + class Astro + class EntriesFilter < Docs::EntriesFilter + def get_name + name = at_css('h1').content + name.sub! %r{\s*#\s*}, '' + name + end + + def get_type + aside = at_css('aside') + a = aside.at_css('a[aria-current="page"]', 'a[data-current-parent="true"]') + a.ancestors('details').at_css('summary').content + end + + def additional_entries + at_css('article').css('h2, h3').each_with_object [] do |node, entries| + type = node.content.strip + type.sub! %r{\s*#\s*}, '' + entries << ["#{name}: #{type}", node['id']] + end + end + end + end +end diff --git a/lib/docs/scrapers/astro.rb b/lib/docs/scrapers/astro.rb new file mode 100644 index 0000000000..1bf3e08368 --- /dev/null +++ b/lib/docs/scrapers/astro.rb @@ -0,0 +1,38 @@ +module Docs + class Astro < UrlScraper + self.name = 'Astro' + self.slug = 'astro' + self.type = 'simple' + self.links = { + home: 'https://docs.astro.build/', + code: 'https://github.com/withastro/astro' + } + + # https://github.com/withastro/astro/blob/main/LICENSE + options[:attribution] = <<-HTML + © 2021 Fred K. Schott
+ Licensed under the MIT License. + HTML + + self.release = '1.4.7' + self.base_url = 'https://docs.astro.build/en/' + self.initial_paths = %w(getting-started/) + + html_filters.push 'astro/entries', 'astro/clean_html' + + def get_latest_version(opts) + get_npm_version('astro', opts) + end + + private + + def parse(response) + if response.url == self.base_url + # root_page is a redirect + response.body.gsub! %r{.*}, '

Astro

Astro is a website build tool for the modern web — powerful developer experience meets lightweight output.

' + end + super + end + + end +end diff --git a/public/icons/docs/astro/16.png b/public/icons/docs/astro/16.png new file mode 100644 index 0000000000000000000000000000000000000000..6a34a3ff182615f2052c57663e79b290049546dd GIT binary patch literal 900 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GY}JiEBhjN@7W>RY_)UYH>+oZUKXl zfsv7}p#czu7#UcZm|GbbX&V?=85kVeSe*^j!;&U>cv7h@-A}f%ukn9oU%fL{j z#=y|f!octgDAe$RfuYoZf#FpG1B2BJ1_tqhIlBUFfD-H_p1!W^&$zfm^qJ26{2|W3 zz!($Y6XN>+Kg0jY4F6*p|Hm@?k74*9$^1Q<>01=jRyUp;BZ*i&sUU4xD-}fn8Fdi} zbpa_g0Z9!(33WjUH6d{g0icM4nxMG401%0(GceczE#j9@1q$+k1^LBQ`Nh=v!Rmp^ zfaVK`s{wWKhyhJd_tcODvVnqN1Hpz!sDadgjD;u$Gk|Ub3j&pa+zD3?GFJV698^8f zQlKuN!+>f)c7er#o&pPkHG=%e2(b%lBg6!t$FYe+G$N}9S%;(&$VTSEW#NK513oy&r85ucw1w~a2EfZ5S3riatM^`T&pTMBd z@QA3`jO?7;{L<>Wrr!QZlc&#FxOmC(ox67LKXvZLt=o^EJbV87?Ys9Mzkd7v`=1ks z=Lw*lj7i?^E+zMKSL6aYS3F%DLn;_q4?6lc8%Q)f+#auaHZ5BsVUCKN&mYNu|0h>{ zNSc=MWrI$!^dU7#vCI#ZA*_Wb@=XdadvS3t*s=d|&*tTZtt=9oA2DhCkre3AN&8cB zW^*P>WAPc=cB$}V3{2N_zr=r*^)(Y0IAFbN*UJxb0&Njizk+W+UMC^Y;cB(@__m{B zOiZUw-@hC8`mWuNn27>!6H9A+uRhk)f0Gd+n!8rc$2RToD$Qn31)sfZryZ-QxyjIU z&GDMP`tI842PL+!U(db1{o&8vYz4-E4IAehG5%rppC4-K`G?~!D1bd({an^LB{Ts5 DRcr^8 literal 0 HcmV?d00001 diff --git a/public/icons/docs/astro/16@2x.png b/public/icons/docs/astro/16@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..7e4c97e589efc7d3c3a6ca504e1b5b48460f1db1 GIT binary patch literal 1057 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE3?yBabR7dy8YQj~B`Jv|sa7SKxv9k^iMa&~ zMg~Skx`qZo6k=pxWnyM!YN2glU}a!%@Ude(P!CJGqpu?a!^VE@KZ&d$1Cu?1d>I(3 z)EF2VS{N990fib~Fff!FFfhDIU|_JC!N4G1FlSew4N!u;#M9T6{TUaRh@RE|2ZbjX z7#Q0Ed_r7-QUVeh0s;#E6Bq;~)C48efk;4HO;8-jPy;f+NL>IZ2tsNg5-12Fp@Lxb za4uL1O)!DI}>e;|UG0B1uO5OFjz4jAC-AY=dk z|Cg3_85k4wB|(0{K$^iOF2SlS=g}P#ou;Y_Clr=#`XiC!5RkI#0}IcOO#;7G?fAkK zk&x#np)}{+sVmQzTpGG8CYac@-FwEwaz$^RQcXxy!KpuIrtk?(yRc8{h?qo{fS!qs z2G;~OHH9aAVOAziS?hioh{@ggbs%dNOTZ%~CV^FAKT3AI&^X01kJCs8=mN$hZ+DkQ zp9O#jb;iIXgz))?}&rphTXe`-{`%`b9LSL{$I(=$dC>l`HzXG@G&{Km8eS7hj(c@v0nY-NY}ciXD;6zY&6suKiWGyk?K-{% z^BUM{-(?&r6uy;KqPx~=LGQP%i{C2TUdg;G<5uss_MG+a+`m5DP|xsJ;jWnq^WiPo zE}!EJwHT94q{C-(W~r$jP;IHss&dOsd;TofNhjm8>-R~uk=7BBrIy!C{{CWHXLxDh z?C4+lPjBAi+!f1Ta4Yy5KVN^Jzu)f(-YK yE0}+F%lmv;wWo3AJ^Pwx2cC=nQT)IC&VPoRTkEb$Z1K+nMXRT)pUXO@geCy|wqVr& literal 0 HcmV?d00001 diff --git a/public/icons/docs/astro/SOURCE b/public/icons/docs/astro/SOURCE new file mode 100644 index 0000000000..40392a4a57 --- /dev/null +++ b/public/icons/docs/astro/SOURCE @@ -0,0 +1,2 @@ +https://docs.astro.build/favicon.ico +https://docs.astro.build/favicon.svg From a2ae1b3a3f73b41686ede72be50e596c23be2291 Mon Sep 17 00:00:00 2001 From: Axel Forsman Date: Tue, 11 Oct 2022 14:16:54 +0200 Subject: [PATCH 0052/1286] Fix Erlang lib/ entries and func Types sec This commit * Makes lib/ entries get indexed correctly; * Stops the types associated with functions from being filtered away, and orders their "Types" heading under the function heading; and * Cleans out onmouseover/onmouseout attributes. --- assets/stylesheets/pages/_erlang.scss | 6 +++ lib/docs/filters/erlang/clean_html.rb | 63 +++++++++++------------ lib/docs/filters/erlang/entries.rb | 7 +-- lib/docs/filters/erlang/pre_clean_html.rb | 9 ---- 4 files changed, 37 insertions(+), 48 deletions(-) diff --git a/assets/stylesheets/pages/_erlang.scss b/assets/stylesheets/pages/_erlang.scss index 1b76cf6ded..d723c1c13d 100644 --- a/assets/stylesheets/pages/_erlang.scss +++ b/assets/stylesheets/pages/_erlang.scss @@ -6,4 +6,10 @@ .note { @extend %note; } .warning { @extend %note, %note-red; } .note .label, .warning .label { font-weight: var(--boldFontWeight); } + + .since { + color: var(--textColorLight); + font-weight: normal; + font-size: small; + } } diff --git a/lib/docs/filters/erlang/clean_html.rb b/lib/docs/filters/erlang/clean_html.rb index 8f55cc9bd0..33dfb5acee 100644 --- a/lib/docs/filters/erlang/clean_html.rb +++ b/lib/docs/filters/erlang/clean_html.rb @@ -30,34 +30,47 @@ def call # others + # Remove JS on-hover highlighting + css('h3.title-link', 'h4.data-type-name', 'h4.func-head').each do |node| + node.remove_attribute('onmouseover') + node.remove_attribute('onmouseout') + end + css('a[name]').each do |node| - # parent = node.parent - # parent = parent.parent while parent.name == 'span' - (node.next_element || node.parent)['id'] ||= node['name'] node.before(node.children).remove end css('h3').each do |node| - node.name = 'h2' content = node.content node.content = content.capitalize if content == content.upcase end - css('p > .bold_code:first-child ~ br:last-child').each do |node| - parent = node.parent - parent.name = 'h3' - parent.css('> br').remove - parent.css('> code').each do |code| - code.css('*:not(a):not(br)').each { |n| n.before(n.children).remove } - code.inner_html = code.inner_html.gsub('
', "\n").strip - end + # Subsume "Types" heading under function head heading + css('h4.func-head + .fun-types > h3.func-types-title') + .each { |node| node.name = 'h5' } + + css('h3', 'h4', 'h5').each do |node| + node.name = node.name.sub(/\d/) { |i| i.to_i - 1 } end - css('pre:not(.REFTYPES) *:not(a)', 'a[href^=javascript]').each do |node| - node.before(node.children).remove + # Convert code blocks to if inline otherwise + #
. + css('span.bold_code', 'span.code', '.func-head > span.title-name').each do |node| + node.remove_attribute('class') + node.css('span.bold_code', 'span.code') + .each { |n| n.before(n.children).remove } + if node.at_css('br') then + node.name = 'pre' + node.inner_html = "" + + node.inner_html.remove(/\n/).gsub('
', "\n").strip + + "
" + else + node.name = 'code' + node.inner_html = node.inner_html.strip.gsub(/\s+/, ' ') + end end - css('pre:not(.REFTYPES)').each do |node| + css('*:not(.REFTYPES) > pre').each do |node| node['data-language'] = 'erlang' node.inner_html = node.inner_html.strip_heredoc end @@ -70,23 +83,7 @@ def call end end - css('.REFTYPES').each do |node| - next unless node.parent - html = "
"
-          while node['class'] == 'REFTYPES'
-            node.inner_html = node.inner_html.remove(/\n/).gsub('
', "\n") - node.css('*:not(a)').each { |n| n.before(n.children).remove } - html << node.inner_html.strip + "\n" - node = node.next_element - node.previous_element.remove - end - html.gsub! %r{\n{2,}}, "\n" - html.strip! - html << "
" - node.before(html) - end - - css('.REFTYPES').remove + css('a[href^=javascript]').each { |n| n.before(n.children).remove } css('table').each do |node| node.remove_attribute('border') @@ -99,8 +96,6 @@ def call node.remove_attribute('valign') end - css('.bold_code').remove_attr('class') - doc end end diff --git a/lib/docs/filters/erlang/entries.rb b/lib/docs/filters/erlang/entries.rb index 8f1ddcf137..3373e1e7e8 100644 --- a/lib/docs/filters/erlang/entries.rb +++ b/lib/docs/filters/erlang/entries.rb @@ -44,10 +44,9 @@ def additional_entries if subpath.start_with?('lib/') names = Set.new entry_nodes.each_with_object [] do |node, entries| - id = node['name'] + id = node['id'] name = id.remove %r{\-\d*\z} name << ' (type)' if name.sub!(/\Atype-/, '') - name.remove! 'Module:' name.prepend "#{self.name}:" entries << [name, id] if names.add?(name) end @@ -67,9 +66,7 @@ def additional_entries def entry_nodes @entry_nodes ||= if subpath.start_with?('lib/') - css('p + div.REFBODY').each_with_object [] do |node, result| - result.concat(node.previous_element.css('a[name]').to_a) - end + css('article.func > h4', 'article.data-types-body > h4').entries elsif subpath.start_with?('erts') link = at_css(".flipMenu a[href='#{File.basename(subpath, '.html')}']") list = link.parent.parent diff --git a/lib/docs/filters/erlang/pre_clean_html.rb b/lib/docs/filters/erlang/pre_clean_html.rb index 8daefd280b..c601c1ee93 100644 --- a/lib/docs/filters/erlang/pre_clean_html.rb +++ b/lib/docs/filters/erlang/pre_clean_html.rb @@ -4,15 +4,6 @@ class PreCleanHtmlFilter < Filter def call css('.flipMenu li[title] > a').remove unless subpath.start_with?('erts') # perf - css('.REFTYPES').each do |node| - node.name = 'pre' - end - - css('span.bold_code', 'span.code').each do |node| - node.name = 'code' - node.inner_html = node.inner_html.strip.gsub(/\s+/, ' ') - end - doc end end From a15e590a63709970e4d9c0f90947ff1c4ef88172 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Thu, 13 Oct 2022 19:04:41 +0200 Subject: [PATCH 0053/1286] Update PostgreSQL documentation (15.0) --- lib/docs/filters/postgresql/clean_html.rb | 2 +- lib/docs/scrapers/postgresql.rb | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/docs/filters/postgresql/clean_html.rb b/lib/docs/filters/postgresql/clean_html.rb index b3da126cba..469e39cca0 100644 --- a/lib/docs/filters/postgresql/clean_html.rb +++ b/lib/docs/filters/postgresql/clean_html.rb @@ -13,7 +13,7 @@ def root def other @doc = at_css('#docContent') - css('.navheader', 'hr', '.navfooter a[accesskey="H"]').remove + css('.navheader', 'hr', '.navfooter a[accesskey="H"]', '.navfooter').remove unless at_css('h1') at_css('.refnamediv h2, .titlepage h2').name = 'h1' diff --git a/lib/docs/scrapers/postgresql.rb b/lib/docs/scrapers/postgresql.rb index a06ec6d797..68a431a1d1 100644 --- a/lib/docs/scrapers/postgresql.rb +++ b/lib/docs/scrapers/postgresql.rb @@ -55,6 +55,11 @@ class Postgresql < UrlScraper Licensed under the PostgreSQL License. HTML + version '15' do + self.release = '15.0' + self.base_url = "https://www.postgresql.org/docs/#{version}/" + end + version '14' do self.release = '14.5' self.base_url = "https://www.postgresql.org/docs/#{version}/" From 962ead48e4bb47a8885e9cab748f6c830bb74e5f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 15 Oct 2022 01:31:20 +0000 Subject: [PATCH 0054/1286] chore(deps): update actions/checkout action to v2.5.0 --- .github/workflows/build.yml | 2 +- .github/workflows/schedule-doc-report.yml | 2 +- .github/workflows/test.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a4ff8f4d21..3c7f4c2780 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-20.04 if: github.repository == 'freeCodeCamp/devdocs' steps: - - uses: actions/checkout@7884fcad6b5d53d10323aee724dc68d8b9096a2e # tag=v2.4.2 + - uses: actions/checkout@e2f20e631ae6d7dd3b768f56a5d2af784dd54791 # tag=v2.5.0 - name: Set up Ruby uses: ruby/setup-ruby@3068fa83f9cbd7ae106cac45483635a2f3a195c9 # tag=v1.117.0 with: diff --git a/.github/workflows/schedule-doc-report.yml b/.github/workflows/schedule-doc-report.yml index 17a77af84d..c82af2d127 100644 --- a/.github/workflows/schedule-doc-report.yml +++ b/.github/workflows/schedule-doc-report.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-20.04 if: github.repository == 'freeCodeCamp/devdocs' steps: - - uses: actions/checkout@7884fcad6b5d53d10323aee724dc68d8b9096a2e # tag=v2.4.2 + - uses: actions/checkout@e2f20e631ae6d7dd3b768f56a5d2af784dd54791 # tag=v2.5.0 - name: Set up Ruby uses: ruby/setup-ruby@3068fa83f9cbd7ae106cac45483635a2f3a195c9 # tag=v1.117.0 with: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 46ed15cdb7..e6b5a55e74 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,7 +9,7 @@ jobs: test: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@7884fcad6b5d53d10323aee724dc68d8b9096a2e # tag=v2.4.2 + - uses: actions/checkout@e2f20e631ae6d7dd3b768f56a5d2af784dd54791 # tag=v2.5.0 - name: Set up Ruby uses: ruby/setup-ruby@3068fa83f9cbd7ae106cac45483635a2f3a195c9 # tag=v1.117.0 with: From 86a5c68f437dbcac2f25070543a6579d9faa8ae8 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 15 Oct 2022 03:53:41 +0000 Subject: [PATCH 0055/1286] chore(deps): update ruby/setup-ruby action to v1.118.0 --- .github/workflows/build.yml | 2 +- .github/workflows/schedule-doc-report.yml | 2 +- .github/workflows/test.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3c7f4c2780..51de97ccf2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,7 +13,7 @@ jobs: steps: - uses: actions/checkout@e2f20e631ae6d7dd3b768f56a5d2af784dd54791 # tag=v2.5.0 - name: Set up Ruby - uses: ruby/setup-ruby@3068fa83f9cbd7ae106cac45483635a2f3a195c9 # tag=v1.117.0 + uses: ruby/setup-ruby@eae47962baca661befdfd24e4d6c34ade04858f7 # tag=v1.118.0 with: bundler-cache: true # runs 'bundle install' and caches installed gems automatically - name: Run tests diff --git a/.github/workflows/schedule-doc-report.yml b/.github/workflows/schedule-doc-report.yml index c82af2d127..ec07d64ae9 100644 --- a/.github/workflows/schedule-doc-report.yml +++ b/.github/workflows/schedule-doc-report.yml @@ -10,7 +10,7 @@ jobs: steps: - uses: actions/checkout@e2f20e631ae6d7dd3b768f56a5d2af784dd54791 # tag=v2.5.0 - name: Set up Ruby - uses: ruby/setup-ruby@3068fa83f9cbd7ae106cac45483635a2f3a195c9 # tag=v1.117.0 + uses: ruby/setup-ruby@eae47962baca661befdfd24e4d6c34ade04858f7 # tag=v1.118.0 with: bundler-cache: true # runs 'bundle install' and caches installed gems automatically - name: Generate report diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e6b5a55e74..efee888fd0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,7 +11,7 @@ jobs: steps: - uses: actions/checkout@e2f20e631ae6d7dd3b768f56a5d2af784dd54791 # tag=v2.5.0 - name: Set up Ruby - uses: ruby/setup-ruby@3068fa83f9cbd7ae106cac45483635a2f3a195c9 # tag=v1.117.0 + uses: ruby/setup-ruby@eae47962baca661befdfd24e4d6c34ade04858f7 # tag=v1.118.0 with: bundler-cache: true # runs 'bundle install' and caches installed gems automatically - name: Run tests From 6dd7cfa54e6bd3a33b74856f0f09925ea7427a15 Mon Sep 17 00:00:00 2001 From: Lexin Gong Date: Mon, 17 Oct 2022 21:15:22 +0800 Subject: [PATCH 0056/1286] Add Elixir v1.14 --- lib/docs/scrapers/elixir.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lib/docs/scrapers/elixir.rb b/lib/docs/scrapers/elixir.rb index 3b423264c2..c7e6658525 100644 --- a/lib/docs/scrapers/elixir.rb +++ b/lib/docs/scrapers/elixir.rb @@ -33,6 +33,19 @@ def initial_urls "https://elixir-lang.org/getting-started/introduction.html" ] end + version '1.14' do + self.release = '1.14.1' + self.base_urls = [ + "https://hexdocs.pm/elixir/#{release}/", + "https://hexdocs.pm/eex/#{release}/", + "https://hexdocs.pm/ex_unit/#{release}/", + "https://hexdocs.pm/iex/#{release}/", + "https://hexdocs.pm/logger/#{release}/", + "https://hexdocs.pm/mix/#{release}/", + 'https://elixir-lang.org/getting-started/' + ] + end + version '1.13' do self.release = '1.13.4' self.base_urls = [ From fe17dc24dbcdc4995feb5367896eff7bd0375ed5 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 21 Oct 2022 04:02:24 +0000 Subject: [PATCH 0057/1286] chore(deps): update dependency nokogiri to v1.13.9 [security] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 5e1b329d92..63d8dc4a6b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -55,7 +55,7 @@ GEM net-ssh (>= 5.0.0, < 6.0.0) net-ssh (5.2.0) newrelic_rpm (6.7.0.359) - nokogiri (1.13.6) + nokogiri (1.13.9) mini_portile2 (~> 2.8.0) racc (~> 1.4) options (2.3.2) From d3b8de2f4e5499f84be5cfb07a4b84e3a74ddb53 Mon Sep 17 00:00:00 2001 From: Juan Vasquez Date: Fri, 21 Oct 2022 17:16:00 -0500 Subject: [PATCH 0058/1286] Update about page: Desktop app has been archived Closes #1764 Links: * https://github.com/egoist/devdocs-desktop --- assets/javascripts/templates/pages/about_tmpl.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index 387a8f52e7..028378bc8c 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -30,7 +30,7 @@ app.templates.aboutPage = -> """

Plugins and Extensions

    -
  • Desktop app +
  • Desktop app (Has been archived)
  • Sublime Text package
  • Atom package
  • Visual Studio Code extension From 4cbe7891d6f659e9660fcb22eb606b2ad34b38dd Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Sun, 23 Oct 2022 15:05:08 +0800 Subject: [PATCH 0059/1286] octave: update documentation links --- assets/javascripts/templates/pages/about_tmpl.coffee | 2 +- lib/docs/scrapers/octave.rb | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index 387a8f52e7..6ff4805808 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -645,7 +645,7 @@ credits = [ 'Octave', '1996–2022 The Octave Project Developers', 'Octave', - 'https://octave.org/doc/v7.1.0/' + 'https://docs.octave.org/v7.1.0/' ], [ 'OpenJDK', '1993, 2022, Oracle and/or its affiliates. All rights reserved.
    Licensed under the GNU General Public License, version 2, with the Classpath Exception.
    Various third party code in OpenJDK is licensed under different licenses.
    Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.', diff --git a/lib/docs/scrapers/octave.rb b/lib/docs/scrapers/octave.rb index 3a7c38d337..5bbd856a6b 100644 --- a/lib/docs/scrapers/octave.rb +++ b/lib/docs/scrapers/octave.rb @@ -31,17 +31,17 @@ class Octave < UrlScraper version '7' do self.release = '7.1.0' - self.base_url = "https://octave.org/doc/v#{self.release}/" + self.base_url = "https://docs.octave.org/v#{self.release}/" end version '6' do self.release = '6.4.0' - self.base_url = "https://octave.org/doc/v#{self.release}/" + self.base_url = "https://docs.octave.org/v#{self.release}/" end version '5' do self.release = '5.2.0' - self.base_url = "https://octave.org/doc/v#{self.release}/" + self.base_url = "https://docs.octave.org/v#{self.release}/" end def get_latest_version(opts) From 0a8700e54b9c382baff8ffac99bf30ac0aceeca8 Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Sun, 23 Oct 2022 15:05:22 +0800 Subject: [PATCH 0060/1286] octave: update to 7.2.0 --- assets/javascripts/templates/pages/about_tmpl.coffee | 2 +- lib/docs/scrapers/octave.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index 6ff4805808..977177f934 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -645,7 +645,7 @@ credits = [ 'Octave', '1996–2022 The Octave Project Developers', 'Octave', - 'https://docs.octave.org/v7.1.0/' + 'https://docs.octave.org/v7.2.0/' ], [ 'OpenJDK', '1993, 2022, Oracle and/or its affiliates. All rights reserved.
    Licensed under the GNU General Public License, version 2, with the Classpath Exception.
    Various third party code in OpenJDK is licensed under different licenses.
    Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.', diff --git a/lib/docs/scrapers/octave.rb b/lib/docs/scrapers/octave.rb index 5bbd856a6b..c44a1f6ce6 100644 --- a/lib/docs/scrapers/octave.rb +++ b/lib/docs/scrapers/octave.rb @@ -30,7 +30,7 @@ class Octave < UrlScraper HTML version '7' do - self.release = '7.1.0' + self.release = '7.2.0' self.base_url = "https://docs.octave.org/v#{self.release}/" end From 8cb9de7faa60858a822ca53f28fce31de59d6b7b Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Sun, 23 Oct 2022 09:52:16 +0200 Subject: [PATCH 0061/1286] Update Vue.js documentation (3.2.41) --- lib/docs/filters/vue/clean_html.rb | 29 ++++++++--------------------- lib/docs/scrapers/vue.rb | 2 +- 2 files changed, 9 insertions(+), 22 deletions(-) diff --git a/lib/docs/filters/vue/clean_html.rb b/lib/docs/filters/vue/clean_html.rb index 288e7bf38e..b2784d3ea0 100644 --- a/lib/docs/filters/vue/clean_html.rb +++ b/lib/docs/filters/vue/clean_html.rb @@ -21,32 +21,19 @@ def call node.name = 'strong' end - # Remove CodePen div - css('.codepen').each do |node| - next if node.previous_element.nil? - span = node.css('span:contains("See the Pen")').remove - node.previous_element.add_child(' ') - node.previous_element.add_child(span) - node.remove - end - # Remove code highlighting - css('figure').each do |node| - node.name = 'pre' - node.content = node.at_css('td.code pre').css('.line').map(&:content).join("\n") - node['data-language'] = node['class'][/highlight (\w+)/, 1] - end - css('.line-numbers-wrapper').remove css('pre').each do |node| - node.content = node.content.strip - node['data-language'] = 'javascript' + node.parent.name = 'pre' + node.parent['data-language'] = node.parent['class'][/language-(\w+)/, 1] + node.parent['data-language'] = 'javascript' if node.parent['data-language'][/vue/] # unsupported by prism.js + node.parent.remove_attribute 'class' + node.parent.content = node.content.strip end - css('iframe').each do |node| - node['sandbox'] = 'allow-forms allow-scripts allow-same-origin' - node.remove if node['src'][/player.vimeo.com/] # https://v3.vuejs.org/guide/migration/introduction.html#overview - end + css('.vue-mastery-link').remove + css('.vuejobs-wrapper').remove + css('.vueschool').remove css('details').each do |node| node.name = 'div' diff --git a/lib/docs/scrapers/vue.rb b/lib/docs/scrapers/vue.rb index dd0a94a5d8..e06da2a191 100644 --- a/lib/docs/scrapers/vue.rb +++ b/lib/docs/scrapers/vue.rb @@ -19,7 +19,7 @@ class Vue < UrlScraper HTML version '3' do - self.release = '3.2.31' + self.release = '3.2.41' self.base_url = 'https://vuejs.org/' self.initial_paths = %w(guide/introduction.html) html_filters.push 'vue/entries_v3', 'vue/clean_html' From 9e54af619149bde2702057fddf1a143d5f4d8a03 Mon Sep 17 00:00:00 2001 From: Axel Forsman Date: Sat, 22 Oct 2022 18:27:55 +0200 Subject: [PATCH 0062/1286] Ensure docs of older OTP versions still look right --- lib/docs/filters/erlang/clean_html.rb | 27 ++++++++++----------------- lib/docs/filters/erlang/entries.rb | 14 ++++++++++---- 2 files changed, 20 insertions(+), 21 deletions(-) diff --git a/lib/docs/filters/erlang/clean_html.rb b/lib/docs/filters/erlang/clean_html.rb index 33dfb5acee..a467515a8a 100644 --- a/lib/docs/filters/erlang/clean_html.rb +++ b/lib/docs/filters/erlang/clean_html.rb @@ -12,8 +12,6 @@ def call node.before(node.children).remove end - css('> br').remove - css('> font[size="+1"]:first-child').each do |node| node.name = 'h1' end @@ -31,15 +29,11 @@ def call # others # Remove JS on-hover highlighting - css('h3.title-link', 'h4.data-type-name', 'h4.func-head').each do |node| + css('h3.title-link', 'h4.title-link', 'div.data-type-name', 'div.func-head').each do |node| node.remove_attribute('onmouseover') node.remove_attribute('onmouseout') end - css('a[name]').each do |node| - node.before(node.children).remove - end - css('h3').each do |node| content = node.content node.content = content.capitalize if content == content.upcase @@ -49,12 +43,19 @@ def call css('h4.func-head + .fun-types > h3.func-types-title') .each { |node| node.name = 'h5' } + css('p > a[name]').each do |node| + parent = node.parent + parent.name = 'h4' + parent['id'] ||= node['name'] + parent.css('> br:last-child').remove + end + css('a[name]:empty').each { |n| (n.next_element || n.parent)['id'] ||= n['name'] } + css('h3', 'h4', 'h5').each do |node| node.name = node.name.sub(/\d/) { |i| i.to_i - 1 } end - # Convert code blocks to if inline otherwise - #
    . + # Convert code blocks to if inline otherwise
    css('span.bold_code', 'span.code', '.func-head > span.title-name').each do |node| node.remove_attribute('class') node.css('span.bold_code', 'span.code') @@ -75,14 +76,6 @@ def call node.inner_html = node.inner_html.strip_heredoc end - css('.REFBODY').each do |node| - if node.element_children.length == 0 - node.name = 'p' - else - node.before(node.children).remove - end - end - css('a[href^=javascript]').each { |n| n.before(n.children).remove } css('table').each do |node| diff --git a/lib/docs/filters/erlang/entries.rb b/lib/docs/filters/erlang/entries.rb index 3373e1e7e8..bd6c94e51e 100644 --- a/lib/docs/filters/erlang/entries.rb +++ b/lib/docs/filters/erlang/entries.rb @@ -2,14 +2,14 @@ module Docs class Erlang class EntriesFilter < Docs::EntriesFilter def get_name - name = at_css('h1').content.strip + name = at_css('#content h1').content.strip name << " (#{type.remove('Guide: ')})" if name == '1 Introduction' name.sub! %r{\A(\d+)}, '\1.' name end def get_type - name = at_css('h1').content.strip + name = at_css('#content h1').content.strip if subpath.start_with?('lib/') type = subpath[/lib\/(.+?)[\-\/]/, 1] @@ -44,7 +44,7 @@ def additional_entries if subpath.start_with?('lib/') names = Set.new entry_nodes.each_with_object [] do |node, entries| - id = node['id'] + id = node['id'] || node['name'] name = id.remove %r{\-\d*\z} name << ' (type)' if name.sub!(/\Atype-/, '') name.prepend "#{self.name}:" @@ -66,7 +66,13 @@ def additional_entries def entry_nodes @entry_nodes ||= if subpath.start_with?('lib/') - css('article.func > h4', 'article.data-types-body > h4').entries + r18_funs = css('p + div.REFBODY').each_with_object [] do |node, result| + result.concat(node.previous_element.css('a[name]').to_a) + end + css('article.data-types-body > h4', 'article.func > h4', + 'div.data-type-name a[name]', 'div.exports-body > a[name]', + 'div.fun-type a[name]').entries + + r18_funs elsif subpath.start_with?('erts') link = at_css(".flipMenu a[href='#{File.basename(subpath, '.html')}']") list = link.parent.parent From 3b2daf1e6d4a4c4c15db165f43e22fc697535fc2 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Sun, 23 Oct 2022 23:28:41 +0200 Subject: [PATCH 0063/1286] Update Sass documentation (1.55.0) Obtain version from https://www.npmjs.com/package/sass as indicated in https://sass-lang.com/install. --- assets/javascripts/templates/pages/about_tmpl.coffee | 4 ++-- lib/docs/filters/sass/clean_html.rb | 5 +++++ lib/docs/filters/sass/entries.rb | 4 +++- lib/docs/scrapers/sass.rb | 9 ++++----- 4 files changed, 14 insertions(+), 8 deletions(-) diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index 387a8f52e7..fbb5b2d217 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -833,9 +833,9 @@ credits = [ 'https://raw.githubusercontent.com/sanctuary-js/sanctuary/master/LICENSE' ], [ 'Sass', - '2006-2020 Hampton Catlin, Nathan Weizenbaum, and Chris Eppstein', + '2022 Google Inc.', 'MIT', - 'https://raw.githubusercontent.com/sass/sass/stable/MIT-LICENSE' + 'https://raw.githubusercontent.com/sass/sass/main/LICENSE' ], [ 'Scala', '2002-2022 EPFL, with contributions from Lightbend', diff --git a/lib/docs/filters/sass/clean_html.rb b/lib/docs/filters/sass/clean_html.rb index 9f6c53fe36..8f816cb550 100644 --- a/lib/docs/filters/sass/clean_html.rb +++ b/lib/docs/filters/sass/clean_html.rb @@ -2,6 +2,7 @@ module Docs class Sass class CleanHtmlFilter < Filter def call + @doc = at_css('#main-content') css('.sl-c-alert').remove @@ -11,6 +12,8 @@ def call css('.site-footer').remove + css('.tsd-breadcrumb').remove + # Add id to code blocks css('pre.signature').each do |node| @@ -41,10 +44,12 @@ def call ### Syntax Highlight ### css('.highlight.scss', '.highlight.sass').each do |node| node['data-language'] = 'scss' + node.content = node.content.strip end css('.highlight.css').each do |node| node['data-language'] = 'css' + node.content = node.content.strip end doc diff --git a/lib/docs/filters/sass/entries.rb b/lib/docs/filters/sass/entries.rb index 47aa7ac7d3..35cbfcbf0a 100644 --- a/lib/docs/filters/sass/entries.rb +++ b/lib/docs/filters/sass/entries.rb @@ -3,7 +3,7 @@ class Sass class EntriesFilter < Docs::EntriesFilter def get_name - at_css('#main-content > h1').content + at_css('#main-content > h1, #main-content h1').content end def get_type @@ -23,6 +23,8 @@ def get_type 'Command line' when /modules/ 'Modules' + when /js-api/ + 'JavaScript API' else 'Misc' end diff --git a/lib/docs/scrapers/sass.rb b/lib/docs/scrapers/sass.rb index 84b3c47ea5..d751bcb0c9 100644 --- a/lib/docs/scrapers/sass.rb +++ b/lib/docs/scrapers/sass.rb @@ -1,7 +1,7 @@ module Docs class Sass < UrlScraper self.type = 'yard' - self.release = '3.6.4' + self.release = '1.55.0' self.base_url = 'https://sass-lang.com/documentation' self.root_path = 'index.html' self.links = { @@ -9,22 +9,21 @@ class Sass < UrlScraper code: 'https://github.com/sass/sass' } - html_filters.push 'sass/clean_html', 'sass/entries', 'title' + html_filters.push 'sass/entries', 'sass/clean_html' options[:root_title] = false - options[:title] = 'Sass Functions' options[:skip_patterns] = [/breaking-changes/] # options[:container] = '#main-content' options[:attribution] = <<-HTML - © 2006–2020 Hampton Catlin, Nathan Weizenbaum, and Chris Eppstein
    + © 2006–2022 the Sass team, and numerous contributors
    Licensed under the MIT License. HTML def get_latest_version(opts) - get_latest_github_release('sass', 'libsass', opts) + get_npm_version('sass', opts) end end From 77b3e99cd673bcf0896a8c0008c1100d18774c0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20V=C3=A1squez?= Date: Mon, 24 Oct 2022 12:51:10 -0500 Subject: [PATCH 0064/1286] Update assets/javascripts/templates/pages/about_tmpl.coffee Co-authored-by: Simon Legner --- assets/javascripts/templates/pages/about_tmpl.coffee | 1 - 1 file changed, 1 deletion(-) diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index 028378bc8c..24685eec9f 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -30,7 +30,6 @@ app.templates.aboutPage = -> """

    Plugins and Extensions

      -
    • Desktop app (Has been archived)
    • Sublime Text package
    • Atom package
    • Visual Studio Code extension From 7d1f5c85a697a9db13331ce92ae740f02524a282 Mon Sep 17 00:00:00 2001 From: "Fabian S. Varon Valencia" Date: Mon, 24 Oct 2022 22:27:04 -0500 Subject: [PATCH 0065/1286] added source file with updated icons --- public/icons/docs/mocha/SOURCE | 2 ++ public/icons/docs/pygame/SOURCE | 1 + public/icons/docs/sqlite/SOURCE | 1 + public/icons/docs/terraform/SOURCE | 1 + 4 files changed, 5 insertions(+) create mode 100644 public/icons/docs/mocha/SOURCE create mode 100644 public/icons/docs/pygame/SOURCE create mode 100644 public/icons/docs/sqlite/SOURCE create mode 100644 public/icons/docs/terraform/SOURCE diff --git a/public/icons/docs/mocha/SOURCE b/public/icons/docs/mocha/SOURCE new file mode 100644 index 0000000000..cc629edb2a --- /dev/null +++ b/public/icons/docs/mocha/SOURCE @@ -0,0 +1,2 @@ +https://mochajs.org/ +https://github.com/mochajs/mocha/tree/master/assets \ No newline at end of file diff --git a/public/icons/docs/pygame/SOURCE b/public/icons/docs/pygame/SOURCE new file mode 100644 index 0000000000..a867a9e840 --- /dev/null +++ b/public/icons/docs/pygame/SOURCE @@ -0,0 +1 @@ +https://www.pygame.org/news/2020/10/pygame-20th-birthday \ No newline at end of file diff --git a/public/icons/docs/sqlite/SOURCE b/public/icons/docs/sqlite/SOURCE new file mode 100644 index 0000000000..357998ffad --- /dev/null +++ b/public/icons/docs/sqlite/SOURCE @@ -0,0 +1 @@ +https://commons.wikimedia.org/wiki/File:SQLite370.svg \ No newline at end of file diff --git a/public/icons/docs/terraform/SOURCE b/public/icons/docs/terraform/SOURCE new file mode 100644 index 0000000000..890ee52657 --- /dev/null +++ b/public/icons/docs/terraform/SOURCE @@ -0,0 +1 @@ +https://www.hashicorp.com/brand \ No newline at end of file From cb72c344c42e412fe458ccc17bd4a5b8c60ea326 Mon Sep 17 00:00:00 2001 From: "Fabian S. Varon Valencia" Date: Mon, 24 Oct 2022 22:28:11 -0500 Subject: [PATCH 0066/1286] update jest icon url --- public/icons/docs/jest/SOURCE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/icons/docs/jest/SOURCE b/public/icons/docs/jest/SOURCE index 5604f1345f..dab33c2805 100644 --- a/public/icons/docs/jest/SOURCE +++ b/public/icons/docs/jest/SOURCE @@ -1 +1 @@ -https://github.com/facebook/jest/tree/master/website/src/jest/img +https://github.com/facebook/jest/tree/main/website/static/img From c89e5e3fccf821492f8ac4594ccf7fd6fc7c7d94 Mon Sep 17 00:00:00 2001 From: "Fabian S. Varon Valencia" Date: Mon, 24 Oct 2022 22:28:28 -0500 Subject: [PATCH 0067/1286] update julia icon url --- public/icons/docs/julia/SOURCE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/icons/docs/julia/SOURCE b/public/icons/docs/julia/SOURCE index 1f0e149fa9..ecc29dc1c8 100644 --- a/public/icons/docs/julia/SOURCE +++ b/public/icons/docs/julia/SOURCE @@ -1 +1 @@ -http://julialang.org/favicon.ico +https://docs.julialang.org/en/v1/assets/logo-dark.svg \ No newline at end of file From bd4709c61133aa0836960faaf1bcb1c26607c6a3 Mon Sep 17 00:00:00 2001 From: "Fabian S. Varon Valencia" Date: Mon, 24 Oct 2022 22:30:15 -0500 Subject: [PATCH 0068/1286] added knockout icon url --- public/icons/docs/knockout/SOURCE | 1 + 1 file changed, 1 insertion(+) diff --git a/public/icons/docs/knockout/SOURCE b/public/icons/docs/knockout/SOURCE index 699805491b..725170337f 100644 --- a/public/icons/docs/knockout/SOURCE +++ b/public/icons/docs/knockout/SOURCE @@ -1 +1,2 @@ http://learn.knockoutjs.com/ +http://learn.knockoutjs.com/Content/App/icon.png \ No newline at end of file From dd50f89304e6e7d18a31bdb6bd2087413d9cdd93 Mon Sep 17 00:00:00 2001 From: "Fabian S. Varon Valencia" Date: Mon, 24 Oct 2022 22:34:33 -0500 Subject: [PATCH 0069/1286] added latex logo --- public/icons/docs/latex/SOURCE | 2 ++ 1 file changed, 2 insertions(+) diff --git a/public/icons/docs/latex/SOURCE b/public/icons/docs/latex/SOURCE index f7dad48047..ce9397f5e1 100644 --- a/public/icons/docs/latex/SOURCE +++ b/public/icons/docs/latex/SOURCE @@ -1 +1,3 @@ Compiling \LaTeX with pdflatex https://www.tug.org/applications/pdftex/ +https://www.latex-project.org/img/latex-project-logo.svg +https://www.latex-project.org/get/ \ No newline at end of file From a5689eb8eb15a1cd2279ba312d16c935cd99f4fd Mon Sep 17 00:00:00 2001 From: "Fabian S. Varon Valencia" Date: Mon, 24 Oct 2022 22:34:53 -0500 Subject: [PATCH 0070/1286] added love logo from wiki --- public/icons/docs/love/SOURCE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/icons/docs/love/SOURCE b/public/icons/docs/love/SOURCE index a24a38021c..51075acd77 100644 --- a/public/icons/docs/love/SOURCE +++ b/public/icons/docs/love/SOURCE @@ -1 +1 @@ -https://bytebucket.org/rude/love/raw/default/platform/unix/love.svg +https://love2d.org/wiki/L%C3%B6ve_Logo_Graphics \ No newline at end of file From 5a041fbff0bbdb4351e4686dc656a827c67c4e37 Mon Sep 17 00:00:00 2001 From: "Fabian S. Varon Valencia" Date: Mon, 24 Oct 2022 22:35:12 -0500 Subject: [PATCH 0071/1286] added marionette logo url --- public/icons/docs/marionette/SOURCE | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/icons/docs/marionette/SOURCE b/public/icons/docs/marionette/SOURCE index a5d77e1775..306b48ad68 100644 --- a/public/icons/docs/marionette/SOURCE +++ b/public/icons/docs/marionette/SOURCE @@ -1 +1,2 @@ -https://github.com/marionettejs/marionettejs.com +https://github.com/marionettejs/marionettejs.com/blob/master/src/logo/logo.svg +https://github.com/marionettejs/marionettejs.com \ No newline at end of file From ad52ec179bd2f17cfafcbb05c329adb1e92fcc50 Mon Sep 17 00:00:00 2001 From: "Fabian S. Varon Valencia" Date: Mon, 24 Oct 2022 22:35:26 -0500 Subject: [PATCH 0072/1286] added meteor js logo url --- public/icons/docs/meteor/SOURCE | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/icons/docs/meteor/SOURCE b/public/icons/docs/meteor/SOURCE index 4e7b8a2570..44f19bac82 100644 --- a/public/icons/docs/meteor/SOURCE +++ b/public/icons/docs/meteor/SOURCE @@ -1 +1,2 @@ -https://www.meteor.com/ +https://assets.website-files.com/5dd3f8176674eb0829f184d5/5dd41eb9049df81f8773946e_meteor-logo.svg +https://www.meteor.com/ \ No newline at end of file From 93c46faf3c817447f5e2eac9aeb3535d1a07d191 Mon Sep 17 00:00:00 2001 From: "Fabian S. Varon Valencia" Date: Mon, 24 Oct 2022 22:35:41 -0500 Subject: [PATCH 0073/1286] added nginx logo url --- public/icons/docs/nginx/SOURCE | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/icons/docs/nginx/SOURCE b/public/icons/docs/nginx/SOURCE index bc80fe730a..547daa08dc 100644 --- a/public/icons/docs/nginx/SOURCE +++ b/public/icons/docs/nginx/SOURCE @@ -1 +1,2 @@ -http://nginx.org/ +http://nginx.org/nginx.png +http://nginx.org/ \ No newline at end of file From f37d5d4ebca40dbd4d030e1d73051cfbdb138a89 Mon Sep 17 00:00:00 2001 From: "Fabian S. Varon Valencia" Date: Mon, 24 Oct 2022 22:35:56 -0500 Subject: [PATCH 0074/1286] update perl logo url --- public/icons/docs/perl/SOURCE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/icons/docs/perl/SOURCE b/public/icons/docs/perl/SOURCE index 9e2313c251..cce8da16a4 100644 --- a/public/icons/docs/perl/SOURCE +++ b/public/icons/docs/perl/SOURCE @@ -1 +1 @@ -http://www.perlfoundation.org/perl_trademark +https://www.perlfoundation.org/trademarks.html \ No newline at end of file From 3d5a8b299a55e2013fcb25c33df7da5b54bc295c Mon Sep 17 00:00:00 2001 From: "Fabian S. Varon Valencia" Date: Mon, 24 Oct 2022 22:36:16 -0500 Subject: [PATCH 0075/1286] update phalcon logo url --- public/icons/docs/phalcon/SOURCE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/icons/docs/phalcon/SOURCE b/public/icons/docs/phalcon/SOURCE index 4676d6cef8..69d17c4a8e 100644 --- a/public/icons/docs/phalcon/SOURCE +++ b/public/icons/docs/phalcon/SOURCE @@ -1 +1 @@ -https://github.com/phalcon/website/blob/master/public/img/phalcon-22.png +https://github.com/phalcon/website/tree/master/public/images/icons \ No newline at end of file From dbc3c409e85ee29cc195caeb8c201843234cb327 Mon Sep 17 00:00:00 2001 From: "Fabian S. Varon Valencia" Date: Mon, 24 Oct 2022 22:36:58 -0500 Subject: [PATCH 0076/1286] added phaser logo url --- public/icons/docs/phaser/SOURCE | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/icons/docs/phaser/SOURCE b/public/icons/docs/phaser/SOURCE index 94e71758ea..0e32c84666 100644 --- a/public/icons/docs/phaser/SOURCE +++ b/public/icons/docs/phaser/SOURCE @@ -1 +1,2 @@ -https://phaser.io/ +https://phaser.io/images/img.png +https://phaser.io/ \ No newline at end of file From 62234d8bc48368655e8c368108d0e21c1a644ba2 Mon Sep 17 00:00:00 2001 From: "Fabian S. Varon Valencia" Date: Mon, 24 Oct 2022 22:37:25 -0500 Subject: [PATCH 0077/1286] update react and redux logo url --- public/icons/docs/react/SOURCE | 3 ++- public/icons/docs/redux/SOURCE | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/public/icons/docs/react/SOURCE b/public/icons/docs/react/SOURCE index 58f9cc30a6..bfd02fd2f4 100644 --- a/public/icons/docs/react/SOURCE +++ b/public/icons/docs/react/SOURCE @@ -1 +1,2 @@ -https://github.com/facebook/react/blob/master/docs/img/logo.svg +https://es.m.wikipedia.org/wiki/React#/media/Archivo%3AReact.svg +https://github.com/facebook/react/blob/master/docs/img/logo.svg \ No newline at end of file diff --git a/public/icons/docs/redux/SOURCE b/public/icons/docs/redux/SOURCE index c63f6d4af0..ccad6cccbe 100644 --- a/public/icons/docs/redux/SOURCE +++ b/public/icons/docs/redux/SOURCE @@ -1 +1 @@ -http://redux.js.org/gitbook/images/favicon.ico +https://redux.js.org/img/redux.svg \ No newline at end of file From cfe3f0d5d80852ab2fb9b788ff651c44d5cb8156 Mon Sep 17 00:00:00 2001 From: "Fabian S. Varon Valencia" Date: Mon, 24 Oct 2022 22:37:48 -0500 Subject: [PATCH 0078/1286] update statsmodels logo url --- public/icons/docs/statsmodels/SOURCE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/icons/docs/statsmodels/SOURCE b/public/icons/docs/statsmodels/SOURCE index 42e40bd421..42a85eeb0f 100644 --- a/public/icons/docs/statsmodels/SOURCE +++ b/public/icons/docs/statsmodels/SOURCE @@ -1 +1 @@ -http://statsmodels.sourceforge.net/_static/statsmodels_hybi_favico.ico \ No newline at end of file +https://www.statsmodels.org/stable/_images/statsmodels-logo-v2-horizontal.svg \ No newline at end of file From fdbe6f08641f330fa2747baee5110a838285f53c Mon Sep 17 00:00:00 2001 From: "Fabian S. Varon Valencia" Date: Mon, 24 Oct 2022 22:38:12 -0500 Subject: [PATCH 0079/1286] update tensorflow image url --- public/icons/docs/tensorflow/SOURCE | 2 +- public/icons/docs/tensorflow_cpp/SOURCE | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/icons/docs/tensorflow/SOURCE b/public/icons/docs/tensorflow/SOURCE index 3d2bb92740..393259cdb0 100644 --- a/public/icons/docs/tensorflow/SOURCE +++ b/public/icons/docs/tensorflow/SOURCE @@ -1 +1 @@ -https://www.tensorflow.org/images/favicon.png \ No newline at end of file +https://www.gstatic.com/devrel-devsite/prod/vc890b700b898929d6a9586ce333c0fb7d88f26c0e62aab16b11d9d648f110bfc/tensorflow/images/lockup.svg \ No newline at end of file diff --git a/public/icons/docs/tensorflow_cpp/SOURCE b/public/icons/docs/tensorflow_cpp/SOURCE index 3d2bb92740..393259cdb0 100644 --- a/public/icons/docs/tensorflow_cpp/SOURCE +++ b/public/icons/docs/tensorflow_cpp/SOURCE @@ -1 +1 @@ -https://www.tensorflow.org/images/favicon.png \ No newline at end of file +https://www.gstatic.com/devrel-devsite/prod/vc890b700b898929d6a9586ce333c0fb7d88f26c0e62aab16b11d9d648f110bfc/tensorflow/images/lockup.svg \ No newline at end of file From 62aad7613f7679a9e1c84a7ee6c969e9632d24dd Mon Sep 17 00:00:00 2001 From: "Fabian S. Varon Valencia" Date: Mon, 24 Oct 2022 22:38:26 -0500 Subject: [PATCH 0080/1286] added vagrant logo url --- public/icons/docs/vagrant/SOURCE | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/icons/docs/vagrant/SOURCE b/public/icons/docs/vagrant/SOURCE index 7c6a05ed7d..a1a77368cf 100644 --- a/public/icons/docs/vagrant/SOURCE +++ b/public/icons/docs/vagrant/SOURCE @@ -1 +1,2 @@ -http://www.vagrantup.com +https://www.vagrantup.com/vagrant-public/img/logo-hashicorp.svg +http://www.vagrantup.com \ No newline at end of file From 106fe3b7c2d2c1eacd33788252133a66b0a464ea Mon Sep 17 00:00:00 2001 From: "Fabian S. Varon Valencia" Date: Mon, 24 Oct 2022 22:38:50 -0500 Subject: [PATCH 0081/1286] added vue js logo url from wiki --- public/icons/docs/vue/SOURCE | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/icons/docs/vue/SOURCE b/public/icons/docs/vue/SOURCE index 97bd9e0369..77d0fdf6ef 100644 --- a/public/icons/docs/vue/SOURCE +++ b/public/icons/docs/vue/SOURCE @@ -1 +1,2 @@ -http://vuejs.org/ +https://es.wikipedia.org/wiki/Archivo:Vue.js_Logo_2.svg +http://vuejs.org/ \ No newline at end of file From b36a0b51b95ce60b1b150c9223b77bf850e5f190 Mon Sep 17 00:00:00 2001 From: ClasherKasten Date: Wed, 26 Oct 2022 12:49:29 +0200 Subject: [PATCH 0082/1286] Update versions of currently supported python versions --- lib/docs/scrapers/python.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/docs/scrapers/python.rb b/lib/docs/scrapers/python.rb index 275e737941..e3617e90fd 100644 --- a/lib/docs/scrapers/python.rb +++ b/lib/docs/scrapers/python.rb @@ -22,35 +22,35 @@ class Python < FileScraper HTML version '3.11' do - self.release = '3.11.0rc2' + self.release = '3.11.0' self.base_url = "https://docs.python.org/#{self.version}/" html_filters.push 'python/entries_v3', 'sphinx/clean_html', 'python/clean_html' end version '3.10' do - self.release = '3.10.7' + self.release = '3.10.8' self.base_url = "https://docs.python.org/#{self.version}/" html_filters.push 'python/entries_v3', 'sphinx/clean_html', 'python/clean_html' end version '3.9' do - self.release = '3.9.4' + self.release = '3.9.14' self.base_url = 'https://docs.python.org/3.9/' html_filters.push 'python/entries_v3', 'sphinx/clean_html', 'python/clean_html' end version '3.8' do - self.release = '3.8.6' + self.release = '3.8.14' self.base_url = 'https://docs.python.org/3.8/' html_filters.push 'python/entries_v3', 'sphinx/clean_html', 'python/clean_html' end version '3.7' do - self.release = '3.7.9' + self.release = '3.7.14' self.base_url = 'https://docs.python.org/3.7/' html_filters.push 'python/entries_v3', 'sphinx/clean_html', 'python/clean_html' From 15a05a0db4372e9ee8ffc3972172606d142208d8 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Thu, 27 Oct 2022 16:49:30 +0200 Subject: [PATCH 0083/1286] =?UTF-8?q?python:=20fix=20=C2=B6=20in=20glossar?= =?UTF-8?q?y?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/docs/filters/python/entries_v3.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/docs/filters/python/entries_v3.rb b/lib/docs/filters/python/entries_v3.rb index 2db966d62e..2ab1946233 100644 --- a/lib/docs/filters/python/entries_v3.rb +++ b/lib/docs/filters/python/entries_v3.rb @@ -78,7 +78,8 @@ def additional_entries end css('.glossary > dt[id]').each do |node| - entries << [node.content, node['id']] + name = node.content.remove("\u{00b6}") + entries << [name, node['id']] end css('.function > dt[id]', '.method > dt[id]', '.staticmethod > dt[id]', '.classmethod > dt[id]').each do |node| From ae4e5bea914e7351feb1971ee3c6bcb6b5cfe8d1 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Thu, 27 Oct 2022 22:08:33 +0200 Subject: [PATCH 0084/1286] Update Deno documentation (1.27.0) --- lib/docs/scrapers/deno.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/docs/scrapers/deno.rb b/lib/docs/scrapers/deno.rb index 9f01d8578a..1b00b7053d 100644 --- a/lib/docs/scrapers/deno.rb +++ b/lib/docs/scrapers/deno.rb @@ -2,7 +2,7 @@ module Docs class Deno < UrlScraper self.name = 'Deno' self.type = 'simple' - self.release = '1.26.0' + self.release = '1.27.0' self.base_url = 'https://doc.deno.land/deno/stable/' self.links = { home: 'https://deno.land/', From 05244efb73da0f08d45d49d5ad0a9fb910b95f3a Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Fri, 28 Oct 2022 17:54:05 +0800 Subject: [PATCH 0085/1286] Add Godot v3.4 and v3.5 Since v2 is included as one of the versions, I separated it into new files. --- .../templates/pages/about_tmpl.coffee | 6 +-- lib/docs/filters/godot/clean_html.rb | 2 +- lib/docs/filters/godot/clean_html_v2.rb | 27 +++++++++++ lib/docs/filters/godot/entries.rb | 16 +++---- lib/docs/filters/godot/entries_v2.rb | 45 +++++++++++++++++++ lib/docs/scrapers/godot.rb | 32 ++++++++++--- 6 files changed, 106 insertions(+), 22 deletions(-) create mode 100644 lib/docs/filters/godot/clean_html_v2.rb create mode 100644 lib/docs/filters/godot/entries_v2.rb diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index fbb5b2d217..7b144ba74d 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -373,9 +373,9 @@ credits = [ 'https://creativecommons.org/licenses/by/3.0/' ], [ 'Godot', - '2014-2021 Juan Linietsky, Ariel Manzur, Godot Engine contributors', - 'MIT', - 'https://raw.githubusercontent.com/godotengine/godot/master/LICENSE.txt' + '2014-2022 Juan Linietsky, Ariel Manzur, Godot Engine contributors', + 'CC BY 3.0', + 'https://creativecommons.org/licenses/by/3.0/' ], [ 'Graphite', '2008-2012 Chris Davis
      © 2011-2016 The Graphite Project', diff --git a/lib/docs/filters/godot/clean_html.rb b/lib/docs/filters/godot/clean_html.rb index 165d756dce..9543f102f8 100644 --- a/lib/docs/filters/godot/clean_html.rb +++ b/lib/docs/filters/godot/clean_html.rb @@ -4,7 +4,7 @@ class CleanHtmlFilter < Filter def call if root_page? at_css('h1').content = 'Godot Engine' - at_css('.admonition.tip').remove + at_css('.admonition.note').remove end css('ul[id].simple li:first-child:last-child').each do |node| diff --git a/lib/docs/filters/godot/clean_html_v2.rb b/lib/docs/filters/godot/clean_html_v2.rb new file mode 100644 index 0000000000..1379818a61 --- /dev/null +++ b/lib/docs/filters/godot/clean_html_v2.rb @@ -0,0 +1,27 @@ +module Docs + class Godot + class CleanHtmlV2Filter < Filter + def call + if root_page? + at_css('h1').content = 'Godot Engine' + at_css('.admonition.tip').remove + end + + css('ul[id].simple li:first-child:last-child').each do |node| + heading = Nokogiri::XML::Node.new 'h3', doc.document + heading['id'] = node.parent['id'] + heading.children = node.children + node.parent.before(heading).remove + end + + css('h3 strong').each do |node| + node.before(node.children).remove + end + + css('a.reference').remove_attr('class') + + doc + end + end + end +end diff --git a/lib/docs/filters/godot/entries.rb b/lib/docs/filters/godot/entries.rb index c3622b5aca..202c46e582 100644 --- a/lib/docs/filters/godot/entries.rb +++ b/lib/docs/filters/godot/entries.rb @@ -7,17 +7,11 @@ def get_name name end - TYPE_BY_LEARNING_PATH = { - 'step_by_step' => 'Guides: Step by step', - 'editor' => 'Guides: Editor', - 'features' => 'Guides: Engine features', - 'scripting' => 'Guides: Scripting', - 'workflow' => 'Guides: Project workflow' - } - def get_type - if slug.start_with?('learning') - TYPE_BY_LEARNING_PATH[slug.split('/')[1]] + if slug.start_with?('getting_started') + # Getting started sections are different even between different minor + # versions from v3 so we're programmatically generating them instead. + "Getting started: " + slug.split('/')[1].tr_s('_', ' ').capitalize else name end @@ -36,7 +30,7 @@ def additional_entries end def include_default_entry? - return false if subpath.start_with?('learning') && subpath.end_with?('index.html') + return false if subpath.start_with?('getting_started') && subpath.end_with?('index.html') return false if subpath == 'classes/index.html' true end diff --git a/lib/docs/filters/godot/entries_v2.rb b/lib/docs/filters/godot/entries_v2.rb new file mode 100644 index 0000000000..ca4e009997 --- /dev/null +++ b/lib/docs/filters/godot/entries_v2.rb @@ -0,0 +1,45 @@ +module Docs + class Godot + class EntriesV2Filter < Docs::EntriesFilter + def get_name + name = at_css('h1').content + name.remove! "\u{00B6}" # Remove the pilcrow + name + end + + TYPE_BY_LEARNING_PATH = { + 'step_by_step' => 'Guides: Step by step', + 'editor' => 'Guides: Editor', + 'features' => 'Guides: Engine features', + 'scripting' => 'Guides: Scripting', + 'workflow' => 'Guides: Project workflow' + } + + def get_type + if slug.start_with?('learning') + TYPE_BY_LEARNING_PATH[slug.split('/')[1]] + else + name + end + end + + def additional_entries + return [] unless slug.start_with?('classes') + + css('.simple[id]').each_with_object [] do |node, entries| + name = node.at_css('strong').content + next if name == self.name + name.prepend "#{self.name}." + name << '()' + entries << [name, node['id']] unless entries.any? { |entry| entry[0] == name } + end + end + + def include_default_entry? + return false if subpath.start_with?('learning') && subpath.end_with?('index.html') + return false if subpath == 'classes/index.html' + true + end + end + end +end diff --git a/lib/docs/scrapers/godot.rb b/lib/docs/scrapers/godot.rb index 144a9fc57f..f3cfb08b6a 100644 --- a/lib/docs/scrapers/godot.rb +++ b/lib/docs/scrapers/godot.rb @@ -6,41 +6,59 @@ class Godot < UrlScraper code: 'https://github.com/godotengine/godot' } - html_filters.push 'godot/entries', 'godot/clean_html', 'sphinx/clean_html' - - options[:download_images] = false options[:container] = '.document .section' - options[:only_patterns] = [/\Alearning\//, /\Aclasses\//] - options[:skip] = %w(classes/class_@global\ scope.html) + options[:download_images] = false + options[:only_patterns] = [/\Agetting_started\//, /\Aclasses\//] options[:attribution] = ->(filter) do if filter.subpath.start_with?('classes') <<-HTML - © 2014–2021 Juan Linietsky, Ariel Manzur, Godot Engine contributors
      + © 2014–2022 Juan Linietsky, Ariel Manzur, Godot Engine contributors
      Licensed under the MIT License. HTML else <<-HTML - © 2014–2021 Juan Linietsky, Ariel Manzur and the Godot community
      + © 2014–2022 Juan Linietsky, Ariel Manzur and the Godot community
      Licensed under the Creative Commons Attribution Unported License v3.0. HTML end end + version '3.5' do + self.release = '3.5.1' + self.base_url = "https://docs.godotengine.org/en/#{self.version}/" + options[:container] = '.document > [itemprop="articleBody"] > section[id]' + html_filters.push 'godot/entries', 'godot/clean_html', 'sphinx/clean_html' + end + + version '3.4' do + self.release = '3.4.5' + self.base_url = "https://docs.godotengine.org/en/#{self.version}/" + options[:container] = '.document > [itemprop="articleBody"] > section[id]' + html_filters.push 'godot/entries', 'godot/clean_html', 'sphinx/clean_html' + end + version '3.3' do self.release = '3.3.0' self.base_url = "https://docs.godotengine.org/en/#{self.version}/" + html_filters.push 'godot/entries', 'godot/clean_html', 'sphinx/clean_html' end version '3.2' do self.release = '3.2.3' self.base_url = "https://docs.godotengine.org/en/#{self.version}/" + html_filters.push 'godot/entries', 'godot/clean_html', 'sphinx/clean_html' end version '2.1' do self.release = '2.1.6' self.base_url = "https://docs.godotengine.org/en/#{self.version}/" + + options[:skip] = %w(classes/class_@global\ scope.html) + options[:only_patterns] = [/\Alearning\//, /\Aclasses\//] + + html_filters.push 'godot/entries_v2', 'godot/clean_html_v2', 'sphinx/clean_html' end def get_latest_version(opts) From 25685395447102af0925d19dc0bbf96026a09634 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 29 Oct 2022 00:02:49 +0000 Subject: [PATCH 0086/1286] chore(deps): update ruby/setup-ruby action to v1.120.0 --- .github/workflows/build.yml | 2 +- .github/workflows/schedule-doc-report.yml | 2 +- .github/workflows/test.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 51de97ccf2..51b9048a4d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,7 +13,7 @@ jobs: steps: - uses: actions/checkout@e2f20e631ae6d7dd3b768f56a5d2af784dd54791 # tag=v2.5.0 - name: Set up Ruby - uses: ruby/setup-ruby@eae47962baca661befdfd24e4d6c34ade04858f7 # tag=v1.118.0 + uses: ruby/setup-ruby@ece82769428359c077b5a5eaff268902a303c101 # tag=v1.120.0 with: bundler-cache: true # runs 'bundle install' and caches installed gems automatically - name: Run tests diff --git a/.github/workflows/schedule-doc-report.yml b/.github/workflows/schedule-doc-report.yml index ec07d64ae9..4d858a2aed 100644 --- a/.github/workflows/schedule-doc-report.yml +++ b/.github/workflows/schedule-doc-report.yml @@ -10,7 +10,7 @@ jobs: steps: - uses: actions/checkout@e2f20e631ae6d7dd3b768f56a5d2af784dd54791 # tag=v2.5.0 - name: Set up Ruby - uses: ruby/setup-ruby@eae47962baca661befdfd24e4d6c34ade04858f7 # tag=v1.118.0 + uses: ruby/setup-ruby@ece82769428359c077b5a5eaff268902a303c101 # tag=v1.120.0 with: bundler-cache: true # runs 'bundle install' and caches installed gems automatically - name: Generate report diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index efee888fd0..02eed36a75 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,7 +11,7 @@ jobs: steps: - uses: actions/checkout@e2f20e631ae6d7dd3b768f56a5d2af784dd54791 # tag=v2.5.0 - name: Set up Ruby - uses: ruby/setup-ruby@eae47962baca661befdfd24e4d6c34ade04858f7 # tag=v1.118.0 + uses: ruby/setup-ruby@ece82769428359c077b5a5eaff268902a303c101 # tag=v1.120.0 with: bundler-cache: true # runs 'bundle install' and caches installed gems automatically - name: Run tests From e40a6ae450ba4061658666d514f1e6055a84c49e Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Sun, 30 Oct 2022 20:18:58 +0800 Subject: [PATCH 0087/1286] Update scikit-learn documentation (1.1.3) --- assets/javascripts/templates/pages/about_tmpl.coffee | 2 +- lib/docs/filters/scikit_learn/clean_html.rb | 4 ++++ lib/docs/scrapers/scikit_learn.rb | 8 ++++---- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index a5edf9950c..768f23d060 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -847,7 +847,7 @@ credits = [ 'https://scikit-image.org/docs/dev/license.html' ], [ 'scikit-learn', - '2007-2020 The scikit-learn developers', + '2007-2022 The scikit-learn developers', 'BSD', 'https://raw.githubusercontent.com/scikit-learn/scikit-learn/master/COPYING' ], [ diff --git a/lib/docs/filters/scikit_learn/clean_html.rb b/lib/docs/filters/scikit_learn/clean_html.rb index ca95d7f496..530df12dbe 100644 --- a/lib/docs/filters/scikit_learn/clean_html.rb +++ b/lib/docs/filters/scikit_learn/clean_html.rb @@ -16,6 +16,10 @@ def call end end + # Most often comes with a link with the same text so we're removing + # these. + css('.sphx-glr-thumbnail-title').each do |node| node.remove end + css('.sphx-glr-signature').remove doc diff --git a/lib/docs/scrapers/scikit_learn.rb b/lib/docs/scrapers/scikit_learn.rb index 9511e4ba40..45268c4b95 100644 --- a/lib/docs/scrapers/scikit_learn.rb +++ b/lib/docs/scrapers/scikit_learn.rb @@ -3,8 +3,8 @@ class ScikitLearn < UrlScraper self.name = 'scikit-learn' self.slug = 'scikit_learn' self.type = 'sphinx' - self.release = '0.24.1' - self.base_url = 'https://scikit-learn.org/0.24/' + self.release = '1.1.3' + self.base_url = "https://scikit-learn.org/1.1/" self.root_path = 'index.html' self.force_gzip = true self.links = { @@ -14,7 +14,7 @@ class ScikitLearn < UrlScraper html_filters.push 'scikit_learn/entries', 'scikit_learn/clean_html', 'sphinx/clean_html', 'title' - options[:container] = ->(filter) { filter.root_page? ? 'body > .container' : '.section' } + options[:container] = ->(filter) { filter.root_page? ? 'body > .container' : '#sk-page-content-wrapper > .body' } options[:skip] = %w(modules/generated/sklearn.experimental.enable_iterative_imputer.html modules/generated/sklearn.experimental.enable_hist_gradient_boosting.html) options[:only_patterns] = [/\Amodules/, /\Adatasets/, /\Atutorial/, /\Aauto_examples/] @@ -24,7 +24,7 @@ class ScikitLearn < UrlScraper options[:max_image_size] = 256_000 options[:attribution] = <<-HTML - © 2007–2020 The scikit-learn developers
      + © 2007–2022 The scikit-learn developers
      Licensed under the 3-clause BSD License. HTML From 3d9a0640bd77a05d635af99d1f61da65819e2dbd Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Fri, 4 Nov 2022 21:17:58 +0100 Subject: [PATCH 0088/1286] godot: godotengine/godot/master/LICENSE.txt --- assets/javascripts/templates/pages/about_tmpl.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index 7b144ba74d..5833c3a179 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -374,8 +374,8 @@ credits = [ ], [ 'Godot', '2014-2022 Juan Linietsky, Ariel Manzur, Godot Engine contributors', - 'CC BY 3.0', - 'https://creativecommons.org/licenses/by/3.0/' + 'MIT', + 'https://raw.githubusercontent.com/godotengine/godot/master/LICENSE.txt' ], [ 'Graphite', '2008-2012 Chris Davis
      © 2011-2016 The Graphite Project', From d7155c5b470404afb8eba4218dff7883568c1d08 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Fri, 4 Nov 2022 21:38:57 +0100 Subject: [PATCH 0089/1286] Update WordPress documentation (6.1) --- lib/docs/scrapers/wordpress.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/docs/scrapers/wordpress.rb b/lib/docs/scrapers/wordpress.rb index ffb95a538c..b15a4fd0e4 100644 --- a/lib/docs/scrapers/wordpress.rb +++ b/lib/docs/scrapers/wordpress.rb @@ -2,7 +2,7 @@ module Docs class Wordpress < UrlScraper self.name = 'WordPress' self.type = 'wordpress' - self.release = '6.0' + self.release = '6.1' self.base_url = 'https://developer.wordpress.org/reference/' self.initial_paths = %w( functions/ @@ -37,8 +37,8 @@ class Wordpress < UrlScraper HTML def get_latest_version(opts) - doc = fetch_doc('https://wordpress.org/download/releases/', opts) - doc.at_css('.releases.latest td').content + tags = get_github_tags('WordPress', 'wordpress-develop', opts) + tags[0]['name'] end end end From 7e0dacb92bfd7de073c61b8b474cc397edd9bfdd Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Fri, 4 Nov 2022 21:54:01 +0100 Subject: [PATCH 0090/1286] Settings: disable autofocus of search input Fixes #1856. --- assets/javascripts/app/settings.coffee | 1 + .../javascripts/templates/pages/settings_tmpl.coffee | 3 +++ assets/javascripts/views/content/settings_page.coffee | 1 + assets/javascripts/views/search/search.coffee | 10 +++++++--- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/assets/javascripts/app/settings.coffee b/assets/javascripts/app/settings.coffee index 38b4f91077..74e32a658c 100644 --- a/assets/javascripts/app/settings.coffee +++ b/assets/javascripts/app/settings.coffee @@ -12,6 +12,7 @@ class app.Settings 'layout' 'size' 'tips' + 'noAutofocus' 'autoInstall' 'spaceScroll' 'spaceTimeout' diff --git a/assets/javascripts/templates/pages/settings_tmpl.coffee b/assets/javascripts/templates/pages/settings_tmpl.coffee index 73c656508b..048afa1a8e 100644 --- a/assets/javascripts/templates/pages/settings_tmpl.coffee +++ b/assets/javascripts/templates/pages/settings_tmpl.coffee @@ -34,6 +34,9 @@ app.templates.settingsPage = (settings) -> """ Automatically hide and show the sidebar Tip: drag the edge of the sidebar to resize it. +