mirror of
https://github.com/dbarzin/pandora-box.git
synced 2025-07-19 21:39:40 +02:00
27 lines
455 B
Python
27 lines
455 B
Python
|
#!/usr/bin/python3
|
||
|
|
||
|
import pypandora
|
||
|
import time
|
||
|
import sys
|
||
|
|
||
|
pp = pypandora.PyPandora(root_url= 'http://127.0.0.1:6100')
|
||
|
|
||
|
for arg in sys.argv[1:]:
|
||
|
print(arg,end='',flush=True)
|
||
|
print(":",end='',flush=True)
|
||
|
|
||
|
res = pp.submit_from_disk(arg)
|
||
|
|
||
|
while True:
|
||
|
print('.',end='',flush=True)
|
||
|
time.sleep(1)
|
||
|
|
||
|
res = pp.task_status(res['taskId'])
|
||
|
|
||
|
if res['status']!='WAITING':
|
||
|
break
|
||
|
|
||
|
print(res['status'])
|
||
|
|
||
|
|