Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A tool to generate a website from an OPAM repository

branch: master

This branch is 0 commits ahead and 0 commits behind master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 content
Octocat-spinner-32 ext
Octocat-spinner-32 src
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .gitmodules
Octocat-spinner-32 CHANGES
Octocat-spinner-32 LICENSE
Octocat-spinner-32 Makefile
Octocat-spinner-32 README.md
README.md

opam2web

A tool to generate a website from an OPAM universe

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

If you have opam installed:

opam install re opam-lib cow cmdliner

Build

To build the opam2web utility, enter:

make

The binary will be located in src/_build/opam2web.native after compilation.

To generate the static website corresponding to the default remote in the local OPAM installation, enter:

make -C src run

Usage

opam2web [options]* [repositories]*

Each repository is namespaced by its type:

  • 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.

The order of repositories determines their priority when generating the opam universe to use. Earlier repositories are higher priority.

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.

Some available predicates are:

  • tag:*
  • depopt
  • not:*
  • repo:*
  • pkg:*

For complete command-line configuration options, run

opam2web --help

Example

opam2web -o website path:~/myrepo local:default

will generate the HTML files corresponding to the repository located in ~/myrepo and the remote named default in the local OPAM installation. Resulting files will be located in the website directory.

TODO

  • More complex news system (one page per news, Markdown...)
  • More complex statistics (graphics over time...)
Something went wrong with that request. Please try again.