本文整理匯總了Python中DCC.print_coll_data方法的典型用法代碼示例。如果您正苦於以下問題:Python DCC.print_coll_data方法的具體用法?Python DCC.print_coll_data怎麽用?Python DCC.print_coll_data使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類DCC
的用法示例。
在下文中一共展示了DCC.print_coll_data方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: fix_set
# 需要導入模塊: import DCC [as 別名]
# 或者: from DCC import print_coll_data [as 別名]
def fix_set(s, handle, set, **kwargs):
# kwargs
# ask = True | False, Do/Don't ask if changes should be made (!!! Dangerous !!!)
# default is ask
if 'Document-' in handle:
fd = DCC.prop_get(s, handle, InfoSet = 'DocBasic')
elif 'Collection-' in handle:
fd = DCC.prop_get(s, handle, InfoSet = 'CollData')
else:
fd = DCC.prop_get(s, handle, InfoSet = 'Title')
permdata = DCC.prop_get(s, handle, InfoSet = 'Perms')
print(fd['handle'], ':', fd['title'])
fd['permissions'] = permdata
[removelist, changelist, addlist] = id_perm_changes(s,handle, fd, permdata, set)
ch_flag = False
if len(removelist) or len(changelist) or len(addlist):
print('\n############## ENTRY ##############')
if 'Document-' in handle:
DCC.print_doc_basic(fd)
elif 'Collection-' in handle:
DCC.print_coll_data(fd)
else:
print('Not Document or Collection:', handle, ':', fd['title'])
print('https://docushare.tmt.org/docushare/dsweb/ServicesLib/',handle,'/Permissions',sep='')
DCC.print_perms(permdata)
print('\nSuggested Changes...')
print_perm_changes(removelist, changelist, addlist)
make_perm_changes(s, handle, permdata, removelist, changelist, addlist, **kwargs)
示例2: check_perms
# 需要導入模塊: import DCC [as 別名]
# 或者: from DCC import print_coll_data [as 別名]
def check_perms(s, set, handles, **kwargs):
ask_flag = kwargs.get('Ask', True)
if not ask_flag:
if not MyUtil.get_yn('!!! Warning !!! ask = False: Will not ask to make changes, okay? Enter N to Exit, Y to Continue:'):
print('exiting...')
sys.exit(0)
for handle in handles:
if 'Document-' in handle:
fd = DCC.prop_get(s, handle, InfoSet = 'DocBasic')
elif 'Collection-' in handle:
fd = DCC.prop_get(s, handle, InfoSet = 'CollData')
else:
fd = DCC.prop_get(s, handle, InfoSet = 'Title')
fd['permissions'] = DCC.prop_get(s, handle, InfoSet = 'Perms')
# print(fd['handle'], ':', fd['title'])
print('\n>>>>>>>>>>>>>> DCC Information <<<<<<<<<<<<<<')
if 'Document-' in handle:
DCC.print_doc_basic(fd)
elif 'Collection-' in handle:
DCC.print_coll_data(fd)
else:
print('Not Document or Collection:', handle, ':', fd['title'])
print('\n\tDoc Properties URL: ',Tree.url_view(handle))
print('\tPermissions URL: ',Tree.url_perm(handle))
print('\tGet Document URL: ',Tree.url_access(handle))
print()
fix_objact(s, fd, handle, set, **kwargs)
fix_permact(s, fd, handle, set, **kwargs)