From 1dacda29a8ad1c6851c03a88522aa56ec07bac84 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Sat, 11 Jan 2025 16:06:10 +0100 Subject: [PATCH] Update scikit-image documentation (0.25.0) --- lib/docs/filters/scikit_image/entries.rb | 3 ++- lib/docs/scrapers/scikit_image.rb | 8 +++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/docs/filters/scikit_image/entries.rb b/lib/docs/filters/scikit_image/entries.rb index 108eb2ce..f3ec975b 100644 --- a/lib/docs/filters/scikit_image/entries.rb +++ b/lib/docs/filters/scikit_image/entries.rb @@ -3,7 +3,8 @@ module Docs class EntriesFilter < Docs::EntriesFilter def get_name name = at_css('h1').content.strip - name.remove! "\u{00b6}" + name.delete_suffix! "ΒΆ" + name.delete_suffix! "#" if slug.start_with?('api') name.remove! 'Module: ' diff --git a/lib/docs/scrapers/scikit_image.rb b/lib/docs/scrapers/scikit_image.rb index 368e03f7..66014c0f 100644 --- a/lib/docs/scrapers/scikit_image.rb +++ b/lib/docs/scrapers/scikit_image.rb @@ -3,8 +3,10 @@ module Docs self.name = 'scikit-image' self.slug = 'scikit_image' self.type = 'sphinx' - self.release = '0.18.1' - self.base_url = 'https://scikit-image.org/docs/0.18.x/' + self.release = '0.25.0' + v = self.release[/\d+\.\d+/] + self.base_url = "https://scikit-image.org/docs/#{v}.x/" + self.initial_paths = %w(/ /api/ /user_guide/) self.links = { home: 'https://scikit-image.org/', code: 'https://github.com/scikit-image/scikit-image' @@ -12,7 +14,7 @@ module Docs html_filters.push 'scikit_image/entries', 'sphinx/clean_html' - options[:container] = '.span9' + options[:container] = 'main article' options[:skip] = %w(api_changes.html) options[:only_patterns] = [/\Aapi/, /\Auser_guide/]