Library Stuff
Integrated Library System Utilities - SIP2 and API
Console utilities to interact with SIP2 and API servers, which are used for data interchange between library (as in, sssh, you're in a library) systems. SIP2 is "Standard Interchange Protocol Version 2.00" "API" is a shameless appropriation of the general acronym API that Innovative Interfaces Inc used to name their API.
In brief, they are used to access customer data and move books around.
I've cut out a lot of information from the examples, since these utilities largely output private data.
Source is offered under the GPL. Its pretty messy for the .exe's, I never got around to doing any cleanup past bare functionality.
sip2talk.exe
Download sip2talk.exe
Download sip2talk-src.zip
sip2talk.exe is a command line utility that performs a Patron Information Request against a specified SIP2 server.
C:\sip2talk.exe
--------------------------------------------------------------
sip2talk.exe by Eli Fulkerson
Please see http://www.elifulkerson.com/projects/ for updates.
--------------------------------------------------------------
Usage: sip2talk barcode hostname [server-port] [username] [password]
If you don't pass server-port, it defaults to 6001.
C:\sip2talk.exe (card no) www.example.com 6001 (username) (password)
Barcode#: (card no)
SIP2 host: www.example.com
SIP2 port: 6001
username: (username)
password: (password)
Sent: (sip request goes here, details redacted)
Reply: (sip reply goes here, details redacted)
Not much of an output shot, but most of the output is private data about the individual in question.
sip2ping.exe
Download sip2ping.exe
Download sip2ping-src.zip
sip2ping.exe resembles ping, but it times the length of time it takes for a SIP2 server to respond to a "SC Status Request"
C:\sip2ping.exe
--------------------------------------------------------------
sip2ping.exe by Eli Fulkerson
Please see http://www.elifulkerson.com/projects/ for updates.
--------------------------------------------------------------
Usage: sip2ping [-t] [-d] [-i interval] [-n times] [-u] hostname [server-port] [
username] [password]
-t : ping continuously until stopped via control-c
-n 5 : for instance, send 5 pings
-i 5 : for instance, ping every 5 seconds
If you don't pass server-port, it defaults to 6001.
C:\sip2ping.exe www.example.com
SIP2 host: www.example.com
SIP2 port: 6001
No username/password specified.
Sent: 9910802.00|AY1AZFC23
Reply: SIPOUTPUT(REDACTED)|SIPOUTPUT|MORESIPOUTPUT|ETCETCETC|CHECKSUM
Response: time=734.303ms bytes=94 kbit/s=~1.024
sip2ping statistics for www.example.com:6001
1 probes sent.
1 successful, 0 failed.
Approximate exchange times in milli-seconds:
Minimum = 734ms, Maximum = 734ms, Average = 734ms
sip2talk.py
Download sip2talk.py
A python version of sip2talk, largely identical in output to sip2talk.exe
C:\python.exe sip2talk.py Syntax: sip2talk.py[optional:username] [optional:password] C:\python.exe sip2talk.py www.example.com 6001 (cardnumber) Checking card# (cardnumber) against www.example.com:6001 ..assuming no username/password --- Raw Message: 6300120100518 163233 AO|AA(cardnumber)|AC|AD|AY1AZF24E Raw Response: 6 4 00020100518 110900000000000000000000000000AO|AA(cardnumber) 9|AELAST, FIRST MIDDLE|AQLIBRARY|BZ0020|CA0010|CB0050|BLY|BV 0.00|BDHOME ADDRESS |BEuser@example.com|BHUSD|PA20101009 235900|P DDOB|PCA-RES|PECOUNTYTON|PFGENDER|DB$0.00|DM$0.00|AFOK|AY1AZB42C Fields: 64 00020100518 110900000000000000000000000000AO AA - (cardnumber) AE - LAST, FIRST MIDDLE AQ - LIBRARY BZ - 0020 CA - 0010 CB - 0050 BL - Y BV - 0.00 BD - HOME ADDRESS BE - user@example.com BH - USD PA - 20101009 235900 PD - DOB PC - A-RES PE - COUNTYTON PF - GENDER DB - $0.00 DM - $0.00 AF - OK AY - 1AZB42C
sip2info.py
Download sip2info.py
Python, just talks to the sip server and sees if it is there, via a "SC Status Request"
C:\python.exe sipinfo.py Syntax: sipinfo.py[optional:username] [optional:password] C:\python.exe sipinfo.py www.example.com 6001 Checking for SIP2 on www.example.com:6001 ..assuming no username/password --- Raw Message: 9910802.00|AY1AZFC23 Raw Response: 9 8YYYYYN60000320100518 1108052.00AOLIBRARY|AMLIBRARY|BXYYYYYYYYYYYNNYYY|ANSIP|AY1AZE770 Fields: 98YYYYYN60000320100518 1108052.00AOLIBRARY AM - LIBRARY BX - YYYYYYYYYYYNNYYY AN - SIP AY - 1AZE770
apitalk.py
Download apitalk.py
Kind of silly, since API is just done over HTTP, but this talks to the server and strips the html out for you.