20 lines
604 B
Python
20 lines
604 B
Python
import os,sys
|
|
from multiprocessing import Process, Pool
|
|
|
|
ScriptLocation = os.path.dirname(os.path.abspath(__file__))
|
|
sys.path.append(ScriptLocation + "/lib")
|
|
|
|
import wgetWrapper
|
|
import imagemagickWrapper
|
|
|
|
imgcrawl = wgetWrapper.wgetWrapper(str(sys.argv[1]))
|
|
imgcrawl.writeHeader()
|
|
|
|
if __name__ == "__main__":
|
|
with Pool(processes=4) as pool:
|
|
pool.map(imgcrawl.execution, range(len(imgcrawl.downloadcommands)))
|
|
imgcrawl.timeLog()
|
|
#converting = imagemagickWrapper.imagemagickWrapper(imgcrawl.resfile)
|
|
#pool.map(converting.execution, range(len(converting.convertCommands)))
|
|
#converting.timeLog()
|
|
|