From b1dab4c844e2fae4909eca47c2b42698d12c55fc Mon Sep 17 00:00:00 2001 From: jvoisin Date: Sat, 18 Jun 2011 02:13:37 +0200 Subject: Hachoir is so ugly : I am able to display meta, but not to remove them (because I didn't manage to find an elegant/efficient way to find the "path" to a field). So I remove a whole "Rootfield" (exif, author, comment, ...). It's efficient, but not very elegant. --- cli.py | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'cli.py') diff --git a/cli.py b/cli.py index b5bea20..bd87409 100755 --- a/cli.py +++ b/cli.py @@ -16,8 +16,6 @@ def parse(): help='List all the meta of a file without removing them') common.add_option('--check', '-c', action='store_true', default=False, help='Check if a file is free of harmfull metadatas') - common.add_option('--harmful', action='store_true', default=False, - help='List all the harmful meta of a file without removing them') common.add_option('--version', action='callback', callback=displayVersion, help='Display version and exit') @@ -42,14 +40,6 @@ def list_meta(class_file, filename): for key, item in class_file.get_meta().iteritems(): print('\t%s : %s' % (key, item) ) -def list_harmful_meta(class_file, filename): - ''' - Print all the harmful meta of 'filename' on stdout - ''' - print('[+] File %s :' % filename) - for key, item in class_file.get_harmful().iteritems(): - print('\t%s : %s' % (key, item) ) - def is_clean(class_file, filename): ''' Say if 'filename' is clean or not @@ -78,8 +68,6 @@ def main(): func = list_meta elif args.check is True: #only check if the file is clean func = is_clean - elif args.harmful is True: #only print harmful metadatas - func = list_harmful_meta else: #clean the file func = clean_meta -- cgit v1.3