~knitzsche/+junk/lp-l10n-stats

« back to all changes in this revision

Viewing changes to ubuntu-translations-stats.py

  • Committer: Kyle Nitzsche
  • Date: 2010-09-28 22:58:03 UTC
  • Revision ID: knitzsche@chroma-20100928225803-kezq804r233b7y1v
move custom cmd line arg definitions below standard args, and add comment 
to separate them.

also, add -n (--custom-name) options. this sets the project name in the 
custom html page 

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
    given distro version."""
46
46
 
47
47
    parser = OptionParser(usage = USAGE, description = DESCRIPTION)
 
48
    parser.add_option("-p",
 
49
                    "--no-priorities",
 
50
                    dest="no_priorities",
 
51
                    action="store_true",
 
52
                    default=False,
 
53
                    help="Disables using priorities to generate blacklist.")
 
54
 
 
55
    parser.add_option("-s",
 
56
                    "--source-package-stats",
 
57
                    dest="pkg_stats",
 
58
                    default='{0}/{1}-package-stats.log.gz'.format(DATA_DIR, settings['distro_codename']),
 
59
                    help="Specify the file containing the source package statistics")
 
60
 
 
61
    parser.add_option("-b",
 
62
                    "--template-blacklist",
 
63
                    dest="blacklist",
 
64
                    default='config/blacklist.conf',
 
65
                    help="Specify the file containing the templates to blacklist during the calculation of statistics")
 
66
# from here down are args for custom options. they all required -c.
 
67
    parser.add_option("-c",
 
68
                    "--custom",
 
69
                    dest="custom",
 
70
                    action="store_true",
 
71
                    default=False,
 
72
                    help="Turn on custom (non-Ubuntu) mode")
48
73
 
49
74
    parser.add_option("-l",
50
75
                    "--languages-file",
52
77
                    default=None,
53
78
                    help="File with languages for report.")
54
79
 
 
80
    parser.add_option("-n",
 
81
                    "--custom-name",
 
82
                    dest="custom_name",
 
83
                    default=None,
 
84
                    help="Name of custom project. Requires -c argument.")
 
85
 
55
86
    parser.add_option("-m",
56
87
                    "--manifest-file",
57
88
                    dest="manifest_file",
69
100
                    dest="root_dir",
70
101
                    default=None,
71
102
                    help="Path to root dir of custom system from which to get domains. Requires -c argument.")
72
 
 
73
 
    parser.add_option("-c",
74
 
                    "--custom",
75
 
                    dest="custom",
76
 
                    action="store_true",
77
 
                    default=False,
78
 
                    help="Turn on custom (non-Ubuntu) mode")
79
 
 
80
103
    parser.add_option("-f",
81
104
                    "--no-file",
82
105
                    dest="no_file",
84
107
                    default=False,
85
108
                    help="Disables using conf file blacklist.")
86
109
 
87
 
    parser.add_option("-p",
88
 
                    "--no-priorities",
89
 
                    dest="no_priorities",
90
 
                    action="store_true",
91
 
                    default=False,
92
 
                    help="Disables using priorities to generate blacklist.")
93
 
 
94
 
    parser.add_option("-s",
95
 
                    "--source-package-stats",
96
 
                    dest="pkg_stats",
97
 
                    default='{0}/{1}-package-stats.log.gz'.format(DATA_DIR, settings['distro_codename']),
98
 
                    help="Specify the file containing the source package statistics")
99
 
 
100
 
    parser.add_option("-b",
101
 
                    "--template-blacklist",
102
 
                    dest="blacklist",
103
 
                    default='config/blacklist.conf',
104
 
                    help="Specify the file containing the templates to blacklist during the calculation of statistics")
105
 
 
106
110
    (options, args) = parser.parse_args()
107
111
 
108
112
    return options, settings