Finish Bottle scraper

pull/481/head
Thibaut Courouble 9 years ago
parent 45e68b0eab
commit 380afc40cd

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 123 KiB

After

Width:  |  Height:  |  Size: 124 KiB

@ -1,5 +1,8 @@
[ [
[ [
"2016-09-05",
"New documentation: <a href=\"/bottle/\">Bottle</a>"
], [
"2016-08-07", "2016-08-07",
"New documentation: <a href=\"/docker/\">Docker</a>" "New documentation: <a href=\"/docker/\">Docker</a>"
], [ ], [

@ -109,6 +109,11 @@ credits = [
'2011-2016 Twitter, Inc.', '2011-2016 Twitter, Inc.',
'CC BY', 'CC BY',
'https://creativecommons.org/licenses/by/3.0/' 'https://creativecommons.org/licenses/by/3.0/'
], [
'Bottle',
'2016 Marcel Hellkamp',
'MIT',
'https://raw.githubusercontent.com/bottlepy/bottle/master/LICENSE'
], [ ], [
'Bower', 'Bower',
'2016 Bower contributors', '2016 Bower contributors',

@ -116,6 +116,7 @@
._icon-socketio:before { background-position: -2rem -6rem; } ._icon-socketio:before { background-position: -2rem -6rem; }
._icon-modernizr:before { background-position: -3rem -6rem; } ._icon-modernizr:before { background-position: -3rem -6rem; }
._icon-bower:before { background-position: -4rem -6rem; } ._icon-bower:before { background-position: -4rem -6rem; }
._icon-bottle:before { background-position: 0 -7rem; }
._icon-docker:before { background-position: -1rem -7rem; } ._icon-docker:before { background-position: -1rem -7rem; }
._icon-cakephp:before { background-position: -2rem -7rem; } ._icon-cakephp:before { background-position: -2rem -7rem; }
._icon-lua:before { background-position: -3rem -7rem; @extend %darkIconFix !optional; } ._icon-lua:before { background-position: -3rem -7rem; @extend %darkIconFix !optional; }

@ -1,16 +1,6 @@
module Docs module Docs
class Bottle class Bottle
class EntriesFilter < Docs::EntriesFilter class EntriesFilter < Docs::EntriesFilter
TYPES = {
'routing' => 'Request Routing',
'stpl' => 'SimpleTemplate Engine',
'api' => 'API Reference',
'tutorial_app' => 'Tutorial',
'async' => 'Primer to Asynchronous Applications',
'faq' => 'Frequently Asked Questions'
}
def get_name def get_name
name = at_css('h1').content.strip name = at_css('h1').content.strip
name.remove! "\u{00B6}" name.remove! "\u{00B6}"
@ -18,15 +8,18 @@ module Docs
end end
def get_type def get_type
type = slug.split('/').first case slug
when 'api'
if TYPES.key?(type) 'Reference'
type = TYPES[type] when 'configuration'
'Reference: Configuration'
when 'stpl'
'Reference: SimpleTemplate'
when 'plugindev'
'Reference: Plugin'
else else
type = type.capitalize 'Manual'
end end
type
end end
def additional_entries def additional_entries

@ -1,8 +1,7 @@
module Docs module Docs
class Bottle < FileScraper class Bottle < UrlScraper
self.type = 'sphinx' self.type = 'sphinx'
self.dir = "" self.root_path = 'index.html'
self.root_path = "index.html"
self.links = { self.links = {
home: 'https://bottle.org/', home: 'https://bottle.org/',
code: 'https://github.com/bottlepy/bottle' code: 'https://github.com/bottlepy/bottle'
@ -12,24 +11,19 @@ module Docs
options[:container] = '.body' options[:container] = '.body'
options[:skip] = %w( options[:skip] = %w(changelog.html development.html _modules/bottle.html)
changelog.html
development.html
plugindev.html
_modules/bottle.html
)
options[:attribution] = <<-HTML options[:attribution] = <<-HTML
&copy; 2009&ndash;2016, Marcel Hellkamp<br> &copy; 2016 Marcel Hellkamp<br>
Licensed under the MIT License.<br> Licensed under the MIT License.
HTML HTML
version '0.12' do # http://bottlepy.org/docs/0.12/bottle-docs.zip version '0.12' do
self.release = '0.12' self.release = '0.12'
self.base_url = "http://bottlepy.org/docs/#{self.version}/" self.base_url = "http://bottlepy.org/docs/#{self.version}/"
end end
version '0.11' do # http://bottlepy.org/docs/0.11/bottle-docs.zip version '0.11' do
self.release = '0.11' self.release = '0.11'
self.base_url = "http://bottlepy.org/docs/#{self.version}/" self.base_url = "http://bottlepy.org/docs/#{self.version}/"
end end

Binary file not shown.

After

Width:  |  Height:  |  Size: 589 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

@ -0,0 +1,2 @@
https://raw.githubusercontent.com/bottlepy/bottlepy.org/master/sphinx/static/logo_icon.png
https://github.com/bottlepy/bottle/issues/886
Loading…
Cancel
Save