<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"Segoe UI";
        panose-1:2 11 5 2 4 2 4 2 2 3;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
p.msochpdefault, li.msochpdefault, div.msochpdefault
        {mso-style-name:msochpdefault;
        margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Calibri","sans-serif";}
span.emailstyle17
        {mso-style-name:emailstyle17;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.EmailStyle21
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body bgcolor="white" lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D">Thanks for sharing this script with everyone, Chris! 
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">We’ve been using the API via cURL during our testing when not bugging our sysadmin to perform a complete wipe of our database, but I might give this approach a whirl the next time around.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Mark<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> archivesspace_users_group-bounces@lyralists.lyrasis.org [mailto:archivesspace_users_group-bounces@lyralists.lyrasis.org]
<b>On Behalf Of </b>Chris Fitzpatrick<br>
<b>Sent:</b> Friday, September 12, 2014 7:25 AM<br>
<b>To:</b> archivesspace_users_group@lyralists.lyrasis.org<br>
<b>Subject:</b> Re: [Archivesspace_Users_Group] Location Records<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p><span style="font-family:"Calibri","sans-serif";color:black">Hi Shea,<o:p></o:p></span></p>
<p><span style="font-family:"Calibri","sans-serif";color:black"><o:p> </o:p></span></p>
<p><span style="font-family:"Calibri","sans-serif";color:black">I created a script to batch delete locations, which you can see here:<o:p></o:p></span></p>
<p><span style="font-family:"Calibri","sans-serif";color:black"><a href="https://gist.github.com/cfitz/3db6e6c9313be8f2096f" id="lnk403655">https://gist.github.com/cfitz/3db6e6c9313be8f2096f</a><o:p></o:p></span></p>
<div style="margin-top:15.0pt;margin-bottom:15.0pt" id="LPBorder_GT_14105209567370.571297094447887">
<table class="MsoNormalTable" border="1" cellpadding="0" width="80%" style="width:80.0%;background:white;border-top:solid #CCCCCC 1.0pt;border-left:none;border-bottom:solid #CCCCCC 1.0pt;border-right:none">
<tbody>
<tr>
<td width="140" valign="top" style="width:105.0pt;border:none;padding:.75pt .75pt .75pt .75pt">
<div style="margin-top:9.0pt;display:table" id="LPImageContainer_14105209567370.3414584138820246">
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;font-family:"Times New Roman","serif""><a href="https://gist.github.com/cfitz/3db6e6c9313be8f2096f" target="_blank"><span style="text-decoration:none"><img border="0" width="140" height="140" id="_x0000_i1025" src="https://avatars1.githubusercontent.com/u/142965?s=140"></span></a><o:p></o:p></span></p>
</div>
</td>
<td valign="top" style="border:none;padding:.75pt .75pt .75pt .75pt">
<div style="margin-left:10.5pt;margin-top:6.0pt;margin-right:10.5pt" id="LPTitle_14105209567370.94506384755525">
<p class="MsoNormal"><span style="font-size:16.0pt;font-family:"Segoe UI","sans-serif";color:#333333">Delete ASpace locations<o:p></o:p></span></p>
</div>
<div style="margin-left:10.5pt;margin-top:6.0pt;margin-right:10.5pt" id="LPDescription_14105209567370.42034568308720766">
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Segoe UI","sans-serif";color:#666666">Delete ASpace locations - Gist is a simple way to share snippets of text and code with others.<o:p></o:p></span></p>
</div>
<div style="margin-left:10.5pt;margin-top:6.0pt;margin-right:10.5pt;margin-bottom:7.5pt;text-overflow: ellipsis;overflow:hidden" id="LPUrlContainer_14105209567370.15159248204901687">
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman","serif""><a href="https://gist.github.com/cfitz/3db6e6c9313be8f2096f" target="_blank"><span style="font-size:8.5pt;font-family:"Segoe UI","sans-serif";text-decoration:none">Read
 more...</span></a><o:p></o:p></span></p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<p><span style="font-family:"Calibri","sans-serif";color:black"><o:p> </o:p></span></p>
<p><span style="font-family:"Calibri","sans-serif";color:black">It's written in Ruby and required the rest_client gem ( "gem install rest_client" to install it)<o:p></o:p></span></p>
<p><span style="font-family:"Calibri","sans-serif";color:black"><o:p> </o:p></span></p>
<p><span style="font-family:"Calibri","sans-serif";color:black">Let me know if that works for you..b,chris.<o:p></o:p></span></p>
<p><span style="font-family:"Calibri","sans-serif";color:black"><o:p> </o:p></span></p>
<div id="Signature">
<div name="divtagdefaultwrapper">
<div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;color:black">Chris Fitzpatrick | Developer, ArchivesSpace<br>
Skype: chrisfitzpat  | Phone: 918.236.6048<br>
<a href="http://archivesspace.org/">http://archivesspace.org/</a><o:p></o:p></span></p>
</div>
</div>
</div>
</div>
<div>
<div class="MsoNormal" align="center" style="text-align:center"><span style="font-size:12.0pt;color:#212121">
<hr size="2" width="98%" align="center">
</span></div>
<div id="divRplyFwdMsg">
<p class="MsoNormal"><b><span style="color:black">From:</span></b><span style="color:black">
<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 Shea, Patrick <<a href="mailto:PShea@chemheritage.org">PShea@chemheritage.org</a>><br>
<b>Sent:</b> Thursday, September 11, 2014 7:17 PM<br>
<b>To:</b> <a href="mailto:archivesspace_users_group@lyralists.lyrasis.org">archivesspace_users_group@lyralists.lyrasis.org</a><br>
<b>Subject:</b> [Archivesspace_Users_Group] Location Records</span><span style="font-size:12.0pt;color:#212121">
<o:p></o:p></span></p>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:#212121"> <o:p></o:p></span></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="color:#212121">Greetings everyone.  <o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#212121"> <o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#212121">We just installed Archive Space at my institution this week, so I am brand new to the group, and unfortunately already in need of some basic assistance.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#212121"> <o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#212121">I just finished batch-creating “location records,” and now need to delete them all due to an error on my part.   I have begun deleting them individually, but I batch-created so many, that just about any alternative
 to that task would be more efficient.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#212121"> <o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#212121">Currently, the only thing I have done in AS is to create the repository, and manage the user access.  Starting everything over from scratch would not be a problem.  Do I have any alternatives to individually
 deleting or editing all of these location records?   <o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#212121"> <o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#212121">Any advice is greatly appreciated.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#212121"> <o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#212121">-Patrick Shea<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#212121"> <o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#212121"> <o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#212121"> <o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#212121"> <o:p></o:p></span></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#212121">__________________________________ <br>
<br>
Patrick H. Shea, CA<br>
Chief Curator of Archives and Manuscripts<br>
Othmer Library of Chemical History<br>
P: +1.215.873.8265<br>
F: +1.215.629.5265<br>
</span><span style="font-size:12.0pt;color:#212121"><br>
</span><strong><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#212121">Chemical Heritage Foundation</span></strong><b><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#212121"><br>
</span></b><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#212121">LIBRARY • MUSEUM • CENTER FOR SCHOLARS<br>
315 Chestnut Street  •  Philadelphia, PA 19106 • U.S.A.<br>
</span><span style="font-size:12.0pt;color:#212121"><a href="http://www.chemheritage.org/" title=""><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">chemheritage.org</span></a><br>
<br>
<o:p></o:p></span></p>
</div>
</div>
</div>
</body>
</html>