Ejemplo n.º 1
0
class ManPageGenerator(object):
    def __init__(self):
        self.cli = CLI()
        self.cli.set_arguments()
        self.output = "atomic-reactor.%d" % MANPAGE_SECTION
        self.today = datetime.date.today()

    def run(self):
        mpf = ManPageFormatter(PROG,
                               desc=DESCRIPTION,
                               ext_sections={
                                   "authors": MANPAGE_AUTHORS,
                               })

        build_subparsers = OrderedDict(sorted(
            [(p, OrderedDict()) for p in self.cli.source_types_parsers.values()],
            key=lambda p: p[0].prog
        ))
        m = mpf.format_man_page(main_parser=self.cli.parser, subparsers=OrderedDict([
            (self.cli.build_parser, build_subparsers),
            (self.cli.bi_parser, OrderedDict()),
            (self.cli.ib_parser, OrderedDict()),
        ]))
        with open(self.output, 'w') as f:
            f.write(m)
Ejemplo n.º 2
0
class ManPageGenerator(object):
    def __init__(self):
        self.cli = CLI()
        self.cli.set_arguments()
        self.output = "atomic-reactor.%d" % MANPAGE_SECTION
        self.today = datetime.date.today()

    def run(self):
        mpf = ManPageFormatter(PROG,
                               desc=DESCRIPTION,
                               ext_sections={
                                   "authors": MANPAGE_AUTHORS,
                               })

        build_subparsers = OrderedDict(
            sorted([(p, OrderedDict())
                    for p in self.cli.source_types_parsers.values()],
                   key=lambda p: p[0].prog))
        m = mpf.format_man_page(main_parser=self.cli.parser,
                                subparsers=OrderedDict([
                                    (self.cli.build_parser, build_subparsers),
                                    (self.cli.bi_parser, OrderedDict()),
                                    (self.cli.ib_parser, OrderedDict()),
                                ]))
        with open(self.output, 'w') as f:
            f.write(m)
Ejemplo n.º 3
0
 def __init__(self):
     self.cli = CLI()
     self.cli.set_arguments()
     self.output = "atomic-reactor.%d" % MANPAGE_SECTION
     self.today = datetime.date.today()
Ejemplo n.º 4
0
 def __init__(self):
     self.cli = CLI()
     self.cli.set_arguments()
     self.output = "atomic-reactor.%d" % MANPAGE_SECTION
     self.today = datetime.date.today()