# Documentation

group harp_documentation

  The HARP Generated documentation module contains public functions to output documentation that can be generated automatically by HARP. This includes the ingestion definitions and derived variable conversions.

  Functions

  int harp_doc_list_conversions(const harp_product *product, const char *variable_name, int (*print)(const char*, ...))

    Print the full listing of available variable conversions.

    If product is NULL then all possible conversions will be printed. If a product is provided then only conversions that can be made using the content of that product will be shown. The print function parameter should be a function that resembles printf(). The most common case use is to just use printf() itself. For example:

        harp_doc_list_conversions(product, printf);

    Parameters:

      - product – Pointer to a HARP product (can be NULL).

      - variable_name – Name of the target variable for which to show conversions (can be NULL).

      - print – Reference to a printf compatible function.

    Returns:

      - `0`, Success.

      - `-1`, Error occurred (check harp_errno).

  int harp_doc_export_ingestion_definitions(const char *path)

    Generate reStructuredText documentation for all ingestion definitions.

    Parameters:

      path – Path to directory in which the documentation files will be written.

    Returns:

      - `0`, Success.

      - `-1`, Error occurred (check harp_errno).