diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index 487c5272..e747cf6c 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -548,7 +548,7 @@ credits = [ 'https://octave.org/doc/interpreter/' ], [ 'OpenJDK', - '1993-2017, Oracle and/or its affiliates. All rights reserved.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses.
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.', + '1993, 2020, Oracle and/or its affiliates. All rights reserved.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses.
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.', 'GPLv2', 'http://openjdk.java.net/legal/gplv2+ce.html' ], [ diff --git a/docs/file-scrapers.md b/docs/file-scrapers.md index 855c0a3f..506e9a59 100644 --- a/docs/file-scrapers.md +++ b/docs/file-scrapers.md @@ -80,6 +80,24 @@ $GS = '/usr/local/opt/ghostscript/bin/gs'; # GhostScript ## OpenJDK +https://packages.debian.org/sid/openjdk-11-doc + +```sh +mkdir docs/openjdk~11 +curl --remote-name http://ftp.debian.org/debian/pool/main/o/openjdk-11/openjdk-11-doc_11.0.9.1+1-1_all.deb +bsdtar --extract --to-stdout --file openjdk-11-doc_11.0.9.1+1-1_all.deb data.tar.xz | \ +bsdtar --extract --xz --file - --strip-components=6 --directory=docs/openjdk\~11/ ./usr/share/doc/openjdk-11-jre-headless/api/ +``` + +https://packages.debian.org/sid/openjdk-8-doc + +```sh +mkdir docs/openjdk~8 +curl --remote-name http://ftp.debian.org/debian/pool/main/o/openjdk-8/openjdk-8-doc_8u272-b10-1_all.deb +bsdtar --extract --to-stdout --file openjdk-8-doc_8u272-b10-1_all.deb data.tar.xz | \ +bsdtar --extract --xz --file - --strip-components=6 --directory=docs/openjdk\~8/ ./usr/share/doc/openjdk-8-jre-headless/api/ +``` + ## Perl ## PHP diff --git a/lib/docs/filters/openjdk/clean_html.rb b/lib/docs/filters/openjdk/clean_html.rb index 240bde57..44b4d9e1 100644 --- a/lib/docs/filters/openjdk/clean_html.rb +++ b/lib/docs/filters/openjdk/clean_html.rb @@ -33,7 +33,7 @@ module Docs node.content = node.content.remove(' Summary').remove(' Detail').pluralize end - if root_page? + if root_page? && version == '8' css('.header')[1].remove css('.contentContainer')[0].remove css('.contentContainer')[-1].remove @@ -45,7 +45,10 @@ module Docs end end - at_css('h1').content = "OpenJDK #{release} Documentation" + (version != release ? " (#{version.split(' ').last})" : '') + end + + if root_page? + at_css('h1').content = "OpenJDK #{release} Documentation" end css('table').each do |node| diff --git a/lib/docs/scrapers/openjdk.rb b/lib/docs/scrapers/openjdk.rb index c26bce4c..20656e8d 100644 --- a/lib/docs/scrapers/openjdk.rb +++ b/lib/docs/scrapers/openjdk.rb @@ -18,13 +18,20 @@ module Docs /doc-files\//] options[:attribution] = <<-HTML - © 1993–2017, Oracle and/or its affiliates. All rights reserved.
+ © 1993, 2020, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates. HTML + version '11' do + self.release = '11.0.9' + self.root_path = 'index.html' + self.base_url = 'https://docs.oracle.com/en/java/javase/11/docs/api/' + options[:only_patterns] = [/\Ajava\./] + end + version '8' do self.release = '8'