lrossett / centos / centpkg

Forked from centos/centpkg 3 years ago
Clone
Blob Blame History Raw
# Print a man page from the help texts.
import os
import sys

from six.moves.configparser import ConfigParser

if __name__ == '__main__':
    module_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
    sys.path.insert(0, module_path)

    config = ConfigParser()
    config.read(os.path.join(module_path, 'src', 'centpkg.conf'))

    import pyrpkg.man_gen
    try:
        import centpkg
    except ImportError:
        sys.path.append('src/')
        import centpkg
    client = centpkg.cli.centpkgClient(config=config, name='centpkg')
    pyrpkg.man_gen.generate(client.parser,
                            client.subparsers,
                            identity='centpkg',
                            sourceurl='https://git.centos.org/centos/centpkg')