blob: bc87d5965859a5f3c996a8da42c659b8e2674198 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
#!/usr/bin/env python
# Written by Alec Warner <antarus@gentoo.org>
# This code is hereby placed in the public domain.
"""A simple driver file for use_desc_gen."""
import logging
import optparse
import use_desc_gen
def GetOpts():
"""Simple Option Parsing."""
parser = optparse.OptionParser()
parser.add_option('-r', '--repo_path', help=('path to repository from '
'which the documentation will be generated.'))
parser.add_option('-c', '--category_file', help=('path to a category',
'file if repo_path lacks a profile/category file'))
opts, unused_args = parser.parse_args()
if not opts.repo_path:
parser.error('--repo_path is a required option')
logging.error('REPO_PATH is %s' % opts.repo_path)
return (opts, unused_args)
def Main():
"""Main."""
opts, unused_args = GetOpts()
use_desc_gen.FindMetadataFiles(opts.repo_path, opts.category_path)
if __name__ == '__main__':
Main()
|