A tool to generate a website from an OPAM repository.
This utility creates a static website from an OPAM universe, listing all available packages and their details. A homepage and OPAM documentation is included as well.
Prerequisties
- re github.com/ocaml/ocaml-re
- uri github.com/avsm/ocaml-uri
- opam github.com/ocaml/opam
- opamfu github.com/ocamllabs/opamfu
- cow github.com/mirage/ocaml-cow
- cmdliner erratique.ch/software/cmdliner
- js_of_ocaml ocsigen.org/js_of_ocaml
opam install re uri opam-lib opamfu cow cmdliner js_of_ocaml
Build
To build theopam2web
utility, enter:make
To generate the static website corresponding to the
default
remote in the
local OPAM installation, enter:make -C src run
Usage
opam2web [options]* [repositories]*
-
path:*
A repository at the following local file system path. -
local:*
The repository corresponding to a named opam remote. -
opam:
The current local opam universe.
If no repository is given, the current local opam universe is used.
Some available options are:
-
--output / -o [directory]
The directory where to write the generated HTML files. -
--content / -c [direcory]
The directory where to find documentation and templates to use. Defaults to 'content'. -
--where [comma-separated predicate list]
A package's satisfaction of all of the predicates in any of the lists implies generation. -
--index (all|where)
Control which packages to include in the universe index. -
--help / -help
Display the list of options.
tag:*
depopt
not:*
repo:*
pkg:*
opam2web --help
Example
opam2web -o website path:~/myrepo local:default
~/myrepo
and the remote named default
in the local OPAM installation.
Resulting files will be located in the website
directory.from https://github.com/ocaml/opam2web
相关帖子:http://briteming.blogspot.co.uk/2014/01/opam-stog.html