diff options
| -rw-r--r--[-rwxr-xr-x] | cli.py | 5 | ||||
| -rw-r--r-- | lib/parser.py | 7 |
2 files changed, 7 insertions, 5 deletions
| @@ -4,7 +4,7 @@ | |||
| 4 | ''' | 4 | ''' |
| 5 | 5 | ||
| 6 | import sys | 6 | import sys |
| 7 | import lib.mat | 7 | from lib import mat |
| 8 | import optparse | 8 | import optparse |
| 9 | 9 | ||
| 10 | __version__ = '0.1' | 10 | __version__ = '0.1' |
| @@ -37,8 +37,7 @@ def list_meta(class_file, filename): | |||
| 37 | Print all the meta of 'filename' on stdout | 37 | Print all the meta of 'filename' on stdout |
| 38 | ''' | 38 | ''' |
| 39 | print('[+] File %s :' % filename) | 39 | print('[+] File %s :' % filename) |
| 40 | for key, item in class_file.get_meta().iteritems(): | 40 | print "\n".join([field for field in class_file.get_meta()]) |
| 41 | print('\t%s : %s' % (key, item) ) | ||
| 42 | 41 | ||
| 43 | def is_clean(class_file, filename): | 42 | def is_clean(class_file, filename): |
| 44 | ''' | 43 | ''' |
diff --git a/lib/parser.py b/lib/parser.py index 828648f..7912b29 100644 --- a/lib/parser.py +++ b/lib/parser.py | |||
| @@ -68,8 +68,11 @@ class Generic_parser(): | |||
| 68 | ''' | 68 | ''' |
| 69 | return a dict with all the meta of the file | 69 | return a dict with all the meta of the file |
| 70 | ''' | 70 | ''' |
| 71 | #am I useless ? | 71 | metadata = [] |
| 72 | return self.meta | 72 | for field in self.editor: |
| 73 | if self._should_remove(field): | ||
| 74 | metadata.append(field.name) | ||
| 75 | return metadata | ||
| 73 | 76 | ||
| 74 | def _should_remove(self, key): | 77 | def _should_remove(self, key): |
| 75 | ''' | 78 | ''' |
