Update OCaml documentation (5.2)

pull/2361/head
Simon Legner 2 months ago
parent 6ccf04a8d6
commit 2b8d9b6c33

@ -157,17 +157,6 @@ curl https://numpy.org/doc/$VERSION/numpy-html.zip | \
bsdtar --extract --file=- --directory=docs/numpy~$VERSION/
```
## OCaml
Download from https://www.ocaml.org/docs/ the HTML reference:
https://v2.ocaml.org/releases/4.14/ocaml-4.14-refman-html.tar.gz
and extract it as `docs/ocaml`:
```sh
curl https://v2.ocaml.org/releases/$VERSION/ocaml-$VERSION-refman-html.tar.gz | \
tar xz --transform 's/htmlman/ocaml/' --directory docs/
```
## OpenGL
```sh

@ -3,6 +3,8 @@ module Docs
class CleanHtmlFilter < Filter
def call
css('#sidebar').remove
css('pre').each do |node|
span = node.at_css('span[id]')
node['id'] = span['id'] if span

@ -1,5 +1,5 @@
module Docs
class Ocaml < FileScraper
class Ocaml < UrlScraper
self.name = 'OCaml'
self.type = 'ocaml'
self.root_path = 'index.html'
@ -16,15 +16,20 @@ module Docs
options[:skip_patterns] = [
/\Acompilerlibref\//,
/\Alibref\/type_/,
/\Alibref\/Stdlib\.\w+\.html/,
/\Aapi\/type_/,
/\Aapi\/Stdlib\.\w+\.html/,
]
options[:attribution] = <<-HTML
&copy; 1995-2022 INRIA.
&copy; 1995-2024 INRIA.
HTML
version '' do
self.release = '5.2'
self.base_url = "https://ocaml.org/manual/#{self.release}/"
end
version '5.0' do
self.release = '5.0'
self.base_url = "https://v2.ocaml.org/releases/#{self.release}/htmlman/"
end

Loading…
Cancel
Save