<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;"><div><div><div>Hi Mark,</div><div>Yup, you’re absolutely right. I made the (erroneous) assumption that changes to mtimes for descendant components would propagate in the resource record as well. This seems like something that would be best done in AS itself; I’m wondering if Brian or Chris have any thoughts about how this could be accomplished?</div><div><br></div><div><div><div>Hillel Arnold</div></div><div>Lead Digital Archivist</div><div>Rockefeller Archive Center</div></div></div></div><div><br></div><span id="OLK_SRC_BODY_SECTION"><div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt"><span style="font-weight:bold">From: </span> Mark Cooper <<a href="mailto:mark.cooper@lyrasis.org">mark.cooper@lyrasis.org</a>><br><span style="font-weight:bold">Reply-To: </span> Archivesspace Users Group <<a href="mailto:archivesspace_users_group@lyralists.lyrasis.org">archivesspace_users_group@lyralists.lyrasis.org</a>><br><span style="font-weight:bold">Date: </span> Tuesday, July 28, 2015 at 3:41 PM<br><span style="font-weight:bold">To: </span> Archivesspace Users Group <<a href="mailto:archivesspace_users_group@lyralists.lyrasis.org">archivesspace_users_group@lyralists.lyrasis.org</a>><br><span style="font-weight:bold">Subject: </span> Re: [Archivesspace_Users_Group] Mass export of EAD<br></div><div><br></div><div><style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style><div dir="ltr"><div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;"><p>In case you're interested, but haven't seen it, there is a doc for the export script:<br><br>
<a href="https://github.com/archivesspace/archivesspace/blob/master/launcher/ead_export/REPO_EAD_EXPORT_README.md">https://github.com/archivesspace/archivesspace/blob/master/launcher/ead_export/REPO_EAD_EXPORT_README.md</a><br><br>
Right now it just exports every EAD associated with a specified repo to a zip file and doesn't have date or incremental awareness. That could be added as the resources endpoint accepts a "modified_since" parameter (as a timestamp). I just rough tested:<br><br>
date -d '2015-07-01 00:00:00' +'%s' # 1435734000<br>
curl -H "X-ArchivesSpace-Session: $TOKEN" "<a href="http://localhost:8089/repositories/2/resources?all_ids=true&modified_since=1435734000">http://localhost:8089/repositories/2/resources?all_ids=true&modified_since=1435734000</a>"<br><br>
Returns what appears to be the correct set of results. The obvious problem is that it isn't descendent aware, so it's only direct changes to the topmost resource record that count for the "modified_since" parameter. If the api also factored in descendent mtimes
for records types that have them that would have been ideal =) Some workaround, or a solution, for that limitation is going to be required for any time based incremental type export (assuming you need any descendent / component updates to be considered as
an update to the resource for what you're doing -- in other words, you may not be able to just rely on the resource mtime).</p><p><br>
Mark Cooper<br>
Technical Lead, Hosting and Support<br>
LYRASIS<br>
email: <a href="mailto:mark.cooper@lyrasis.org">mark.cooper@lyrasis.org</a><br>
skype: mark_c_cooper<br></p><br><div style="color: rgb(0, 0, 0);"><hr tabindex="-1" style="display:inline-block; width:98%"><div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri,sans-serif" color="#000000"><b>From:</b> <a href="mailto:archivesspace_users_group-bounces@lyralists.lyrasis.org">archivesspace_users_group-bounces@lyralists.lyrasis.org</a> <<a href="mailto:archivesspace_users_group-bounces@lyralists.lyrasis.org">archivesspace_users_group-bounces@lyralists.lyrasis.org</a>> on behalf of Suda, Phillip
J <<a href="mailto:psuda1@tulane.edu">psuda1@tulane.edu</a>><br><b>Sent:</b> Tuesday, July 28, 2015 9:13 AM<br><b>To:</b> Archivesspace Users Group<br><b>Subject:</b> Re: [Archivesspace_Users_Group] Mass export of EAD</font><div> </div></div><div><div style=""><p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman",serif;"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);">Thanks all for your suggestions/scripts/help. This is a great start.
</span></p><p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman",serif;"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);"> </span></p><p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman",serif;"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);">Thank you,
</span></p><p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman",serif;"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);"> </span></p><p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman",serif;"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);">Phil
</span></p><p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman",serif;"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);"> </span></p><p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman",serif;"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);"> </span></p><p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman",serif;"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);">Phillip Suda</span></p><p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman",serif;"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);">Systems Librarian</span></p><p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman",serif;"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);">Howard-Tilton Memorial Library</span></p><p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman",serif;"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);">Tulane University</span></p><p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman",serif;"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);"><a href="mailto:psuda1@tulane.edu">psuda1@tulane.edu</a></span></p><p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman",serif;"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);">504-865-5607</span></p><p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman",serif;"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);"> </span></p><p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman",serif;"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);"> </span></p><p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman",serif;"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);"> </span></p><div><div style="border:none; border-top:solid #E1E1E1 1.0pt; padding:3.0pt 0in 0in 0in"><p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman",serif;"><b><span style="font-size: 11pt; font-family: Calibri, sans-serif;">From:</span></b><span style="font-size: 11pt; font-family: Calibri, sans-serif;"> <a href="mailto:archivesspace_users_group-bounces@lyralists.lyrasis.org">archivesspace_users_group-bounces@lyralists.lyrasis.org</a> [<a href="mailto:archivesspace_users_group-bounces@lyralists.lyrasis.org">mailto:archivesspace_users_group-bounces@lyralists.lyrasis.org</a>]
<b>On Behalf Of </b>Kevin Clair<br><b>Sent:</b> Tuesday, July 28, 2015 10:41 AM<br><b>To:</b> Archivesspace Users Group <<a href="mailto:archivesspace_users_group@lyralists.lyrasis.org">archivesspace_users_group@lyralists.lyrasis.org</a>><br><b>Subject:</b> Re: [Archivesspace_Users_Group] Mass export of EAD</span></p></div></div><p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman",serif;">
</p><p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman",serif;"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);">I have a Perl script I run from command line that runs every batch export I want or need at this point:
<a title="Ctrl+Click or tap to follow the link" style="color: blue; text-decoration: underline;" href="https://github.com/duspeccoll/as_utils/blob/master/reports.pl">
https://github.com/duspeccoll/as_utils/blob/master/reports.pl</a></span></p><p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman",serif;"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);"> </span></p><p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman",serif;"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);">It grabs the JSON list of all the IDs for a given model, and then either dumps everything into a single JSON object or exports to some other format. The EAD export is lines 206-224.
This is *extremely* customized for our environment, and I’ve made no effort yet to modify it for general use, but it’s an idea of how one could go about doing this. -k</span></p><p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman",serif;"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);"> </span></p><div><div style="border:none; border-top:solid #B5C4DF 1.0pt; padding:3.0pt 0in 0in 0in"><p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman",serif;"><b><span style="font-size: 10pt; font-family: Tahoma, sans-serif;">From:</span></b><span style="font-size: 10pt; font-family: Tahoma, sans-serif;"><a style="color: blue; text-decoration: underline;" href="mailto:archivesspace_users_group-bounces@lyralists.lyrasis.org">
archivesspace_users_group-bounces@lyralists.lyrasis.org</a> [<a style="color: blue; text-decoration: underline;" href="mailto:archivesspace_users_group-bounces@lyralists.lyrasis.org">mailto:archivesspace_users_group-bounces@lyralists.lyrasis.org</a>]
<b>On Behalf Of </b>Steven Majewski<br><b>Sent:</b> Tuesday, July 28, 2015 9:34 AM<br><b>To:</b> Archivesspace Users Group<br><b>Subject:</b> Re: [Archivesspace_Users_Group] Mass export of EAD</span></p></div></div><p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman",serif;">
</p><div><p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman",serif;">
</p></div><div><p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman",serif;">
There is ead_export.sh in the scripts directory. </p></div><div><p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman",serif;">
It only exports published collections, but that can be changed in the code if needed. </p></div><div><p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman",serif;">
That script runs locally on the AS server and it writes into the archivesspace/data/</p></div><div><p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman",serif;">
directory, so you need write access. </p></div><div><p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman",serif;">
</p></div><div><p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman",serif;">
resource ids will not necessarily be sequential after deletions and transfers, but you</p></div><div><p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman",serif;">
can get a JSON list of all of the ids from /repositories/$REPO_ID/resources?all_ids=true</p></div><div><p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman",serif;">
and then loop over those ids. </p></div><div><p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman",serif;">
</p></div><div><p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman",serif;">
— Steve Majewski</p></div><div><p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman",serif;">
</p></div><p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman",serif;">
</p><div><blockquote style="margin-top:5.0pt; margin-bottom:5.0pt"><div><p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman",serif;">
On Jul 28, 2015, at 11:15 AM, Alexander Duryee <<a style="color: blue; text-decoration: underline;" href="mailto:alexanderduryee@nypl.org">alexanderduryee@nypl.org</a>> wrote:</p></div><p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman",serif;">
</p><div><div><div><div><div><div><p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman",serif;">
Phil,</p></div><p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman",serif;">
As far as I'm aware, there's no bulk EAD export functionality in ASpace. However, since ASpace's resource identifiers are sequential integers, you can loop over each resource id in a repository and make an API call for its EAD record:</p></div><p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman",serif;">
for x in {first..last}; do curl -H '[session token]' "<a title="Ctrl+Click or tap to follow the link" style="color: blue; text-decoration: underline;" href="https://[address]/repositories/%5bid%5d/resource_descriptions/$%7bx%7d.xml">https://[address]/repositories/[id]/resource_descriptions/${x}.xml</a>"
> aspace_${x}.xml; done</p></div><p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman",serif;">
A loop like that should generate EAD records for each resource in your repository.</p></div><div><p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman",serif;">
Regards,</p></div><p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman",serif;">
--Alex </p></div><div><p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman",serif;">
</p><div><p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman",serif;">
On Tue, Jul 28, 2015 at 10:27 AM, Suda, Phillip J <<a style="color: blue; text-decoration: underline;" href="mailto:psuda1@tulane.edu" target="_blank">psuda1@tulane.edu</a>> wrote:</p><div><div><p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman",serif;">
Greetings all, </p><p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman",serif;">
</p><p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman",serif;">
Is there an API or mass export feature for exporting all EAD records from a repository, etc.? I am only seeing a collection level export feature.
</p><p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman",serif;">
</p><p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman",serif;">
Thanks, </p><p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman",serif;">
</p><p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman",serif;">
Phil </p><p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman",serif;">
</p><p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman",serif;">
Phillip Suda</p><p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman",serif;">
Systems Librarian</p><p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman",serif;">
Howard-Tilton Memorial Library</p><p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman",serif;">
Tulane University</p><p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman",serif;"><a style="color: blue; text-decoration: underline;" href="mailto:psuda1@tulane.edu" target="_blank">psuda1@tulane.edu</a></p><p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman",serif;"><a style="color: blue; text-decoration: underline;" href="tel:504-865-5607" target="_blank">504-865-5607</a></p><p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman",serif;">
</p></div></div><p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman",serif;"><br>
_______________________________________________<br>
Archivesspace_Users_Group mailing list<br><a style="color: blue; text-decoration: underline;" href="mailto:Archivesspace_Users_Group@lyralists.lyrasis.org">Archivesspace_Users_Group@lyralists.lyrasis.org</a><br><a style="color: blue; text-decoration: underline;" href="http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group" target="_blank">http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group</a></p></div><p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman",serif;"><br><br clear="all"><br>
-- </p><div><div><div><div><p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman",serif;">
Alexander Duryee</p><div><p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman",serif;">
Metadata Archivist</p></div><div><p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman",serif;">
New York Public Library</p></div><div><p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman",serif;">
(917)-229-9590</p></div><div><p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman",serif;"><a style="color: blue; text-decoration: underline;" href="mailto:alexanderduryee@nypl.org" target="_blank">alexanderduryee@nypl.org</a></p></div></div></div></div></div></div><p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman",serif;">
_______________________________________________<br>
Archivesspace_Users_Group mailing list<br><a style="color: blue; text-decoration: underline;" href="mailto:Archivesspace_Users_Group@lyralists.lyrasis.org">Archivesspace_Users_Group@lyralists.lyrasis.org</a><br><a style="color: blue; text-decoration: underline;" href="http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group">http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group</a></p></div></blockquote></div><p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: "Times New Roman",serif;">
</p></div></div></div></div></div></div></span></body></html>