diff options
| author | jvoisin | 2012-12-27 16:30:52 +0100 |
|---|---|---|
| committer | jvoisin | 2012-12-27 16:30:52 +0100 |
| commit | 4fdf80d7649fe168f16641c48d749819c9c56701 (patch) | |
| tree | 2fe8061e41a8adbb67b0c73c3ba57d9dbe28219a | |
| parent | aa618d2307be108b02611391deafaefea3da1e73 (diff) | |
Add some comments to exiftool.py
| -rw-r--r-- | MAT/exiftool.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/MAT/exiftool.py b/MAT/exiftool.py index eeefcb8..8557a61 100644 --- a/MAT/exiftool.py +++ b/MAT/exiftool.py | |||
| @@ -60,7 +60,10 @@ class ExiftoolStripper(parser.GenericParser): | |||
| 60 | 60 | ||
| 61 | def get_meta(self): | 61 | def get_meta(self): |
| 62 | ''' | 62 | ''' |
| 63 | Return every harmful meta with help of exiftool | 63 | Return every harmful meta with help of exiftool. |
| 64 | Exiftool output looks like this: | ||
| 65 | field name : value | ||
| 66 | field name : value | ||
| 64 | ''' | 67 | ''' |
| 65 | out = subprocess.Popen(['exiftool', self.filename], | 68 | out = subprocess.Popen(['exiftool', self.filename], |
| 66 | stdout=subprocess.PIPE).communicate()[0] | 69 | stdout=subprocess.PIPE).communicate()[0] |
| @@ -69,7 +72,7 @@ class ExiftoolStripper(parser.GenericParser): | |||
| 69 | for i in out[:-1]: | 72 | for i in out[:-1]: |
| 70 | key = i.split(':')[0].strip() | 73 | key = i.split(':')[0].strip() |
| 71 | if key not in self.allowed: | 74 | if key not in self.allowed: |
| 72 | meta[key] = i.split(':')[1].strip() | 75 | meta[key] = i.split(':')[1].strip() # add the field name to the metadata set |
| 73 | return meta | 76 | return meta |
| 74 | 77 | ||
| 75 | 78 | ||
