diff --git a/assets/images/docs.png b/assets/images/docs.png index a45354cb..8a9293ae 100644 Binary files a/assets/images/docs.png and b/assets/images/docs.png differ diff --git a/assets/images/docs@2x.png b/assets/images/docs@2x.png index f1485b29..9b6ec599 100644 Binary files a/assets/images/docs@2x.png and b/assets/images/docs@2x.png differ diff --git a/assets/javascripts/news.json b/assets/javascripts/news.json index 1b7aec2d..edb363ff 100644 --- a/assets/javascripts/news.json +++ b/assets/javascripts/news.json @@ -1,7 +1,7 @@ [ [ "2016-09-05", - "New documentations: Fish and Bottle" + "New documentations: Fish, Bottle and scikit-image" ], [ "2016-08-07", "New documentation: Docker" diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index a5b2c947..d7a0bc00 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -494,6 +494,11 @@ credits = [ '2006-2016 Hampton Catlin, Nathan Weizenbaum, and Chris Eppstein', 'MIT', 'https://raw.githubusercontent.com/sass/sass/stable/MIT-LICENSE' + ], [ + 'scikit-image', + '2011 the scikit-image team', + 'BSD', + 'http://scikit-image.org/docs/dev/license.html' ], [ 'Sinon', '2010-2016 Christian Johansen', diff --git a/assets/stylesheets/global/_icons.scss b/assets/stylesheets/global/_icons.scss index daf7492b..923f9ef1 100644 --- a/assets/stylesheets/global/_icons.scss +++ b/assets/stylesheets/global/_icons.scss @@ -117,6 +117,7 @@ ._icon-modernizr:before { background-position: -3rem -6rem; } ._icon-bower:before { background-position: -4rem -6rem; } ._icon-fish:before { background-position: -5rem -6rem; @extend %darkIconFix !optional; } +._icon-scikit_image:before { background-position: -6rem -6rem; } ._icon-bottle:before { background-position: 0 -7rem; } ._icon-docker:before { background-position: -1rem -7rem; } ._icon-cakephp:before { background-position: -2rem -7rem; } diff --git a/lib/docs/filters/scikit_image/clean_html.rb b/lib/docs/filters/scikit_image/clean_html.rb deleted file mode 100644 index 86e9dc3b..00000000 --- a/lib/docs/filters/scikit_image/clean_html.rb +++ /dev/null @@ -1,11 +0,0 @@ -module Docs - class ScikitImage - class CleanHtmlFilter < Filter - def call - css('h2').remove - css('h1 + table').remove - doc - end - end - end -end diff --git a/lib/docs/filters/scikit_image/entries.rb b/lib/docs/filters/scikit_image/entries.rb index 8415a0e7..108eb2ce 100644 --- a/lib/docs/filters/scikit_image/entries.rb +++ b/lib/docs/filters/scikit_image/entries.rb @@ -4,17 +4,27 @@ module Docs def get_name name = at_css('h1').content.strip name.remove! "\u{00b6}" - name.remove! 'Module: ' - name.remove! %r{ \(.*\)} - name.downcase! + + if slug.start_with?('api') + name.remove! 'Module: ' + name.remove! %r{ \(.*\)} + name.downcase! + end + name end def get_type - name.split('.').first + if slug.start_with?('api') + name.split('.').first + else + 'Guide' + end end def additional_entries + return [] unless slug.start_with?('api') + entries = [] css('.class > dt[id]', '.exception > dt[id]', '.attribute > dt[id]').each do |node| @@ -30,8 +40,13 @@ module Docs css('.function > dt[id]', '.method > dt[id]', '.classmethod > dt[id]').each do |node| entries << [node['id'].remove('skimage.') + '()', node['id']] end + entries end + + def include_default_entry? + slug != 'api/api' + end end end end diff --git a/lib/docs/filters/sphinx/clean_html.rb b/lib/docs/filters/sphinx/clean_html.rb index 7a6218e3..c5d11d2f 100644 --- a/lib/docs/filters/sphinx/clean_html.rb +++ b/lib/docs/filters/sphinx/clean_html.rb @@ -9,7 +9,7 @@ module Docs node.remove end - css('em.xref', 'tt').each do |node| + css('em.xref', 'tt', 'cite').each do |node| node.name = 'code' end diff --git a/lib/docs/scrapers/scikit_image.rb b/lib/docs/scrapers/scikit_image.rb index 397ababe..4ef38f28 100644 --- a/lib/docs/scrapers/scikit_image.rb +++ b/lib/docs/scrapers/scikit_image.rb @@ -3,22 +3,22 @@ module Docs self.name = 'scikit-image' self.slug = 'scikit_image' self.type = 'sphinx' - self.release = '0.12.2' - self.base_url = 'http://scikit-image.org/docs/0.12.x/api/' - self.root_path = 'api.html' - + self.release = '0.12.3' + self.base_url = 'http://scikit-image.org/docs/0.12.x/' self.links = { home: 'http://scikit-image.org/', code: 'https://github.com/scikit-image/scikit-image' } - html_filters.push 'scikit_image/entries', 'scikit_image/clean_html', 'sphinx/clean_html' + html_filters.push 'scikit_image/entries', 'sphinx/clean_html' options[:container] = '.span9' + options[:skip] = %w(api_changes.html) + options[:only_patterns] = [/\Aapi/, /\Auser_guide/] options[:attribution] = <<-HTML - © 2011 the scikit-image development team
- Licensed under the scikit-image License. + © 2011 the scikit-image team
+ Licensed under the BSD 3-clause License. HTML end end diff --git a/public/icons/docs/scikit_image/16.png b/public/icons/docs/scikit_image/16.png index d928bc37..393a9933 100644 Binary files a/public/icons/docs/scikit_image/16.png and b/public/icons/docs/scikit_image/16.png differ diff --git a/public/icons/docs/scikit_image/16@2x.png b/public/icons/docs/scikit_image/16@2x.png index 7f985591..f528e4ca 100644 Binary files a/public/icons/docs/scikit_image/16@2x.png and b/public/icons/docs/scikit_image/16@2x.png differ