本文整理汇总了Python中DCC.list_obj_in_coll方法的典型用法代码示例。如果您正苦于以下问题:Python DCC.list_obj_in_coll方法的具体用法?Python DCC.list_obj_in_coll怎么用?Python DCC.list_obj_in_coll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DCC
的用法示例。
在下文中一共展示了DCC.list_obj_in_coll方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: make_cid
# 需要导入模块: import DCC [as 别名]
# 或者: from DCC import list_obj_in_coll [as 别名]
def make_cid(dirpath, CID_coll, htmlfile, outroot):
# Get list of DCC documents from a Word file saved as html
GetUrlWord.get_url_word(dirpath + outroot, dirpath + htmlfile)
# Login to DCC
s = DCC.login(CF.dcc_url + CF.dcc_login)
json_handlelist = dirpath + outroot + 'bothlist.txt'
json_ssdata = dirpath + outroot + 'CID.txt'
get_cid_ssdata(s, json_handlelist, json_ssdata)
xlfile = dirpath + outroot + 'CID_Analysis.xls'
write_spreadsheet(json_ssdata, xlfile)
json_verlist = dirpath + outroot + 'ver_list.txt'
json_doclist = dirpath + outroot + 'doc_list.txt'
make_handle_lists(json_ssdata, json_doclist, json_verlist)
## Remove the files that are currently located in the collection for the CID
if MyUtil.get_yn('Remove location (not delete) of files from ' + CID_coll[0] +'(Y/N)?: '):
doclist = DCC.list_obj_in_coll(s, CID_coll[0],Print=True,Jwrite=False,Depth='infinity',Type='Doc')
for doc in doclist:
DCC.dcc_remove_doc_from_coll(s, doc, CID_coll[0])
## Add CID files to the collection
fh = open(json_doclist, 'r')
dl = json.load(fh)
fh.close()
if MyUtil.get_yn('Add CID files to ' + CID_coll[0] +' (Y/N)?: '):
DCC.add_docs_2_collections(s, dl, CID_coll)
# Check that the expected docs are in the collection
DCC.check_docs_in_coll(s, dl, CID_coll)
示例2: make_cid
# 需要导入模块: import DCC [as 别名]
# 或者: from DCC import list_obj_in_coll [as 别名]
def make_cid(dirpath, CID_coll, htmlfile, outroot):
# Get list of DCC documents from a Word file saved as html
GetUrlWord.get_url_word(dirpath + outroot, dirpath + htmlfile)
# Login to DCC
prod = ['prod', 'production', 'p', ' ']
tes = ['test', 'tes', 't']
checker = False
print("Would you like to log into the production site or the test site?")
print("Valid Inputs are as follows: Production, prod, p, test, t :", end="")
choice = input().lower()
#while loop to continue asking the user for input until a correct input has been entered
while (checker == False):
#Production site login choice
if(choice in prod):
print("You are now logging into the Production version of DocuShare")
s = DCC.login(Site ='Production')
checker = True
#test site login choice
elif(choice in tes):
print("You are now logging into the test VM DocuShare")
s = DCC.login(Site ='Test')
checker = True
#cf.dcc_url + cf.dcc_login
#error message alerting user to enter a valid choice
else:
print("Please enter a valid choice, (P)roduction or (T)est")
choice = input().lower()
json_handlelist = dirpath + outroot + 'bothlist.txt'
json_ssdata = dirpath + outroot + 'CID.txt'
get_cid_ssdata(s, json_handlelist, json_ssdata)
xlfile = dirpath + outroot + 'CID_Analysis.xls'
write_spreadsheet(json_ssdata, xlfile)
json_verlist = dirpath + outroot + 'ver_list.txt'
json_doclist = dirpath + outroot + 'doc_list.txt'
make_handle_lists(json_ssdata, json_doclist, json_verlist)
## Remove the files that are currently located in the collection for the CID
if MyUtil.get_yn('Remove location (not delete) of files from ' + CID_coll[0] +'(Y/N)?: '):
doclist = DCC.list_obj_in_coll(s, CID_coll[0],Print=True,Jwrite=False,Depth='infinity',Type='Doc')
for doc in doclist:
DCC.dcc_remove_doc_from_coll(s, doc, CID_coll[0])
## Add CID files to the collection
fh = open(json_doclist, 'r')
dl = json.load(fh)
fh.close()
if MyUtil.get_yn('Add CID files to ' + CID_coll[0] +' (Y/N)?: '):
DCC.add_docs_2_collections(s, dl, CID_coll)
# Check that the expected docs are in the collection
DCC.check_docs_in_coll(s, dl, CID_coll)