From 4913f97edfa9799b4c9b6f3e86a19de0ce16f937 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Sat, 8 Oct 2022 21:54:25 +0200 Subject: [PATCH] Update OpenJDK documentation (19) --- docs/file-scrapers.md | 7 +++++++ lib/docs/scrapers/openjdk.rb | 10 ++++++++++ 2 files changed, 17 insertions(+) diff --git a/docs/file-scrapers.md b/docs/file-scrapers.md index 2b1843c5..206a7117 100644 --- a/docs/file-scrapers.md +++ b/docs/file-scrapers.md @@ -176,6 +176,13 @@ Search 'Openjdk' in https://www.debian.org/distrib/packages, find the `openjdk-$ download it, extract it with `dpkg -x $PACKAGE ./` and move `./usr/share/doc/openjdk-16-jre-headless/api/` to `path/to/devdocs/docs/openjdk~$VERSION` +``` +curl http://ftp.at.debian.org/debian/pool/main/o/openjdk-19/openjdk-19-doc_19+36-2_all.deb && +tar xf openjdk-19-doc_19+36-2_all.deb +tar xf data.tar.xz +mv ./usr/share/doc/openjdk-19-jre-headless/api/ path/to/devdocs/docs/openjdk~$VERSION +``` + If you use or have access to a Debian-based GNU/Linux distribution you can run the following command: ```sh apt download openjdk-$VERSION-doc diff --git a/lib/docs/scrapers/openjdk.rb b/lib/docs/scrapers/openjdk.rb index 6a8fdb96..2ede8d5d 100644 --- a/lib/docs/scrapers/openjdk.rb +++ b/lib/docs/scrapers/openjdk.rb @@ -37,6 +37,16 @@ module Docs NEWFILTERS = ['openjdk/entries_new', 'openjdk/clean_html_new'] + version '19' do + self.release = '19' + self.root_path = 'index.html' + self.base_url = 'https://docs.oracle.com/en/java/javase/19/docs/api/' + + html_filters.push NEWFILTERS + + options[:container] = 'main' + end + version '18' do self.release = '18' self.root_path = 'index.html'