It works by using regular expressions to find a URL within a string of
text such as an 856 field. It makes a list of all the links and then
begins making HTTP HEAD requests to each link using the Jetty HTTP client
library. The response status codes are recorded to a file. Multiple
threads are spawned to make the HTTP requests to avoid bottlenecks caused
by slow-responding servers. It started as a Python script that was very
short, but after switching to Java, adding a GUI, and using multiple
threads, it became a lot more complicated. Go figure.
Josh Welker
-----Original Message-----
From: Code for Libraries [mailto:[log in to unmask]] On Behalf Of
Andrew Nisbet
Sent: Wednesday, January 08, 2014 5:41 PM
To: [log in to unmask]
Subject: Re: [CODE4LIB] EZcheck: a java-based catalog link checking
program
Hi Joshua,
I have been looking for, and thinking about building one of these myself.
I will be interested to see your detection technique. In the meantime Java
applications are distributed as jar files which are then made executable
with the inclusion of a manifest as shown at
http://www.cis.upenn.edu/~matuszek/cit597-2002/Pages/executable-jar-files.
html. Then users need only execute the jar as they would any other
executable on their OS.
Edmonton Public Library
Andrew Nisbet
ILS Administrator, IT Services
T: 780.496.4058 F: 780.496.8317
[log in to unmask] Spread the words.
-----Original Message-----
From: Code for Libraries [mailto:[log in to unmask]] On Behalf Of
Joshua Welker
Sent: January-08-14 3:48 PM
To: [log in to unmask]
Subject: [CODE4LIB] EZcheck: a java-based catalog link checking program
I put together a link checking program that searches through MARC 856
fields for broken links and generates a report spreadsheet. It was
originally in Python, but I switched to Java for a variety of reasons
(don't want to start a language flame war). The result is the EZcheck
program above. If anyone would like to give it a whirl, feel free and let
me know how it works for you. There is no documentation right now, but it
is fairly self-explanatory and has tooltips if you mouse over each field.
We used this at my library and found several thousand broken links in our
catalog.
https://github.com/jswelker/ezcheck
https://github.com/jswelker/ezcheck/releases (It's an executable JAR file,
which you should be able to double-click to launch on any platform,
assuming you have Java 7.)
The program accepts input in several formats. You can feed it a
tab-delimited text file containing a record number, an 856 field, a title,
and an author. You can feed it .MRC recorods. If you use the Sierra ILS
and appropriate user permissions, you can use the Direct SQL Access
interface to connect straight to the ILS without having to generate MARC
files or create lists.
This is my first multi-threaded program and my first major Java/JavaFX
project, so if you have any feedback on the code quality or find any bugs,
please let me know. I also have no clue how to package a Java app into a
.exe file or the Mac equivalent, if anyone has any pointers on that
subject.
Josh Welker
Information Technology Librarian
James C. Kirkpatrick Library
University of Central Missouri
Warrensburg, MO 64093
JCKL 2260
660.543.8022
|