예제 #1
0
#            else:
#                ficOk = False
#                print str(abs(len(DataBrevets['brevets']) - len(BiblioPatents))), "patents data missing. Gathering."
#                GatherBibli = True
#        else:
#            print str(abs(len(lstBrevets))), " patents data missing. Gathering."
#
#            BiblioPatents = [] # gathering all again, I don t know if of serves the same ordered list of patents
#            GatherBibli = True
PatIgnored = 0

if GatherBibli and GatherBiblio:
    ops_client = epo_ops.Client(key, secret)
    #        data = ops_client.family('publication', , 'biblio')
    ops_client.accept_type = 'application/json'
    if "brevets" in list(DataBrevets.keys()):
        YetGathered = list(
            set([bre['label'] for bre in DataBrevets["brevets"]]))
        print(len(YetGathered), " patent bibliographic data gathered.")
        DataBrevets["YetGathered"] = YetGathered
#    elif "YetGathered" in list(DataBrevets.keys()):
#        YetGathered = DataBrevets["YetGathered"]

#        if len(YetGathered) < len(DataBrevets["brevets"]): # used for cleaning after first attempts :-) # removed for huge collects
#            DataBreTemp = [] # special cleaning process
#            for bre in DataBrevets["brevets"]:
#                if bre not in DataBreTemp:
#                    DataBreTemp.append(bre)
#            try:
#                os.remove(ResultBiblioPath +'//'+ndf)
#            except:
예제 #2
0
#        else:
#            print str(abs(len(lstBrevets))), " patents data missing. Gathering."
#
#            BiblioPatents = [] # gathering all again, I don t know if of serves the same ordered list of patents
#            GatherBibli = True
PatIgnored = 0

if Fusion or (GatherBibli and GatherBiblio):
    ops_client = epo_ops.Client(key, secret)
    # This step is unclear at this time.
    # p2n should firt gather the patent list, then gather all bibliographic data for each patent in list
    # add a consistency step would be nice also....

    ops_client.accept_type = 'application/json'

    if "brevets" in list(BibliDataBrevets.keys()):
        YetGathered = list(
            set([bre['label'] for bre in BibliDataBrevets['brevets']]))
        print(len(YetGathered), " patent bibliographic data gathered.")
        AnnonceLog(Appli='p2n_gather_biblio',
                   texte=str(len(YetGathered)) +
                   " patent bibliographic data gathered.")
        BibliDataBrevets["YetGathered"] = YetGathered

        if len(listeLabel) > 0:
            AnnonceProgres(Appli='p2n_gather_biblio',
                           valMax=100,
                           valActu=len(YetGathered) * 100 / len(listeLabel))
    else:
        YetGathered = []