## #use "topfind";; #camlp4o;; #require "netstring";; #require "mikmatch_pcre";; open Mikmatch;; .##
More information about Caml2html here.
##= Netencoding.Html.encode ~in_enc:`Enc_iso88591 ~out_enc:`Enc_iso88591 () (Text.file_contents "caml2html-help") .##
Process a single file code.ml
:
caml2html code.ml
Same thing with a title for the page:
caml2html -t code.ml
Process a file with a title and line numbers:
caml2html -t -ln code.ml
Process a file with a title, line numbers and replace tabs by 4 spaces:
caml2html -t -ln -tab 4 code.ml
Process a file without footnotes (the most simple output):
caml2html -nf code.ml
Process a file and use a css (style.css):
caml2html -css code.ml
Process a file and use a specific css (http://blabla.com/style2.css):
caml2html -css -cssurl http://blabla.com/style2.css code.ml
Read from stdin and output to stdout:
caml2html
Process many files into a single file:
caml2html -o result.html *.mli *.ml
Process many files, and create one HTML page for each file:
caml2html *.ml
Same thing, but write result in the html
directory:
caml2html -d html *.ml
Same thing, but write result in the html
directory:
caml2html -d html *.ml
You can specify the character encoding with the -charset option:
caml2html -charset euc-jp input.ml -o output.html
You can write the comments in HTML. This lets you add simple
formatting such as hyperlinks. Beware that one HTML tag cannot
span over several lines, and that the characters
<
, >
and &
must be written as <
, >
and &
.
(* This is file1.ml. <a href="#file2.ml">This is a link to file2.ml</a>. *) ...
In this case, use the -hc
option:
caml2html -hc file1.ml file2.ml -o result.html
This document was not generated by caml2html!