Browse Source

Update scikit-image documentation (0.25.0)

Simon Legner 11 months ago
parent
commit
1dacda29a8
2 changed files with 7 additions and 4 deletions
  1. 2 1
      lib/docs/filters/scikit_image/entries.rb
  2. 5 3
      lib/docs/scrapers/scikit_image.rb

+ 2 - 1
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: '

+ 5 - 3
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/]