The restructuredtext field

In order to dispatch informations in repository reStructuredText files using the mngit update command, you can use the mngit restructuredtext command. This command require a list of target files within which reStructuredText substitutions are defined between .. MngIt gards:

  • |NAME| can be used to get the name sub-field of software field.
  • |BRIEF| can be used to get the desc sub-field of software field.
  • |VERSION| can be used to get the version sub-field of software field.
  • |DETAILS| can be used to get the desc sub-field of about field.
  • |AUTHORSFILE|_ can be used to get a link to the file identified by the basename sub-field of authors field.
  • |LICENSENAME| can be used to get the plugin sub-field of license field.
  • |LICENSEFILE|_ can be used to get a link to the file identified by the basename sub-field of license field.

Warning

These substitutions are available only if corresponding fields and sub-fields are in the .mngit.yml file.

To define targetted files, use this command as follows (see Lst. 7)

$ mkdir doc
$ touch doc/index.rst
$ touch README.rst
$ ls -R
.:
AUTHORS.rst doc LICENSE.rst README.rst

./doc:
index.rst
$ mngit restructuredtext --target README.rst doc/index.rst
Lst. 7 Status of the .mngit.yml file
about:
  contact: <email>
  desc: <longdesc>
authors:
  basename: AUTHORS.rst
  format: '* {name} <{email}> ({score})'
  plugin: commit
license:
  basename: LICENSE.rst
  plugin: CeCILL-C
  width: 78
restructuredtext:
  plugin: default
  target:
  - README.rst
  - doc/index.rst
software:
  desc: <shortdesc>
  name: <name>
  version: 0.3.0
version:
  plugin: semantic