Skip to content

Commit fad3f10

Browse files
authored
Fix 3263 (#3266)
1 parent 5ace7fb commit fad3f10

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

data/planet-sources.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@
174174
- id: robur.coop
175175
name: Robur Cooperative
176176
url: https://blog.robur.coop/feed.xml
177+
only_ocaml: false
177178
- id: dinosaure
178179
name: Romain Calascibetta
179180
url: https://blog.osau.re/feed.xml

tool/ood-gen/lib/blog.ml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -149,19 +149,15 @@ module Scraper = struct
149149
let title = River.title post in
150150
let slug = Utils.slugify title in
151151
let source_path = "data/planet/" ^ source.Data_intf.Blog.id in
152+
print_string
153+
(Printf.sprintf "\nprocesing %s/%s " source.Data_intf.Blog.id slug);
152154
let output_file = source_path ^ "/" ^ slug ^ ".md" in
153155
if not (Sys.file_exists output_file) then
154156
let url = River.link post in
155157
let date = River.date post |> Option.map Syndic.Date.to_rfc3339 in
156158
match (url, date) with
157-
| None, _ ->
158-
print_endline
159-
(Printf.sprintf "skipping %s/%s: item does not have a url"
160-
source.Data_intf.Blog.id slug)
161-
| _, None ->
162-
print_endline
163-
(Printf.sprintf "skipping %s/%s: item does not have a date"
164-
source.id slug)
159+
| None, _ -> print_string "skipping, item does not have a url"
160+
| _, None -> print_string "skipping, item does not have a date"
165161
| Some url, Some date ->
166162
if not (Sys.file_exists source_path) then Sys.mkdir source_path 0o775;
167163
let content = River.content post in
@@ -191,7 +187,7 @@ module Scraper = struct
191187
let oc = open_out output_file in
192188
Printf.fprintf oc "%s" s;
193189
close_out oc)
194-
else ()
190+
else print_string "skipping, flagged as not caml related"
195191

196192
let scrape_source source =
197193
try

0 commit comments

Comments
 (0)