centpkg/doc/centpkg_man_page.py

25 lines
775 B
Python
Raw Normal View History

2021-04-08 11:07:52 -03:00
# 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')