From d3c275a5c6a4ad8e3604a1b895d1f40316aa07c1 Mon Sep 17 00:00:00 2001 From: "beville@gmail.com" Date: Fri, 9 Nov 2012 21:03:26 +0000 Subject: [PATCH] added command line option to specifiy image hashing algo git-svn-id: http://comictagger.googlecode.com/svn/trunk@20 6c5673fe-1810-88d6-992b-cd32ca31540c --- options.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/options.py b/options.py index 410a26e..4498197 100644 --- a/options.py +++ b/options.py @@ -39,16 +39,16 @@ class Options: self.data_style = MetaDataStyle.CBI self.no_gui = False - # Some defaults for testing - self.series_name = '' #'Watchmen' - self.issue_number = '' #'1' - self.filename = '' # "Watchmen #01.cbz" + self.series_name = '' + self.issue_number = '' + self.filename = '' + self.image_hasher = 1 def parseCmdLineArgs(self): # parse command line options try: - opts, args = getopt.getopt(sys.argv[1:], "cht:s:i:vf:", ["cli", "help", "type=", "series=", "issue=", "verbose", "file" ]) + opts, args = getopt.getopt(sys.argv[1:], "cht:s:i:vf:m:", ["cli", "help", "type=", "series=", "issue=", "verbose", "file", "imagehasher=" ]) except (getopt.error, msg): print( msg ) print( "for help use --help" ) @@ -62,6 +62,8 @@ class Options: print( "Verbose output!" ) if o in ("-c", "--cli"): self.no_gui = True + if o in ("-m", "--imagehasher"): + self.image_hasher = a if o in ("-s", "--series"): self.series_name = a if o in ("-i", "--issue"):