|
|
|
@ -40,7 +40,7 @@ |
|
|
|
# Import Python modules |
|
|
|
import argparse, sys, subprocess, uuid, time, os, glob |
|
|
|
from datetime import datetime as dt, timedelta as td |
|
|
|
from sharedfunctions import getfolderid, callrestapi, getpath, getapplicationproperties |
|
|
|
from sharedfunctions import getfolderid, callrestapi, getpath, getapplicationproperties, get_valid_filename |
|
|
|
|
|
|
|
# get python version |
|
|
|
version=int(str(sys.version_info[0])) |
|
|
|
@ -151,11 +151,7 @@ if areyousure.upper() =='Y': |
|
|
|
path_to_report=path_to_report.replace("/","_") |
|
|
|
|
|
|
|
package_name=str(uuid.uuid1()) |
|
|
|
json_name=path_to_report+resultdata['items'][i]["name"].replace(" ","")+'_'+str(i) |
|
|
|
|
|
|
|
json_name=json_name.replace("(","_") |
|
|
|
json_name=json_name.replace(")","_") |
|
|
|
json_name=json_name.replace(" ","-") |
|
|
|
json_name=get_valid_filename(path_to_report+resultdata['items'][i]["name"].replace(" ","")+'_'+str(i)) |
|
|
|
|
|
|
|
command=clicommand+' transfer export -u /reports/reports/'+id+' --name "'+package_name+'"' |
|
|
|
print(command) |
|
|
|
@ -178,7 +174,7 @@ if areyousure.upper() =='Y': |
|
|
|
remTransferObject.wait() |
|
|
|
|
|
|
|
|
|
|
|
print("NOTE: "+str(reports_exported)+" Viya report(s) exported to json files in "+path) |
|
|
|
print("NOTE: "+str(reports_exported)+" report(s) exported to json files in "+path) |
|
|
|
|
|
|
|
|
|
|
|
else: |
|
|
|
|