Ejemplo n.º 1
0
docmodlist = []

pub_coll = 'Collection-8277'

tr = Tree.return_tree(s, pub_coll, 'Tree_' + pub_coll)
pub_list = Tree.get_flat_tree(tr)

docmatch = {}

for ref in reflist.items():
    print('looking for ', ref[0], ref[1])
    for doc in dm.items():
        if DocMod.is_in_dict(ref[1],doc[1]):
            print('\n\n\n############## Found Document Module Object #:', doc[0], '##############\n')
            DocMod.print_report(docmodreport, doc[1])
            handle = 'Document-' + doc[1]['dccDocHandleNo']
            
            docmatch[handle] = doc[1]
            
            # Construct a new PERM set for each handle entry
            if_not_in_pub_coll = PD.dict_crit_act(
                            {'NOT' : PD.chk_list(handle,pub_list,'eq')},
                            {'Action' : 'Message', 'Message' : '*** WARNING: Document is NOT in Published Collection ***'})

            if_in_pub_coll = PD.dict_crit_act(
                            PD.chk_list(handle,pub_list,'eq'),
                            {'Action' : 'Message', 'Message' : '*** Document IS in Published Collection ***'})


            SET_TMTPUBLISHED = {
Ejemplo n.º 2
0

# construct document module report list
docmodreport = []
docmodreport.append('dccDocTitle')
docmodreport.append('dccDocNo')
docmodreport.append('dccDocRev')
docmodreport.append('DocType')
docmodreport.append('dccDocHandleHyperlink')
docmodreport.append('dccDocVersionHyperlink')
docmodreport.append('dccDocSignedApproved')
docmodreport.append('TMTPublished')
docmodreport.append('dccStatusCheckDate')
docmodreport.append('WIP-ParentDocumentNo')
docmodreport.append('CRNumbers')

s = DCC.login(CF.dcc_url + CF.dcc_login)

for ref in reflist.items():
    print('looking for ', ref[0], ref[1])
    for doc in dm.items():
        if DocMod.is_in_dict(ref[1],doc[1]):
            print('Found Document Module Object #:', doc[0])
            DocMod.print_report(docmodreport, doc[1])
         
#          The following code prints all DCC information on the found files 
   
#             fd = DCC.prop_get(s, DCC.get_handle(doc[1]['dccDocHandleHyperlink']), InfoSet = 'DocBasic')
#             fd['permissions'] = DCC.prop_get(s, DCC.get_handle(doc[1]['dccDocHandleHyperlink']), InfoSet = 'Perms')
#             DCC.print_doc_basic(fd)
#             DCC.print_perms(fd['permissions'])
Ejemplo n.º 3
0
docmodlist = []

pub_coll = 'Collection-8277'

tr = Tree.return_tree(s, pub_coll, 'Tree_' + pub_coll)
pub_list = Tree.get_flat_tree(tr)

docmatch = {}

for ref in reflist.items():
    print('looking for ', ref[0], ref[1])
    for doc in dm.items():
        if DocMod.is_in_dict(ref[1],doc[1]):
            print('\n\n\n############## Found Document Module Object #:', doc[0], '##############\n')
            DocMod.print_report(docmodreport, doc[1])
            handle = 'Document-' + doc[1]['dccDocHandleNo']
            
            docmatch[handle] = doc[1]
            
            # Construct a new PERM set for each handle entry
            if_not_in_pub_coll = PD.dict_crit_act(
                            {'NOT' : PD.chk_list(handle,pub_list,'eq')},
                            {'Action' : 'Message', 'Message' : '*** WARNING: Document is NOT in Published Collection ***'})

            if_in_pub_coll = PD.dict_crit_act(
                            PD.chk_list(handle,pub_list,'eq'),
                            {'Action' : 'Message', 'Message' : '*** Document IS in Published Collection ***'})


            SET_TMTPUBLISHED = {