1 Usage

Guile Documentá comes with a program called documenta, which you can use to generate API documentation for your Guile Scheme project. The resulting documentation will be written in Texinfo format.

For example, let’s suppose we have a project called BOGUS X and that we keep its source files in a folder as follows:

bogus-x                ← Project directory
├── bogusx             ← Guile Scheme "package"
│   ├── module-a.scm   ← Guile Scheme module
│   └── module-b.scm
├── doc                ← Project documentation in Texinfo format
│   └── main.texi
├── tests
└── README.org

In the example, the project already has some documentation written by hand in doc/main.texi, and we want to complement it with API documentation. To do so, we generate it as follows:

$ cd bogus-x
$ documenta api bogusx

The api subcommand will inspect all the modules in the bogusx "package" and build API reference documentation that will then be saved in Texinfo format to the doc/api folder:

bogus-x
├── bogusx
├── doc
│   ├── api             ← Newly extracted API documentation
│   │   └── index.texi
│   └── main.texi
├── tests
└── README.org

Finally, we can integrate the API documentation into the main.texi documentation using Texinfo’s @include command. For example:

@include api/index.texi