Graph-IT

Graph-IT DocCollect

The graphit/doc-collect composer package provides a symfony console command and a little executable to run it.

The command walks over a given tree of bare git repositories, extracts the doc directory from the latest released version and copies its content to the output directory. The intended use is to crawl gitolite repositories and copy the extracted documentation files to the the var directory of a graphit/doc-display installation.

Installation

composer create-project graphit/doc-collect

Usage

./doc-collect.php <repos> <output>

The command expects a tree of bare git repositories of the following structure in the given repos directory:

<repos>/<company>/<project>.git

It finds the latest released version by comparing the tags of the git repository with the PHP function version_compare. If no tags are stored in the repository the master branch will be considered the latest released version.

If there is a doc directory in the latest version its content will be copied to:

<output>/<company>/<project>