From e163520a130145496ceeeeeb94d950f17e7fd76e Mon Sep 17 00:00:00 2001 From: jvoisin Date: Thu, 23 Jun 2011 19:00:44 +0200 Subject: Implementation of the --backup option, to keep a backup of the treated file (disabled by default) --- lib/mat.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lib/mat.py') diff --git a/lib/mat.py b/lib/mat.py index a9b8e17..6abcd64 100644 --- a/lib/mat.py +++ b/lib/mat.py @@ -14,7 +14,7 @@ import hachoir_editor import images import audio import misc -import archive +#import archive __version__ = "0.1" __author__ = "jvoisin" @@ -24,10 +24,10 @@ strippers = { hachoir_parser.image.PngFile: images.PngStripper, hachoir_parser.audio.MpegAudioFile: audio.MpegAudioStripper, hachoir_parser.misc.PDFDocument: misc.PdfStripper, - hachoir_parser.archive.TarFile: archive.TarStripper, + #hachoir_parser.archive.TarFile: archive.TarStripper, } -def create_class_file(name): +def create_class_file(name, backup): ''' return a $FILETYPEStripper() class, corresponding to the filetype of the given file @@ -57,5 +57,5 @@ def create_class_file(name): print("Don't have stripper for file type: %s" % editor.description) sys.exit(1) if editor.input.__class__ == hachoir_parser.misc.PDFDocument: - return stripper_class(filename) - return stripper_class(realname, filename, parser, editor) + return stripper_class(filename, backup) + return stripper_class(realname, filename, parser, editor, backup) -- cgit v1.3