Comment #1 on issue 1961 by [email protected]: Export routine (MARC) for Archives Canada
http://code.google.com/p/qubit-toolkit/issues/detail?id=1961

David and I discussed this in December 2010:

E-mail 10 Dec 2010, Tim to David:

I wanted to touch base about some work I'm doing on a batch export routine to send provincial data to Archives Canada / CAIN. Since this will be potentially useful for other provinces using ica-atom for their provincial networks, I want to make sure anything I come up with can be integrated/adapted easily enough, and that I'm not going off on the wrong path...

Currently, Archives Canada requires traditional MARC 21 (as opposed to MARC XML); and it's a complete file every time (no incremental updates). We are currently able to provide fonds-level descriptions or series-level descriptions where the series is the highest level.

What I've done so far in terms of ica-atom programming is extend the sfRadPlugin module to allow export as marc21, e.g.:
http://saindev.usask.ca/ica-atom-fonds/index.php/justice-and-webb-landscape-architects-fonds;rad?sf_format=marc21
(view the source to see the correct formatting; but not all the fields are there yet) I had to add an empty file apps/qubit/templates/layout.marc21.php to make this work, so I may not have done that correctly.

So my first question is: should this in fact be a separate plugin? At the very least I was thinking the action should be called something like cainmarc rather than marc21, so that it's clear that this is specifically for CAIN, i.e. following those tagging guidelines.

I then tried to loop through the database to generate a consolidated export file. Not surprisingly, I ran out of memory. While it might be nice to have this functionality built into ica-atom, since an export is required fairly regularly (we currently transfer a file, via crontab, once a month), I'm thinking that depending on a large amount of memory/execution time is best to be avoided. And there is not really a need to preview this file via the interface; it just needs to be ftp'd to LAC periodically. Instead, I turned to my new favourite tool, curl...

To generate the consolidated export file, I'm using a perl script to query the database and loop through top-level descriptions (where parent_id=1), and then do a curl call to the relevant url. This routine seems to work, but I'm wondering if you have any thoughts about a better approach, especially for longer-term integration/flexibility.


--
You received this message because you are subscribed to the Google Groups "Qubit 
Toolkit Issues" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/qubit-issues?hl=en.

Reply via email to