CERN Accélérateur de science

BibConvert API

Invenio BibConvert can be called from within your Python
programs via a high-level API.

BibConvert High-level API (subject to change)

   Description:

      The high-level access to the BibConvert formatting and value generation
      allows to perform basic text formatting basde on BibConvert's metadata
      conversion configuration language. There are two main functions accessible
      via the BibConvert API: (i) The BibConvert formatter and (ii) The BibConvert
      value generator. For detailed description of formatting functions and
      generated values please have a look at the BibConvert Admin Guide.

   Signature:

      def format_field(value_raw, "function(parameters)"):
       """
       value_raw     - text to be formatted
       function      - BibConvert formatting function
       parameters    - Comma separated parameters
       output        - formated text

      def generate():
       """
       """

   Examples:

      >>> # import the function:
      >>> from invenio.bibconvert import format_field, generate
      >>> # format field
      >>> out = format_field(value_raw,"")
      >>> # generate value in requested format
      >>> out = generate("DATE(%Y-%m-%dT%H:%M:%SZ)")