diff options
| author | jvoisin | 2013-07-16 23:47:08 +0200 |
|---|---|---|
| committer | jvoisin | 2013-07-16 23:47:08 +0200 |
| commit | fe64b7cd54232210bb74273722b01532133d595d (patch) | |
| tree | 9384d80a20774173419dc199274468ad2aa5d529 | |
| parent | 08a19ff669a356c71d113ddb43562005015f8761 (diff) | |
The cli now supports folders and files !
| -rwxr-xr-x | mat | 8 |
1 files changed, 7 insertions, 1 deletions
| @@ -128,7 +128,13 @@ def main(): | |||
| 128 | else: # clean the file | 128 | else: # clean the file |
| 129 | func = clean_meta | 129 | func = clean_meta |
| 130 | 130 | ||
| 131 | for filename in filenames: | 131 | while filenames: |
| 132 | filename = filenames.pop() | ||
| 133 | if os.path.isdir(filename): | ||
| 134 | for root, sub, files in os.walk(filename): | ||
| 135 | for file in files: | ||
| 136 | filenames.append(os.path.join(root, file)) | ||
| 137 | |||
| 132 | class_file = mat.create_class_file(filename, args.backup, | 138 | class_file = mat.create_class_file(filename, args.backup, |
| 133 | add2archive=args.add2archive, low_pdf_quality=args.low_pdf_quality) | 139 | add2archive=args.add2archive, low_pdf_quality=args.low_pdf_quality) |
| 134 | if class_file: | 140 | if class_file: |
