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 | \
157
157
bsdtar --extract --file=- --directory=docs/numpy~$VERSION /
158
158
```
159
159
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
-
171
160
## OpenGL
172
161
173
162
``` sh
Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ class Ocaml
3
3
class CleanHtmlFilter < Filter
4
4
def call
5
5
6
+ css ( '#sidebar' ) . remove
7
+
6
8
css ( 'pre' ) . each do |node |
7
9
span = node . at_css ( 'span[id]' )
8
10
node [ 'id' ] = span [ 'id' ] if span
Original file line number Diff line number Diff line change 1
1
module Docs
2
- class Ocaml < FileScraper
2
+ class Ocaml < UrlScraper
3
3
self . name = 'OCaml'
4
4
self . type = 'ocaml'
5
5
self . root_path = 'index.html'
@@ -16,15 +16,20 @@ class Ocaml < FileScraper
16
16
17
17
options [ :skip_patterns ] = [
18
18
/\A compilerlibref\/ / ,
19
- /\A libref \/ type_/ ,
20
- /\A libref \/ Stdlib\. \w +\. html/ ,
19
+ /\A api \/ type_/ ,
20
+ /\A api \/ Stdlib\. \w +\. html/ ,
21
21
]
22
22
23
23
options [ :attribution ] = <<-HTML
24
- © 1995-2022 INRIA.
24
+ © 1995-2024 INRIA.
25
25
HTML
26
26
27
27
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
28
33
self . release = '5.0'
29
34
self . base_url = "https://v2.ocaml.org/releases/#{ self . release } /htmlman/"
30
35
end
You can’t perform that action at this time.
0 commit comments