record = marcx.Record.from_record(record) record.force_utf8 = True record.strict = False # prüfen, ob Titel vorhanden ist if not record["245"]: continue # Leader record.leader = " " + record.leader[5:] # Identifikator f001 = record["001"].data record.remove_fields("001") f001 = f001.replace("-", "").replace("_", "") record.add("001", data="finc-39-%s" % f001) # Kollektion und Ansigelung try: f022a = record["022"]["a"] except: f022a = "" descriptions = list(record.itervalues('520.a')) record.remove_fields("520") # Ugly, but helps to emit valid binary MARC. descriptions = [d[:8000] for d in descriptions] total = sum((len(s) for s in descriptions)) if total > 9000: logging.warn(
record = marcx.Record.from_record(record) record.force_utf8 = True record.strict = False # prüfen, ob Titel vorhanden ist if not record["245"]: continue # Leader record.leader = " " + record.leader[5:] # Identifikator f001 = record["001"].data record.remove_fields("001") f001 = f001.replace("-", "").replace("_", "") record.add("001", data="finc-39-%s" % f001) # Kollektion und Ansigelung try: f022a = record["022"]["a"] except: f022a = "" try: f760x = record["760"]["x"] except: f760x = "" try: f787x = record["787"]["x"] except: