this repo has no description

Initial commit

+41
+4
dune
··· 1 + (library 2 + (name mime_printer) 3 + (public_name mime_printer)) 4 +
+2
dune-project
··· 1 + (lang dune 2.0) 2 +
+19
mime_printer.ml
··· 1 + type encoding = Noencoding | Base64 2 + type t = { mime_type : string; encoding : encoding; data : string } 3 + 4 + let dummy = { mime_type="text/odoc"; encoding=Noencoding; data="hello"} 5 + let outputs : t list ref = ref [] 6 + 7 + let push ?(encoding = Noencoding) mime_type data = 8 + outputs := { mime_type; encoding; data } :: !outputs 9 + 10 + let get () = 11 + let result = !outputs in 12 + outputs := []; 13 + result 14 + 15 + let to_odoc x = 16 + match String.split_on_char '/' x.mime_type, x.encoding with 17 + | "image"::_, Base64 -> Printf.sprintf "{%%html: <img src=\"data:%s;base64,%s\" /> %%}" x.mime_type x.data 18 + | "text"::"odoc"::[], Noencoding -> x.data 19 + | _ -> ""
+16
mime_printer.opam
··· 1 + version: "0.0.1" 2 + opam-version: "2.0" 3 + maintainer: "jon@recoil.org" 4 + authors: "various" 5 + license: "ISC" 6 + depends: [ 7 + "ocaml" (>= "4.04") 8 + ] 9 + build : [ 10 + ["dune" "subst"] {pinned} 11 + ["dune" "build" "-p" name "-j" jobs] 12 + ] 13 + synopsis: "Mime printer" 14 + description: """ 15 + Mime printer for toplevels 16 + """