From: Stephen Wills Date: Sat, 29 May 2021 00:30:07 +0000 (-0700) Subject: Docs: Update migrating_your_data.adoc X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=39753c8a84a154ec2ca492c21f50b6ba4636dc5f;p=Evergreen.git Docs: Update migrating_your_data.adoc Signed-off-by: Stephen Wills Signed-off-by: Jane Sandberg --- diff --git a/docs/modules/admin_initial_setup/pages/migrating_your_data.adoc b/docs/modules/admin_initial_setup/pages/migrating_your_data.adoc index 0c89278b61..aafda90407 100644 --- a/docs/modules/admin_initial_setup/pages/migrating_your_data.adoc +++ b/docs/modules/admin_initial_setup/pages/migrating_your_data.adoc @@ -69,6 +69,19 @@ for record in reader: writer.write(pymarc.record_to_xml(record) + "\n") ------------------------------------------------------------------------------ +Note: pymarc does not fail gracefully when it encounters encoding issues - often +either because LDR09 is lying, or because non-UTF8 / non-MARC8 chars (like iso-8859-1) +have been added by other less strict tools and the above script will fail. + +Another way to convert the .mrc to xml is with yaz-marcdump using the following: +[source] +------------------------------------------------------------------------------ +yaz-marcdump -i marc -o marcxml -f utf8 -t utf8 -l 9=97 records_in.mrc > records_out.xml +------------------------------------------------------------------------------ + +The resulting file will have its XML formatted into human readable format and need to be +massaged such that each record container is on a single line. + Once you have a MARCXML file with one record per line, you can load the records into your Evergreen system via a staging table in your database.