91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

資源簡(jiǎn)介

直接解壓unitypackage文件, 無需安裝unity工具, 運(yùn)行需要python環(huán)境, 來自 github.com/gered/extractunitypackage, 用法: extractunitypackage.py input_file [output_path]

資源截圖

代碼片段和文件信息

#!/usr/bin/env?python
#
#?UnityPackage?Extractor
#
#?Extracts?files/folders?from?a?.unitypackage?file?reading?the?‘pathname‘
#?files?it?contains?to?rebuild?a?“readable“?file/folder?structure.
#
#?Usage:?extractunitypackage.py?input_file?[output_path]
#
#?“input_file“?should?be?a?.unitypackage?file.?The?part?of?the?filename
#?before?the?extension?will?be?used?as?the?name?of?the?directory?that?the?
#?packages?contents?will?be?extracted?to.
#
#?“output_path“?is?an?optional?path?where?the?package‘s?files?will?be
#?extracted?to.?If?omitted?the?current?working?directory?is?used.?If
#?specified?the?path?should?already?exist.

#?Update?(by?Entwicklerpages):?Simple?fixes?for?python3?support.?Now?works?on?both?versions.

import?os
import?stat
import?shutil
import?sys
import?tarfile

if?len(sys.argv)? print?(‘No?input?file?specified.‘)
sys.exit()

name?extension?=?os.path.splitext(sys.argv[1])

outputDir?=?‘‘
if?len(sys.argv)?>?2:
outputDir?=?os.path.join(sys.argv[2]?name)
else:
outputDir?=?‘./‘?+?name
workingDir?=?‘./.working‘

#?can‘t?proceed?if?the?output?dir?exists?already
#?but?if?the?temp?working?dir?exists?we?clean?it?out?before?extracting
if?os.path.exists(outputDir):
print?(‘Output?dir?“‘?+?outputDir?+?‘“?exists.?Aborting.‘)
sys.exit();
if?os.path.exists(workingDir):
shutil.rmtree(workingDir)

#?extract?.unitypackage?contents?to?a?temporary?space
tar?=?tarfile.open(sys.argv[1]?‘r:gz‘)
tar.extractall(workingDir);
tar.close()

#?build?association?between?the?unitypackage‘s?root?directory?names
#?(which?each?have?1?asset?in?them)?to?the?actual?filename?(stored?in?the?‘pathname‘?file)
mapping?=?{}
for?i?in?os.listdir(workingDir):
ro

評(píng)論

共有 條評(píng)論