about summary refs log tree commit diff
diff options
context:
space:
mode:
authorsternenseemann <git@lukasepple.de>2020-04-24 15:47:13 +0200
committersternenseemann <git@lukasepple.de>2020-04-24 15:47:13 +0200
commit123868055c3f515568c10474ed9592e7a8428ecf (patch)
treefbf8caeecfeeb07ad7ca024d6f823f702ce2a1cf
parent765267852f4baaa6dbb272370705f318cc562ea6 (diff)
Fix build for newer versions of cow v0.2
-rw-r--r--logbook.opam2
-rw-r--r--src/logbook.ml7
2 files changed, 5 insertions, 4 deletions
diff --git a/logbook.opam b/logbook.opam
index 0e9197c..e0c3725 100644
--- a/logbook.opam
+++ b/logbook.opam
@@ -15,7 +15,7 @@ depends: [
   "astring" {>= "0.8.0"}
   "lwt"
   "jingoo"
-  "cow"
+  "cow" {>= "2.2.0"}
   ]
 depopts: []
 build: [
diff --git a/src/logbook.ml b/src/logbook.ml
index 2bbdfce..905ecd9 100644
--- a/src/logbook.ml
+++ b/src/logbook.ml
@@ -1,5 +1,6 @@
 open Lwt
 open Lwt.Infix
+open Cow
 
 let parse_file f =
   Lwt_io.with_file ~mode:Lwt_io.Input f (fun c ->
@@ -8,7 +9,7 @@ let parse_file f =
 
 let input_file = ref None
 let privacy = ref Log.Public
-let markup = ref (fun s -> Cow_html.p (Cow_html.string s))
+let markup = ref (fun s -> Html.p (Html.string s))
 
 let arglist =
   [ ("--file", Arg.String (fun f -> input_file := Some f), "log file to use");
@@ -18,7 +19,7 @@ let arglist =
     "set privacy level of output to public");
     ("--semi-private", Arg.Unit (fun () -> privacy := Log.Semi_private),
     "set privacy level of output to semi-private");
-    ("--markdown", Arg.Unit (fun () -> markup := Cow_markdown.of_string),
+    ("--markdown", Arg.Unit (fun () -> markup := Markdown.of_string),
     "enable markdown markup");
   ]
 
@@ -37,7 +38,7 @@ let _ =
       | Result.Ok log -> return log)
   in
   let log_markup =
-    Log.apply_markup (fun x -> Cow_xml.to_string ~decl:false (!markup x)) log
+    Log.apply_markup (fun x -> Xml.to_string ~decl:false (!markup x)) log
   in print_string (Jg_template.from_string
     Logbook_template.template
     ~models:(Logbook_models.model_of_log !privacy log_markup))