File tree Expand file tree Collapse file tree 3 files changed +11
-15
lines changed
Expand file tree Collapse file tree 3 files changed +11
-15
lines changed Original file line number Diff line number Diff line change @@ -157,17 +157,6 @@ curl https://numpy.org/doc/$VERSION/numpy-html.zip | \
157157bsdtar --extract --file=- --directory=docs/numpy~$VERSION /
158158```
159159
160- ## OCaml
161-
162- Download from https://www.ocaml.org/docs/ the HTML reference:
163- https://v2.ocaml.org/releases/4.14/ocaml-4.14-refman-html.tar.gz
164- and extract it as ` docs/ocaml ` :
165-
166- ``` sh
167- curl https://v2.ocaml.org/releases/$VERSION /ocaml-$VERSION -refman-html.tar.gz | \
168- tar xz --transform ' s/htmlman/ocaml/' --directory docs/
169- ```
170-
171160## OpenGL
172161
173162``` sh
Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ class Ocaml
33 class CleanHtmlFilter < Filter
44 def call
55
6+ css ( '#sidebar' ) . remove
7+
68 css ( 'pre' ) . each do |node |
79 span = node . at_css ( 'span[id]' )
810 node [ 'id' ] = span [ 'id' ] if span
Original file line number Diff line number Diff line change 11module Docs
2- class Ocaml < FileScraper
2+ class Ocaml < UrlScraper
33 self . name = 'OCaml'
44 self . type = 'ocaml'
55 self . root_path = 'index.html'
@@ -16,15 +16,20 @@ class Ocaml < FileScraper
1616
1717 options [ :skip_patterns ] = [
1818 /\A compilerlibref\/ / ,
19- /\A libref \/ type_/ ,
20- /\A libref \/ Stdlib\. \w +\. html/ ,
19+ /\A api \/ type_/ ,
20+ /\A api \/ Stdlib\. \w +\. html/ ,
2121 ]
2222
2323 options [ :attribution ] = <<-HTML
24- © 1995-2022 INRIA.
24+ © 1995-2024 INRIA.
2525 HTML
2626
2727 version '' do
28+ self . release = '5.2'
29+ self . base_url = "https://ocaml.org/manual/#{ self . release } /"
30+ end
31+
32+ version '5.0' do
2833 self . release = '5.0'
2934 self . base_url = "https://v2.ocaml.org/releases/#{ self . release } /htmlman/"
3035 end
You can’t perform that action at this time.
0 commit comments