2012-11-06 12:56:30 -08:00
|
|
|
"""
|
|
|
|
CLI options class for comictagger app
|
|
|
|
"""
|
|
|
|
|
|
|
|
"""
|
|
|
|
Copyright 2012 Anthony Beville
|
|
|
|
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
you may not use this file except in compliance with the License.
|
|
|
|
You may obtain a copy of the License at
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
limitations under the License.
|
|
|
|
"""
|
|
|
|
|
2012-11-02 13:54:17 -07:00
|
|
|
import sys
|
|
|
|
import getopt
|
2012-11-14 17:25:01 -08:00
|
|
|
import platform
|
2012-11-18 17:01:17 -08:00
|
|
|
import os
|
2013-02-14 17:00:59 -08:00
|
|
|
import traceback
|
2012-12-08 11:57:51 -08:00
|
|
|
import ctversion
|
2013-02-11 09:29:08 -08:00
|
|
|
import utils
|
2012-11-19 11:57:16 -08:00
|
|
|
from genericmetadata import GenericMetadata
|
2013-02-13 13:54:07 -08:00
|
|
|
from comicarchive import MetaDataStyle
|
2013-04-06 12:30:01 -07:00
|
|
|
from versionchecker import VersionChecker
|
2012-11-02 13:54:17 -07:00
|
|
|
|
|
|
|
class Options:
|
2012-11-18 17:01:17 -08:00
|
|
|
help_text = """
|
2012-11-29 18:14:06 -08:00
|
|
|
Usage: {0} [OPTION]... [FILE LIST]
|
2012-11-18 17:01:17 -08:00
|
|
|
|
2012-11-27 15:20:28 -08:00
|
|
|
A utility for reading and writing metadata to comic archives.
|
2012-11-18 17:01:17 -08:00
|
|
|
|
|
|
|
If no options are given, {0} will run in windowed mode
|
|
|
|
|
|
|
|
-p, --print Print out tag info from file. Specify type
|
|
|
|
(via -t) to get only info of that tag type
|
2012-11-19 16:04:20 -08:00
|
|
|
--raw With -p, will print out the raw tag block(s)
|
|
|
|
from the file
|
2012-11-18 17:01:17 -08:00
|
|
|
-d, --delete Deletes the tag block of specified type (via -t)
|
2012-12-05 11:28:16 -08:00
|
|
|
-c, --copy=SOURCE Copy the specified source tag block to destination style
|
2012-12-05 14:15:06 -08:00
|
|
|
specified via via -t (potentially lossy operation)
|
2012-11-18 17:01:17 -08:00
|
|
|
-s, --save Save out tags as specified type (via -t)
|
|
|
|
Must specify also at least -o, -p, or -m
|
2012-12-08 11:57:51 -08:00
|
|
|
--nooverwrite Don't modify tag block if it already exists ( relevent for -s or -c )
|
2013-04-11 23:11:25 -07:00
|
|
|
-1, --assume-issue-one Assume issue number is 1 if not found ( relevent for -s )
|
2012-11-18 17:01:17 -08:00
|
|
|
-n, --dryrun Don't actually modify file (only relevent for -d, -s, or -r)
|
2012-12-02 12:17:39 -08:00
|
|
|
-t, --type=TYPE Specify TYPE as either "CR", "CBL", or "COMET" (as either
|
|
|
|
ComicRack, ComicBookLover, or CoMet style tags, respectivly)
|
2012-11-18 17:01:17 -08:00
|
|
|
-f, --parsefilename Parse the filename to get some info, specifically
|
|
|
|
series name, issue number, volume, and publication
|
|
|
|
year
|
2012-12-05 20:46:01 -08:00
|
|
|
-i, --interactive Interactively query the user when there are multiple matches for
|
|
|
|
an online search
|
|
|
|
--nosummary Suppress the default summary after a save operation
|
2012-11-18 17:01:17 -08:00
|
|
|
-o, --online Search online and attempt to identify file using
|
|
|
|
existing metadata and images in archive. May be used
|
2012-11-18 19:55:40 -08:00
|
|
|
in conjuntion with -f and -m
|
2013-01-11 17:48:34 -08:00
|
|
|
--id=ID Use the issue ID when searching online. Overrides all other metadata
|
2012-11-19 11:57:16 -08:00
|
|
|
-m, --metadata=LIST Explicity define, as a list, some tags to be used
|
|
|
|
e.g. "series=Plastic Man , publisher=Quality Comics"
|
|
|
|
"series=Kickers^, Inc., issue=1, year=1986"
|
|
|
|
Name-Value pairs are comma separated. Use a "^" to
|
2012-11-27 11:37:20 -08:00
|
|
|
escape an "=" or a ",", as shown in the example above
|
2012-11-19 11:57:16 -08:00
|
|
|
Some names that can be used:
|
|
|
|
series, issue, issueCount, year, publisher, title
|
2012-11-27 10:55:31 -08:00
|
|
|
-r, --rename Rename the file based on specified tag style.
|
2013-02-05 16:14:37 -08:00
|
|
|
--noabort Don't abort save operation when online match is of low confidence
|
|
|
|
-e, --export-to-zip Export RAR archive to Zip format
|
|
|
|
--delete-rar Delete original RAR archive after successful export to Zip
|
|
|
|
--abort-on-conflict Don't export to zip if intended new filename exists (Otherwise, creates
|
2013-02-13 22:30:53 -08:00
|
|
|
a new unique filename)
|
|
|
|
-S, --script=FILE Run an "add-on" python script that uses the comictagger library for custom
|
|
|
|
processing. Script arguments can follow the script name
|
2013-02-11 09:29:08 -08:00
|
|
|
-R, --recursive Recursively include files in sub-folders
|
2012-11-18 17:01:17 -08:00
|
|
|
-v, --verbose Be noisy when doing what it does
|
2012-12-03 21:27:32 -08:00
|
|
|
--terse Don't say much (for print mode)
|
2012-12-08 11:57:51 -08:00
|
|
|
--version Display version
|
2013-02-07 13:34:00 -08:00
|
|
|
-h, --help Display this message
|
|
|
|
|
|
|
|
For more help visit the wiki at: http://code.google.com/p/comictagger/
|
2013-02-05 16:14:37 -08:00
|
|
|
"""
|
2012-11-18 17:01:17 -08:00
|
|
|
|
2012-11-02 13:54:17 -07:00
|
|
|
|
|
|
|
def __init__(self):
|
2012-11-18 17:01:17 -08:00
|
|
|
self.data_style = None
|
2012-11-02 13:54:17 -07:00
|
|
|
self.no_gui = False
|
2012-11-18 17:01:17 -08:00
|
|
|
self.filename = None
|
|
|
|
self.verbose = False
|
2012-12-03 21:27:32 -08:00
|
|
|
self.terse = False
|
2012-11-18 19:55:40 -08:00
|
|
|
self.metadata = None
|
2012-11-18 17:01:17 -08:00
|
|
|
self.print_tags = False
|
2012-12-05 11:28:16 -08:00
|
|
|
self.copy_tags = False
|
2012-11-18 17:01:17 -08:00
|
|
|
self.delete_tags = False
|
2013-02-05 16:14:37 -08:00
|
|
|
self.export_to_zip = False
|
|
|
|
self.abort_export_on_conflict = False
|
|
|
|
self.delete_rar_after_export = False
|
2012-11-18 17:01:17 -08:00
|
|
|
self.search_online = False
|
2012-11-18 19:55:40 -08:00
|
|
|
self.dryrun = False
|
2012-11-29 19:21:05 -08:00
|
|
|
self.abortOnLowConfidence = True
|
2012-11-18 17:01:17 -08:00
|
|
|
self.save_tags = False
|
|
|
|
self.parse_filename = False
|
2012-12-05 20:46:01 -08:00
|
|
|
self.show_save_summary = True
|
2012-11-19 12:28:19 -08:00
|
|
|
self.raw = False
|
2012-11-18 17:01:17 -08:00
|
|
|
self.rename_file = False
|
2012-12-05 11:28:16 -08:00
|
|
|
self.no_overwrite = False
|
2012-12-05 20:46:01 -08:00
|
|
|
self.interactive = False
|
2013-01-11 17:48:34 -08:00
|
|
|
self.issue_id = None
|
2013-02-11 09:29:08 -08:00
|
|
|
self.recursive = False
|
2013-02-13 13:54:07 -08:00
|
|
|
self.run_script = False
|
|
|
|
self.script = None
|
2013-04-11 23:11:25 -07:00
|
|
|
self.assume_issue_is_one_if_not_set = False
|
2012-11-18 21:15:16 -08:00
|
|
|
self.file_list = []
|
2012-11-18 17:01:17 -08:00
|
|
|
|
2012-12-18 21:05:51 -08:00
|
|
|
def display_msg_and_quit( self, msg, code, show_help=False ):
|
2012-11-18 17:01:17 -08:00
|
|
|
appname = os.path.basename(sys.argv[0])
|
|
|
|
if msg is not None:
|
|
|
|
print( msg )
|
2012-12-18 21:05:51 -08:00
|
|
|
if show_help:
|
|
|
|
print self.help_text.format(appname)
|
|
|
|
else:
|
|
|
|
print "For more help, run with '--help'"
|
2012-11-18 17:01:17 -08:00
|
|
|
sys.exit(code)
|
2012-11-18 19:55:40 -08:00
|
|
|
|
|
|
|
def parseMetadataFromString( self, mdstr ):
|
2012-11-19 11:57:16 -08:00
|
|
|
# The metadata string is a comma separated list of name-value pairs
|
|
|
|
# The names match the attributes of the internal metadata struct (for now)
|
|
|
|
# The caret is the special "escape character", since it's not common in
|
|
|
|
# natural language text
|
|
|
|
|
|
|
|
# example = "series=Kickers^, Inc. ,issue=1, year=1986"
|
|
|
|
|
|
|
|
escaped_comma = "^,"
|
|
|
|
escaped_equals = "^="
|
|
|
|
replacement_token = "<_~_>"
|
|
|
|
|
|
|
|
md = GenericMetadata()
|
|
|
|
|
|
|
|
# First, replace escaped commas with with a unique token (to be changed back later)
|
|
|
|
mdstr = mdstr.replace( escaped_comma, replacement_token)
|
|
|
|
tmp_list = mdstr.split(",")
|
|
|
|
md_list = []
|
|
|
|
for item in tmp_list:
|
|
|
|
item = item.replace( replacement_token, "," )
|
|
|
|
md_list.append(item)
|
|
|
|
|
|
|
|
# Now build a nice dict from the list
|
|
|
|
md_dict = dict()
|
|
|
|
for item in md_list:
|
|
|
|
# Make sure to fix any escaped equal signs
|
|
|
|
i = item.replace( escaped_equals, replacement_token)
|
|
|
|
key,value = i.split("=")
|
|
|
|
value = value.replace( replacement_token, "=" ).strip()
|
|
|
|
key = key.strip()
|
2012-11-25 20:09:11 -08:00
|
|
|
if key.lower() == "credit":
|
|
|
|
cred_attribs = value.split(":")
|
|
|
|
role = cred_attribs[0]
|
|
|
|
person = ( cred_attribs[1] if len( cred_attribs ) > 1 else "" )
|
|
|
|
primary = (cred_attribs[2] if len( cred_attribs ) > 2 else None )
|
|
|
|
md.addCredit( person.strip(), role.strip(), True if primary is not None else False )
|
|
|
|
else:
|
|
|
|
md_dict[key] = value
|
2012-11-19 11:57:16 -08:00
|
|
|
|
|
|
|
# Map the dict to the metadata object
|
|
|
|
for key in md_dict:
|
|
|
|
if not hasattr(md, key):
|
|
|
|
print "Warning: '{0}' is not a valid tag name".format(key)
|
|
|
|
else:
|
|
|
|
md.isEmpty = False
|
|
|
|
setattr( md, key, md_dict[key] )
|
|
|
|
#print md
|
|
|
|
return md
|
2012-11-02 13:54:17 -07:00
|
|
|
|
2012-11-13 13:25:15 -08:00
|
|
|
def parseCmdLineArgs(self):
|
2012-11-27 15:20:28 -08:00
|
|
|
|
|
|
|
if platform.system() == "Darwin" and hasattr(sys, "frozen") and sys.frozen == 1:
|
|
|
|
# remove the PSN ("process serial number") argument from OS/X
|
|
|
|
input_args = [a for a in sys.argv[1:] if "-psn_0_" not in a ]
|
|
|
|
else:
|
|
|
|
input_args = sys.argv[1:]
|
2012-11-13 13:25:15 -08:00
|
|
|
|
2012-11-02 13:54:17 -07:00
|
|
|
# parse command line options
|
|
|
|
try:
|
2012-11-27 15:20:28 -08:00
|
|
|
opts, args = getopt.getopt( input_args,
|
2013-04-11 23:11:25 -07:00
|
|
|
"hpdt:fm:vonsrc:ieRS:1",
|
2012-12-05 11:28:16 -08:00
|
|
|
[ "help", "print", "delete", "type=", "copy=", "parsefilename", "metadata=", "verbose",
|
2012-12-05 20:46:01 -08:00
|
|
|
"online", "dryrun", "save", "rename" , "raw", "noabort", "terse", "nooverwrite",
|
2013-02-13 13:54:07 -08:00
|
|
|
"interactive", "nosummary", "version", "id=" , "recursive", "script=",
|
2013-04-11 23:11:25 -07:00
|
|
|
"export-to-zip", "delete-rar", "abort-on-conflict", "assume-issue-one" ] )
|
2013-02-05 16:14:37 -08:00
|
|
|
|
2012-11-18 17:01:17 -08:00
|
|
|
except getopt.GetoptError as err:
|
2012-12-18 21:05:51 -08:00
|
|
|
self.display_msg_and_quit( str(err), 2 )
|
2013-02-05 16:14:37 -08:00
|
|
|
|
2012-11-02 13:54:17 -07:00
|
|
|
# process options
|
|
|
|
for o, a in opts:
|
|
|
|
if o in ("-h", "--help"):
|
2012-12-18 21:05:51 -08:00
|
|
|
self.display_msg_and_quit( None, 0, show_help=True )
|
2012-11-02 13:54:17 -07:00
|
|
|
if o in ("-v", "--verbose"):
|
2012-11-18 17:01:17 -08:00
|
|
|
self.verbose = True
|
2013-02-13 13:54:07 -08:00
|
|
|
if o in ("-S", "--script"):
|
|
|
|
self.run_script = True
|
|
|
|
self.script = a
|
2013-02-11 09:29:08 -08:00
|
|
|
if o in ("-R", "--recursive"):
|
|
|
|
self.recursive = True
|
2012-11-18 17:01:17 -08:00
|
|
|
if o in ("-p", "--print"):
|
|
|
|
self.print_tags = True
|
|
|
|
if o in ("-d", "--delete"):
|
|
|
|
self.delete_tags = True
|
2012-12-05 20:46:01 -08:00
|
|
|
if o in ("-i", "--interactive"):
|
|
|
|
self.interactive = True
|
2012-12-05 11:28:16 -08:00
|
|
|
if o in ("-c", "--copy"):
|
|
|
|
self.copy_tags = True
|
|
|
|
if a.lower() == "cr":
|
|
|
|
self.copy_source = MetaDataStyle.CIX
|
|
|
|
elif a.lower() == "cbl":
|
|
|
|
self.copy_source = MetaDataStyle.CBI
|
|
|
|
elif a.lower() == "comet":
|
|
|
|
self.copy_source = MetaDataStyle.COMET
|
|
|
|
else:
|
2012-12-18 21:05:51 -08:00
|
|
|
self.display_msg_and_quit( "Invalid copy tag source type", 1 )
|
2012-11-18 17:01:17 -08:00
|
|
|
if o in ("-o", "--online"):
|
|
|
|
self.search_online = True
|
|
|
|
if o in ("-n", "--dryrun"):
|
|
|
|
self.dryrun = True
|
|
|
|
if o in ("-m", "--metadata"):
|
2012-11-18 19:55:40 -08:00
|
|
|
self.metadata = self.parseMetadataFromString(a)
|
2012-11-18 17:01:17 -08:00
|
|
|
if o in ("-s", "--save"):
|
|
|
|
self.save_tags = True
|
|
|
|
if o in ("-r", "--rename"):
|
|
|
|
self.rename_file = True
|
2013-02-05 16:14:37 -08:00
|
|
|
if o in ("-e", "--export_to_zip"):
|
|
|
|
self.export_to_zip = True
|
|
|
|
if o == "--delete-rar":
|
|
|
|
self.delete_rar_after_export = True
|
|
|
|
if o == "--abort-on-conflict":
|
|
|
|
self.abort_export_on_conflict = True
|
2012-11-18 17:01:17 -08:00
|
|
|
if o in ("-f", "--parsefilename"):
|
|
|
|
self.parse_filename = True
|
2013-01-11 17:48:34 -08:00
|
|
|
if o == "--id":
|
|
|
|
self.issue_id = a
|
2012-12-05 14:15:06 -08:00
|
|
|
if o == "--raw":
|
2012-11-19 12:28:19 -08:00
|
|
|
self.raw = True
|
2012-12-05 14:15:06 -08:00
|
|
|
if o == "--noabort":
|
2012-11-29 19:21:05 -08:00
|
|
|
self.abortOnLowConfidence = False
|
2012-12-05 14:15:06 -08:00
|
|
|
if o == "--terse":
|
2012-12-03 21:27:32 -08:00
|
|
|
self.terse = True
|
2012-12-05 20:46:01 -08:00
|
|
|
if o == "--nosummary":
|
|
|
|
self.show_save_summary = False
|
2013-04-11 23:11:25 -07:00
|
|
|
if o in ("-1", "--assume-issue-one"):
|
|
|
|
self.assume_issue_is_one_if_not_set = True
|
2012-12-05 14:15:06 -08:00
|
|
|
if o == "--nooverwrite":
|
2012-12-05 11:28:16 -08:00
|
|
|
self.no_overwrite = True
|
2012-12-08 11:57:51 -08:00
|
|
|
if o == "--version":
|
2013-01-28 12:58:26 -08:00
|
|
|
print "ComicTagger {0}: Copyright (c) 2012-2013 Anthony Beville".format(ctversion.version)
|
2013-04-05 12:48:49 -07:00
|
|
|
print "Distributed under Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)"
|
2013-04-06 12:30:01 -07:00
|
|
|
new_version = VersionChecker().getLatestVersion("", False)
|
2013-04-05 12:48:49 -07:00
|
|
|
if new_version is not None:
|
|
|
|
print "----------------------------------------"
|
|
|
|
print "New version available online: {0}".format(new_version)
|
|
|
|
print "----------------------------------------"
|
2012-12-12 15:23:32 -08:00
|
|
|
sys.exit(0)
|
2012-11-02 13:54:17 -07:00
|
|
|
if o in ("-t", "--type"):
|
2012-11-18 17:01:17 -08:00
|
|
|
if a.lower() == "cr":
|
2012-11-02 13:54:17 -07:00
|
|
|
self.data_style = MetaDataStyle.CIX
|
2012-11-18 17:01:17 -08:00
|
|
|
elif a.lower() == "cbl":
|
2012-11-02 13:54:17 -07:00
|
|
|
self.data_style = MetaDataStyle.CBI
|
2012-12-02 12:17:39 -08:00
|
|
|
elif a.lower() == "comet":
|
|
|
|
self.data_style = MetaDataStyle.COMET
|
2012-11-02 13:54:17 -07:00
|
|
|
else:
|
2012-12-18 21:05:51 -08:00
|
|
|
self.display_msg_and_quit( "Invalid tag type", 1 )
|
2013-02-13 13:54:07 -08:00
|
|
|
|
2013-02-05 16:14:37 -08:00
|
|
|
if self.print_tags or self.delete_tags or self.save_tags or self.copy_tags or self.rename_file or self.export_to_zip:
|
2012-11-18 17:01:17 -08:00
|
|
|
self.no_gui = True
|
|
|
|
|
|
|
|
count = 0
|
2013-02-13 13:54:07 -08:00
|
|
|
if self.run_script: count += 1
|
2012-11-18 17:01:17 -08:00
|
|
|
if self.print_tags: count += 1
|
|
|
|
if self.delete_tags: count += 1
|
|
|
|
if self.save_tags: count += 1
|
2012-12-05 11:28:16 -08:00
|
|
|
if self.copy_tags: count += 1
|
2012-11-18 17:01:17 -08:00
|
|
|
if self.rename_file: count += 1
|
2013-02-05 16:14:37 -08:00
|
|
|
if self.export_to_zip: count +=1
|
2012-11-18 17:01:17 -08:00
|
|
|
|
|
|
|
if count > 1:
|
2013-02-13 13:54:07 -08:00
|
|
|
self.display_msg_and_quit( "Must choose only one action of print, delete, save, copy, rename, export, or run script", 1 )
|
|
|
|
|
|
|
|
if self.script is not None:
|
|
|
|
# we were given a script. special case for the args:
|
|
|
|
# 1. ignore everthing before the -S,
|
|
|
|
# 2. pass all the ones that follow (including script name) to the script
|
|
|
|
script_args = list()
|
|
|
|
for idx, arg in enumerate(sys.argv):
|
|
|
|
if arg in [ '-S', '--script']:
|
|
|
|
#found script!
|
|
|
|
script_args = sys.argv[idx+1:]
|
|
|
|
break
|
|
|
|
sys.argv = script_args
|
|
|
|
if not os.path.exists(self.script):
|
|
|
|
print "Can't find {0}".format( self.script )
|
|
|
|
else:
|
|
|
|
# I *think* this makes sense:
|
|
|
|
# assume the base name of the file is the module name
|
|
|
|
# add the folder of the given file to the python path
|
|
|
|
# import module
|
|
|
|
dirname = os.path.dirname(self.script)
|
|
|
|
module_name = os.path.splitext(os.path.basename(self.script))[0]
|
|
|
|
sys.path = [dirname] + sys.path
|
2013-02-14 17:00:59 -08:00
|
|
|
try:
|
|
|
|
script = __import__(module_name)
|
2013-02-13 13:54:07 -08:00
|
|
|
|
2013-02-14 17:00:59 -08:00
|
|
|
# Determine if the entry point exists before trying to run it
|
|
|
|
if "main" in dir(script):
|
2013-02-14 16:25:06 -08:00
|
|
|
script.main()
|
2013-02-14 17:00:59 -08:00
|
|
|
else:
|
|
|
|
print "Can't find entry point \"main()\" in module \"{0}\"".format( module_name )
|
|
|
|
except Exception as e:
|
|
|
|
print "Script raised an unhandled exception: ", e
|
|
|
|
print traceback.format_exc()
|
|
|
|
|
2013-02-13 13:54:07 -08:00
|
|
|
sys.exit(0)
|
2012-11-18 17:01:17 -08:00
|
|
|
|
|
|
|
if len(args) > 0:
|
2012-12-10 12:16:17 -08:00
|
|
|
if platform.system() == "Windows":
|
|
|
|
# no globbing on windows shell, so do it for them
|
|
|
|
import glob
|
|
|
|
self.file_list = []
|
|
|
|
for item in args:
|
|
|
|
self.file_list.extend(glob.glob(item))
|
2013-02-11 20:52:51 -08:00
|
|
|
if len(self.file_list) > 0:
|
|
|
|
self.filename = self.file_list[0]
|
2012-12-10 12:16:17 -08:00
|
|
|
else:
|
|
|
|
self.filename = args[0]
|
|
|
|
self.file_list = args
|
2012-11-18 17:01:17 -08:00
|
|
|
|
|
|
|
if self.no_gui and self.filename is None:
|
2013-02-05 16:14:37 -08:00
|
|
|
self.display_msg_and_quit( "Command requires at least one filename!", 1 )
|
2012-11-18 17:01:17 -08:00
|
|
|
|
|
|
|
if self.delete_tags and self.data_style is None:
|
2012-12-18 21:05:51 -08:00
|
|
|
self.display_msg_and_quit( "Please specify the type to delete with -t", 1 )
|
2012-11-14 17:25:01 -08:00
|
|
|
|
2012-11-18 17:01:17 -08:00
|
|
|
if self.save_tags and self.data_style is None:
|
2012-12-18 21:05:51 -08:00
|
|
|
self.display_msg_and_quit( "Please specify the type to save with -t", 1 )
|
2012-12-05 11:28:16 -08:00
|
|
|
|
|
|
|
if self.copy_tags and self.data_style is None:
|
2012-12-18 21:05:51 -08:00
|
|
|
self.display_msg_and_quit( "Please specify the type to copy to with -t", 1 )
|
2012-11-18 17:01:17 -08:00
|
|
|
|
2012-12-03 17:16:58 -08:00
|
|
|
#if self.rename_file and self.data_style is None:
|
2012-12-18 21:05:51 -08:00
|
|
|
# self.display_msg_and_quit( "Please specify the type to use for renaming with -t", 1 )
|
2012-11-18 17:01:17 -08:00
|
|
|
|
2013-02-11 09:29:08 -08:00
|
|
|
if self.recursive:
|
|
|
|
self.file_list = utils.get_recursive_filelist( self.file_list )
|