diff options
| author | jvoisin | 2012-02-15 17:44:45 +0100 |
|---|---|---|
| committer | jvoisin | 2012-02-15 17:44:45 +0100 |
| commit | 58e81584210effde41b8d2bcd5f8ea174f56e668 (patch) | |
| tree | 43edc5f88e8f631a0c227816fc68d71d709c2428 /mat | |
| parent | 4aa486eea5f9b8d3b46c4db9e26e23999d375631 (diff) | |
Now the cli display only locally supported format list
Same as d9f6a5d, but for CLI
Diffstat (limited to 'mat')
| -rwxr-xr-x | mat | 17 |
1 files changed, 10 insertions, 7 deletions
| @@ -11,6 +11,7 @@ import os | |||
| 11 | import hachoir_core | 11 | import hachoir_core |
| 12 | 12 | ||
| 13 | from lib import mat | 13 | from lib import mat |
| 14 | from lib import strippers | ||
| 14 | 15 | ||
| 15 | 16 | ||
| 16 | def parse(): | 17 | def parse(): |
| @@ -108,13 +109,15 @@ def list_supported(): | |||
| 108 | parser.parse(xmlfile) | 109 | parser.parse(xmlfile) |
| 109 | 110 | ||
| 110 | for item in handler.list: | 111 | for item in handler.list: |
| 111 | print('%s (%s)' % (item['name'], item['extension'])) | 112 | if strippers.STRIPPERS.has_key(item['mimetype'].split(',')[0]): |
| 112 | print('\tsupport : ' + item['support']) | 113 | #on display localy supported formats |
| 113 | print('\tmetadata : ' + item['metadata']) | 114 | print 'ok' |
| 114 | print('\tmethod : ' + item['method']) | 115 | print('%s (%s)' % (item['name'], item['extension'])) |
| 115 | if item['support'] == 'partial': | 116 | print('\tsupport : ' + item['support']) |
| 116 | print('\tremaining : ' + item['remaining']) | 117 | print('\tmetadata : ' + item['metadata']) |
| 117 | print('\n') | 118 | print('\tmethod : ' + item['method'] + '\n') |
| 119 | if item['support'] == 'partial': | ||
| 120 | print('\tremaining : ' + item['remaining'] + '\n') | ||
| 118 | sys.exit(0) | 121 | sys.exit(0) |
| 119 | 122 | ||
| 120 | 123 | ||
