def characterize_and_convert_marcxml_to_ead(ead_dir, marc_dir, real_masters_all, shared_dir): # Uncomment the below line when a new batch is exported (hopefully his won't need to be done again) #characterize_and_merge_marcxml(real_masters_all, marc_dir) joined_dir = join(marc_dir, "marcxml_no_ead_joined") # This one is SUPPRESSED, is not in BEAL, and is for an unspecified department's publications if os.path.exists(join(joined_dir, "011000.xml")): os.remove(join(joined_dir, "011000.xml")) # Uncomment the below lines to convert MARC XML to EAD. Only necessary when changes are made to the EAD converter script converted_dir = join(marc_dir, "converted_eads") unconverted_dir = join(marc_dir, "unconverted_marcxml") convert_marcxml_to_ead(joined_dir, converted_dir, unconverted_dir) working_dir = join(marc_dir, "converted_eads_working") copy_master_eads(marc_dir) normalize_extents(marc_dir) split_extents(marc_dir) normalize_dates(marc_dir) make_acqinfo_from_odd(marc_dir) add_classifications(marc_dir, shared_dir) add_containers(marc_dir, shared_dir) add_container_types(marc_dir) deduplicate_subjects(marc_dir) subject_source_propagation(ead_dir, marc_dir) agent_source_propagation(marc_dir) normalize_agent_roles(marc_dir) prettify_xml_in_directory(working_dir, working_dir)
def run_pre_aspace_cleanup(ead_dir, dspace_mets_dir, dspace_xoai_dir): fix_collection_level_unittitle_commas(ead_dir) wrap_unwrapped_unitdates(ead_dir) normalize_dates(ead_dir) authfilenumber_urls_to_uris(ead_dir) authfilenumber_propagation(ead_dir) #fetch_dspace_mets(ead_dir, dspace_mets_dir) fetch_dspace_xoai(ead_dir, dspace_mets_dir, dspace_xoai_dir) note_to_odd(ead_dir) move_odds(ead_dir) remove_unitdates_from_ps(ead_dir) move_daos(ead_dir) remove_and_between_dates(ead_dir) remove_extent_parens(ead_dir) remove_expired_restrictions(ead_dir) remove_nested_genreforms(ead_dir) prettify_xml_in_directory(ead_dir, ead_dir) print "*** RUN WALKER'S EXTENT NORMALIZATION SCRIPT ***" print "*** COPY THE MASTER FILES TO THE LOCAL EAD DIR ***"