<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
Nancy,<br>
<br>
I have access to our staging database, but not production. I'm not sure our sysadmins will allow me to play around in the prod database, unless they can assign me read only maybe? Pulling the file_uri values for file_version would be much more efficient. However,
I'm not just looking to check digital object links, but also any links found within collection and archival object level notes, either copied straight into the text of the notes or linked using the <extref> tag. I could probably query the database for that
info too.<br>
<br>
Corey<br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> archivesspace_users_group-bounces@lyralists.lyrasis.org <archivesspace_users_group-bounces@lyralists.lyrasis.org> on behalf of Kennedy, Nancy
<KennedyN@si.edu><br>
<b>Sent:</b> Wednesday, February 10, 2021 9:18 AM<br>
<b>To:</b> Archivesspace Users Group <archivesspace_users_group@lyralists.lyrasis.org><br>
<b>Subject:</b> Re: [Archivesspace_Users_Group] Checking for Broken URLs in Resources</font>
<div> </div>
</div>
<style>
<!--
@font-face
{font-family:"Cambria Math"}
@font-face
{font-family:Calibri}
@font-face
{font-family:Verdana}
p.x_MsoNormal, li.x_MsoNormal, div.x_MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif}
a:link, span.x_MsoHyperlink
{color:#0563C1;
text-decoration:underline}
.x_MsoChpDefault
{font-size:10.0pt}
@page WordSection1
{margin:1.0in 1.0in 1.0in 1.0in}
div.x_WordSection1
{}
-->
</style>
<div lang="EN-US" link="#0563C1" vlink="#954F72" style="word-wrap:break-word"><font color="BA0C2F">[EXTERNAL SENDER - PROCEED CAUTIOUSLY]</font><br>
<br>
<div>
<div class="x_WordSection1">
<p class="x_MsoNormal">Hi Corey – </p>
<p class="x_MsoNormal">Do you have access to query the database, as a starting point, instead of EAD? We were able to pull the file_uri values from the file_version table in the database. Our sysadmin then checked the response codes for that list of URI,
and we referred issues out to staff working on those collections. Some corrections can be made directly by staff, or for long lists, you could include the digital_object id and post updates that way.</p>
<p class="x_MsoNormal"> </p>
<p class="x_MsoNormal">Nancy</p>
<p class="x_MsoNormal"> </p>
<p class="x_MsoNormal"> </p>
<div>
<div style="border:none; border-top:solid #E1E1E1 1.0pt; padding:3.0pt 0in 0in 0in">
<p class="x_MsoNormal"><b>From:</b> archivesspace_users_group-bounces@lyralists.lyrasis.org <archivesspace_users_group-bounces@lyralists.lyrasis.org>
<b>On Behalf Of </b>Corey Schmidt<br>
<b>Sent:</b> Wednesday, February 10, 2021 8:45 AM<br>
<b>To:</b> archivesspace_users_group@lyralists.lyrasis.org<br>
<b>Subject:</b> [Archivesspace_Users_Group] Checking for Broken URLs in Resources</p>
</div>
</div>
<p class="x_MsoNormal"> </p>
<p class="x_MsoNormal" style="line-height:12.0pt; background:#FFEB9C"><b><span style="font-size:9.0pt; color:#9C6500">External Email - Exercise Caution</span></b></p>
<div>
<div>
<p class="x_MsoNormal" style="background:white"><span style="font-size:12.0pt; color:black">Dear all,</span></p>
</div>
<div>
<p class="x_MsoNormal" style="background:white"><span style="font-size:12.0pt; color:black"><br>
Hello, this is Corey Schmidt, ArchivesSpace PM at the University of Georgia. I hope everyone is doing well and staying safe and healthy.<br>
<br>
Would anyone know of any script, plugin, or tool to check for invalid URLs within resources? We are investigating how to grab URLs from exported EAD.xml files and check them to determine if they throw back any sort of error (404s mostly, but also any others).
My thinking is to build a small app that will export EAD.xml files from ArchivesSpace, then sift through the raw xml using python's lxml package to catch any URLs using regex. After capturing the URL, it would then use the requests library to check the status
code of the URL and if it returns an error, log that error in a .CSV output file to act as a "report" of all the broken links within that resource.<br>
<br>
The problems with this method are: 1. Exporting 1000s of resources takes a lot of time and some processing power, as well as a moderate amount of local storage space. 2. Even checking the raw xml file takes a considerable amount of time. The app I'm working
on takes overnight to export and check all the xml files. I was considering pinging the API for different parts of a resource, but I figured that would take as much time as just exporting an EAD.xml and would be even more complex to write. I've checked Awesome
ArchivesSpace, this listserv, and a few script libraries from institutions, but haven't found exactly what I am looking for.<br>
<br>
Any info or advice would be greatly appreciated! Thanks!<br>
<br>
Sincerely,<br>
<br>
Corey</span></p>
<div>
<div>
<p class="x_MsoNormal" style="background:white"><span style="font-size:12.0pt; color:black"> </span></p>
</div>
<div id="x_Signature">
<div>
<div>
<p class="x_MsoNormal" style="background:white"><span style="font-size:12.0pt; font-family:"Verdana",sans-serif; color:black">Corey Schmidt</span><span style="font-size:12.0pt; color:black"></span></p>
</div>
<div>
<p class="x_MsoNormal" style="background:white"><span style="font-family:"Verdana",sans-serif; color:#333333">ArchivesSpace Project Manager</span><span style="font-size:12.0pt; color:black"></span></p>
</div>
<div>
<p class="x_MsoNormal" style="background:white"><span style="font-family:"Verdana",sans-serif; color:#333333">University of Georgia Special Collections Libraries</span><span style="font-size:12.0pt; color:black"></span></p>
</div>
<div>
<p class="x_MsoNormal" style="background:white"><i><span style="font-size:10.0pt; font-family:"Verdana",sans-serif; color:#666666">Email:</span></i><span style="font-size:10.0pt; font-family:"Verdana",sans-serif; color:#666666">
<a href="mailto:Corey.Schmidt@uga.edu">Corey.Schmidt@uga.edu</a></span><span style="font-size:12.0pt; color:black"></span></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>