From 52e061ad08a312773c788869c24abff334388fdc Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Mon, 15 Aug 2022 17:11:25 +0200 Subject: [PATCH] Update MariaDB documentation (10.8.3) Fixes #1796. --- assets/javascripts/templates/pages/about_tmpl.coffee | 2 +- lib/docs/filters/mariadb/entries.rb | 1 + lib/docs/filters/mariadb/erase_invalid_pages.rb | 4 +++- lib/docs/scrapers/mariadb.rb | 4 ++-- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index f041b25d..5fd88f6b 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -528,7 +528,7 @@ credits = [ 'http://www.gnu.org/copyleft/fdl.html' ], [ 'MariaDB', - '2019 MariaDB', + '2022 MariaDB', 'CC BY-SA & GFDL', 'https://mariadb.com/kb/en/library/documentation/+license/' ], [ diff --git a/lib/docs/filters/mariadb/entries.rb b/lib/docs/filters/mariadb/entries.rb index a3cbeb34..883dfba3 100644 --- a/lib/docs/filters/mariadb/entries.rb +++ b/lib/docs/filters/mariadb/entries.rb @@ -9,6 +9,7 @@ module Docs def get_type return 'Type' if doc.inner_html == '' + return 'Tutorials' if at_css('a.crumb[href]:contains("Training & Tutorials")') link = at_css('#breadcrumbs > a:nth-child(4)') link.nil? ? at_css('#breadcrumbs > a:nth-child(3)').content : link.content diff --git a/lib/docs/filters/mariadb/erase_invalid_pages.rb b/lib/docs/filters/mariadb/erase_invalid_pages.rb index 0987375d..73bbaa81 100644 --- a/lib/docs/filters/mariadb/erase_invalid_pages.rb +++ b/lib/docs/filters/mariadb/erase_invalid_pages.rb @@ -10,7 +10,9 @@ module Docs # If this page should not be scraped, we erase it's contents in here so that the internal urls are not picked up # The entries filter will make sure that no entry is saved for this page - if at_css('a.crumb[href="https://mariadb.com/kb/en/documentation/"]').nil? + if at_css('a.crumb[href="https://mariadb.com/kb/en/documentation/"]').nil? and at_css('a.crumb[href="https://mariadb.com/kb/en/training-tutorials/"]').nil? + doc.inner_html = '' + elsif at_css('.question') and at_css('.answer') doc.inner_html = '' end diff --git a/lib/docs/scrapers/mariadb.rb b/lib/docs/scrapers/mariadb.rb index cf2c69c3..22f24f30 100644 --- a/lib/docs/scrapers/mariadb.rb +++ b/lib/docs/scrapers/mariadb.rb @@ -2,7 +2,7 @@ module Docs class Mariadb < UrlScraper self.name = 'MariaDB' self.type = 'mariadb' - self.release = '10.6.4' + self.release = '10.8.3' self.base_url = 'https://mariadb.com/kb/en/' self.root_path = 'documentation/' self.links = { @@ -24,7 +24,7 @@ module Docs ] options[:attribution] = <<-HTML - © 2021 MariaDB
+ © 2022 MariaDB
Licensed under the Creative Commons Attribution 3.0 Unported License and the GNU Free Documentation License. HTML