def _reformat_au_(austr): authors = [] #print "_reformat_au_", austr for author in austr.split(";"): author = author.strip() if len(author) < 1: continue parts = _extract_surname_name_(author) author_packed = zbl_io.pack_multivalue_field(parts, zbl_io.MULTIVAL_FIELD_SEPARATOR2); authors.append(author_packed) authors_packed = zbl_io.pack_multivalue_field(authors) return authors_packed
def _reformat_au_(austr): authors = [] #print "_reformat_au_", austr for author in austr.split(";"): author = author.strip() if len(author) < 1: continue parts = _extract_surname_name_(author) author_packed = zbl_io.pack_multivalue_field( parts, zbl_io.MULTIVAL_FIELD_SEPARATOR2) authors.append(author_packed) authors_packed = zbl_io.pack_multivalue_field(authors) return authors_packed
def _reformat_ai_(austr): authors = [] for author in austr.split(";"): author = author.strip() if len(author) < 1: continue authors.append(author) authors_packed = zbl_io.pack_multivalue_field(authors) return authors_packed
def _update_zbl_record_history_(main_zbl_record, aux_zbl_record): """Updates field <zz> in main_zbl_record basing on its previous value and <zz> value in aux_zbl_record. <zz> - field that identifies records's source (should be merged instead of overwriting.) """ if main_zbl_record.has_key("zz") and aux_zbl_record.has_key("zz"): main_zz_list = zbl_io.unpack_multivalue_field(main_zbl_record["zz"]) aux_zz_list = zbl_io.unpack_multivalue_field(aux_zbl_record["zz"]) main_zz_list.extend(aux_zz_list) main_zbl_record["zz"] = zbl_io.pack_multivalue_field(main_zz_list) return main_zbl_record