add -c cmd-opt

This commit is contained in:
Christopher Roy Bratusek 2012-11-19 23:14:00 +01:00
parent 75e5be13c7
commit c7f6e18b53

View File

@ -37,6 +37,8 @@ def main():
help='IOS <IOS> <Version> <Output> <DeCrypt> <Pack>')
parser.add_option('-g', "--getversions", dest="getversions",
action="store_true", default=False, help="get available versions for IOS")
parser.add_option('-c', "--convert", dest="convert",
action="store_true", default=False, help="convert between IOSX and xxxxxxx-xxxxxxx")
parser.add_option("-v", "--version", dest="version",
action="store_true", default=False, help="print version and exit")
@ -65,6 +67,16 @@ def main():
print "Available Versions for %s: %s" % (str(args[0]), IOSdict[str(xarg)])
sys.exit(0)
if options.convert:
if "IOS" in str(args[0]):
print "%s == %s" % (str(args[0]), TitleDict[str(args[0])])
else:
NewDict = swap_dic(TitleDict)
xarg = NewDict[str(args[0])]
print "%s == %s" % (str(args[0]), xarg)
sys.exit(0)
os.chdir(os.getenv("HOME"))
translator = QTranslator()
translator.load(QString("i18n/Qwad_%1").arg(QLocale.system().name()))