core-admin/doc/skel-manpage.py

24 lines
544 B
Python
Raw Normal View History

#!/usr/bin/python3
import os
import sys
2019-11-22 11:18:34 +01:00
sys.path.insert(0, os.path.abspath('../'))
import argparse
import qubes.dochelpers
parser = argparse.ArgumentParser(description='prepare new manpage for command')
parser.add_argument('command', metavar='COMMAND',
2019-11-22 11:18:34 +01:00
help='program\'s command name; this should translate to '
'qubes.tools.<command_name>')
def main():
args = parser.parse_args()
sys.stdout.write(qubes.dochelpers.prepare_manpage(args.command))
2019-11-22 11:18:34 +01:00
if __name__ == '__main__':
main()