Chromium Code Reviews| Index: native_client_sdk/src/doc/doxygen/doxy_cleanup.py |
| diff --git a/native_client_sdk/src/doc/doxygen/doxy_cleanup.py b/native_client_sdk/src/doc/doxygen/doxy_cleanup.py |
| index 491fd047109cd921e33a57fdc24882a13cdd16fe..d47afb8bc686af7b2692a28992e5f3e1353337f7 100755 |
| --- a/native_client_sdk/src/doc/doxygen/doxy_cleanup.py |
| +++ b/native_client_sdk/src/doc/doxygen/doxy_cleanup.py |
| @@ -9,7 +9,7 @@ that they are suitable for publication on a Google documentation site. |
| ''' |
| import glob |
| -import optparse |
| +import argparse |
|
binji
2014/11/13 23:57:02
sort
Sam Clegg
2014/11/30 17:55:12
Done.
|
| import os |
| import re |
| import shutil |
| @@ -154,18 +154,17 @@ def main(argv): |
| doxy_cleanup cleans up the html files generated by doxygen. |
| """ |
| - parser = optparse.OptionParser(usage='Usage: %prog [options] directory') |
| - parser.add_option('-v', '--verbose', help='verbose output.', |
| - action='store_true') |
| - options, files = parser.parse_args(argv) |
| + parser = argparse.ArgumentParser(usage='Usage: %prog [options] directory') |
|
binji
2014/11/13 23:57:02
remove usage?
Sam Clegg
2014/11/30 17:55:12
Done.
|
| + parser.add_argument('-v', '--verbose', help='verbose output.', |
| + action='store_true') |
| + parser.add_argument('directory') |
| - if len(files) != 1: |
| - parser.error('Expected one directory') |
| + options = parser.parse_args(argv) |
| if options.verbose: |
| Trace.verbose = True |
| - root_dir = files[0] |
| + root_dir = options.directory |
| html_dir = os.path.join(root_dir, 'html') |
| # Doxygen puts all files in an 'html' directory. |