diff options
| author | jvoisin | 2011-07-21 21:15:09 +0200 |
|---|---|---|
| committer | jvoisin | 2011-07-21 21:15:09 +0200 |
| commit | bb83090afcd12893c301ef14869e84beda43ccb9 (patch) | |
| tree | c314f6bb95c0e3c50b885f3d95a014e2e8164ee9 /cli.py | |
| parent | 54ca53de5e7df9e0c9bd9e25002386d346010594 (diff) | |
Add the possibility to add (or not) unsupported fileformat to outputed archives fileformat (invasive patch, sorry about that).
Diffstat (limited to 'cli.py')
| -rwxr-xr-x | cli.py | 5 |
1 files changed, 4 insertions, 1 deletions
| @@ -12,6 +12,8 @@ __version__ = '0.1' | |||
| 12 | 12 | ||
| 13 | def parse(): | 13 | def parse(): |
| 14 | parser = optparse.OptionParser(usage='%prog [options] filename') | 14 | parser = optparse.OptionParser(usage='%prog [options] filename') |
| 15 | parser.add_option('--add2archive', '-a', action='store_true', default=False, | ||
| 16 | help='Add to outputed archive non-supported filetypes') | ||
| 15 | parser.add_option('--backup', '-b', action='store_true', default=False, | 17 | parser.add_option('--backup', '-b', action='store_true', default=False, |
| 16 | help='Keep a backup copy') | 18 | help='Keep a backup copy') |
| 17 | parser.add_option('--check', '-c', action='store_true', default=False, | 19 | parser.add_option('--check', '-c', action='store_true', default=False, |
| @@ -91,7 +93,8 @@ def main(): | |||
| 91 | func = clean_meta | 93 | func = clean_meta |
| 92 | 94 | ||
| 93 | for filename in filenames: | 95 | for filename in filenames: |
| 94 | class_file = mat.create_class_file(filename, args.backup) | 96 | class_file = mat.create_class_file(filename, args.backup, |
| 97 | args.add2archive) | ||
| 95 | if class_file is not None: | 98 | if class_file is not None: |
| 96 | func(class_file, filename) | 99 | func(class_file, filename) |
| 97 | 100 | ||
