Update Python documentation (3.6.1, 3.5.3, 2.7.13)

Fixes #563.
pull/605/head
Thibaut Courouble 8 years ago
parent 30f389930c
commit ff359bdbb2

@ -461,7 +461,7 @@ credits = [
'http://www.postgresql.org/about/licence/' 'http://www.postgresql.org/about/licence/'
], [ ], [
'Python', 'Python',
'1990-2015 Python Software Foundation<br>Python is a trademark of the Python Software Foundation.', '2001-2017 Python Software Foundation<br>Python is a trademark of the Python Software Foundation.',
'PSFL', 'PSFL',
'https://docs.python.org/3/license.html' 'https://docs.python.org/3/license.html'
], [ ], [

@ -60,7 +60,7 @@ module Docs
next unless node['id'] || node.at_css('code, .classifier') next unless node['id'] || node.at_css('code, .classifier')
links = [] links = []
links << node.children.last.remove while node.children.last.try(:name) == 'a' links << node.children.last.remove while node.children.last.try(:name) == 'a'
node.inner_html = "<code>#{node.content.strip}</code> " node.inner_html = "<code>#{CGI::escapeHTML(node.content.strip)}</code> "
links.reverse_each { |link| node << link } links.reverse_each { |link| node << link }
end end

@ -2,6 +2,10 @@ module Docs
class Python < FileScraper class Python < FileScraper
self.type = 'sphinx' self.type = 'sphinx'
self.root_path = 'library/index.html' self.root_path = 'library/index.html'
self.links = {
home: 'https://www.python.org/',
code: 'https://github.com/python/cpython'
}
options[:only_patterns] = [/\Alibrary\//] options[:only_patterns] = [/\Alibrary\//]
@ -15,12 +19,12 @@ module Docs
library/sunau.html) library/sunau.html)
options[:attribution] = <<-HTML options[:attribution] = <<-HTML
&copy; 1990&ndash;2015 Python Software Foundation<br> &copy; 2001&ndash;2017 Python Software Foundation<br>
Licensed under the PSF License. Licensed under the PSF License.
HTML HTML
version '3.6' do version '3.6' do
self.release = '3.6.0' self.release = '3.6.1'
self.dir = '/Users/Thibaut/DevDocs/Docs/Python36' # docs.python.org/3.6/download.html self.dir = '/Users/Thibaut/DevDocs/Docs/Python36' # docs.python.org/3.6/download.html
self.base_url = 'https://docs.python.org/3.6/' self.base_url = 'https://docs.python.org/3.6/'
@ -28,7 +32,7 @@ module Docs
end end
version '3.5' do version '3.5' do
self.release = '3.5.2' self.release = '3.5.3'
self.dir = '/Users/Thibaut/DevDocs/Docs/Python35' # docs.python.org/3.5/download.html self.dir = '/Users/Thibaut/DevDocs/Docs/Python35' # docs.python.org/3.5/download.html
self.base_url = 'https://docs.python.org/3.5/' self.base_url = 'https://docs.python.org/3.5/'
@ -36,7 +40,7 @@ module Docs
end end
version '2.7' do version '2.7' do
self.release = '2.7.12' self.release = '2.7.13'
self.dir = '/Users/Thibaut/DevDocs/Docs/Python27' # docs.python.org/2.7/download.html self.dir = '/Users/Thibaut/DevDocs/Docs/Python27' # docs.python.org/2.7/download.html
self.base_url = 'https://docs.python.org/2.7/' self.base_url = 'https://docs.python.org/2.7/'

Loading…
Cancel
Save