Example #1
0
    info = args.info
    debug = args.debug
    parallel = args.parallel

    if file != None and info != False:
        info_filepath = os.path.abspath(file)
        print "Not implemented yet."
            
    elif file != None:      
        extension = os.path.splitext(file)[1][1:].strip()
        pak_filepath = os.path.abspath(file)
        
        print "Unpacking %s" % pak_filepath
        
        if extension == "pak":
            pak_file = PAK_file(filepath=pak_filepath, encrypted=False)
        elif extension == "crypt":
            pak_file = PAK_file(filepath=pak_filepath, encrypted=True)
        else:
            print "File not pak or pak.crypt" 

        output_filepath = os.path.abspath('.')
        if outdir != None:
            output_filepath = os.path.abspath(outdir)    
        pak_file.dump(dest_filepath=output_filepath, verbose=debug, parallel=parallel)
                
    else:
        print "Nothing happened"
        parser.print_help()
            
Example #2
0
    info = args.info
    debug = args.debug
    parallel = args.parallel

    if file != None and info != False:
        info_filepath = os.path.abspath(file)
        print "Not implemented yet."

    elif file != None:
        extension = os.path.splitext(file)[1][1:].strip()
        pak_filepath = os.path.abspath(file)

        print "Unpacking %s" % pak_filepath

        if extension == "pak":
            pak_file = PAK_file(filepath=pak_filepath, encrypted=False)
        elif extension == "crypt":
            pak_file = PAK_file(filepath=pak_filepath, encrypted=True)
        else:
            print "File not pak or pak.crypt"

        output_filepath = os.path.abspath('.')
        if outdir != None:
            output_filepath = os.path.abspath(outdir)
        pak_file.dump(dest_filepath=output_filepath,
                      verbose=debug,
                      parallel=parallel)

    else:
        print "Nothing happened"
        parser.print_help()