Skip to content

Latest commit

 

History

History
77 lines (59 loc) · 2.09 KB

README.md

File metadata and controls

77 lines (59 loc) · 2.09 KB

opam2web

A tool to generate a website from an OPAM repository

This utility creates a static website from an OPAM repository, 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]*

If no repository is given, the current working directory is used.

Some available options are:

  • --directory / -d [directory] Generate a website with the repository located in a directory.
  • --remote [repository_name] Generate a website with a remote in the local OPAM installation.
  • --output / -o [directory] The directory where to write the generated HTML files
  • --where [comma-separated predicate list] A package's satisfaction of all of the predicates in any of the lists implies generation
  • --help / -help Display the list of options

Some available predicates are:

  • tag:*

For complete command-line configuration options, run

opam2web --help

Example

opam2web -o website -d ~/myrepo --remote 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

  • Merge each repository to generate a site of their ordered union
  • More complex news system (one page per news, Markdown...)
  • More complex statistics (graphics over time...)