def create_our_record(recid):
    old_record = get_record(recid)
    instances = old_record['520']

    record = BibRecord(recid=recid)
    record['520'] = set(instances)
    return record.to_xml()
Esempio n. 2
0
    def cb_process_one(recid):
        record = get_record(recid)
        instances = record["035"]

        for field in instances:
            if "SPIRESTeX" in field.get_subfield_values(code="9") and field.get_subfield_values(code="z")[0].startswith(
                ":"
            ):
                new_record = BibRecord(recid=recid)
                new_record["035"] = [field]
                bibupload.add(new_record.to_xml())
def create_our_record(recid):
    old_record = get_record(recid)
    instances = old_record['710']

    for field in instances:
        for subfield in field.subfields:
            if subfield.code == 'a':
                subfield.code = 'g'

    record = BibRecord(recid=recid)
    record['710'] = instances
    return record.to_xml()