Skip to content

Commit 3c07c98

Browse files
committed
Initial commit
0 parents  commit 3c07c98

File tree

7 files changed

+3508
-0
lines changed

7 files changed

+3508
-0
lines changed

LICENCE.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) [2016] [Tobias Zeumer]
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

readme.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
SIP2 Python Client: Simple Interchange Protocol Client for Python
2+
3+
# About
4+
A Python SIP2 client. It also supports Gossip.
5+
6+
7+
# Purpose
8+
This was (nearly) my first go with Python. I thought the source might have a better time on Github (well, after a two month break I forgot what I already figured out about publishing a real Python package) than on my drive.
9+
Ideas: Could be used to build some selfcheck device application for libraries. Or use it for some kind of automation...
10+
11+
12+
# Usage
13+
There are just three files. File sip2.py is a low level implemntation of SIP2/Gossip while wrapper.py makes the handling a little bit more comfortable. Check comments of both files.
14+
File message_lookup.py could be used for advanced programming purposes. Maybe...
15+
16+
17+
18+
# More about SIP2
19+
Standard Interchange Protocol 2, Standard: http://mws9.3m.com/mws/mediawebserver.dyn?6666660Zjcf6lVs6EVs66S0LeCOrrrrQ-
20+
21+
Gossip is short for "Good Old Server for Standard Interchange Protocol". Gossip is an SIP2 server implementation (Java) with an extension for enhanced payment options. It's possible to pay
22+
* a single outstanding position; "subtotal-payment"
23+
* an amount being below the total fees (but that sums up to complete positions being paid); "subtotal-payment"
24+
* an amount being below the total fees (but that might only pay one or more positions partially); "subtotal-payment + partial-fee-payment"
25+
26+
Note: Sadly no official documentation for Gossip is available online. You can only contact the developer via https://www.gbv.de/Verbundzentrale/serviceangebote/gossip-service-der-vzg

sip2/Tests/sip2_class.py

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
import pprint
2+
from sip2.sip2 import Gossip
3+
4+
pp = pprint.PrettyPrinter(indent=4)
5+
6+
7+
""" TESTS
8+
#mySip.withCrc = False
9+
#print (mySip._check_crc("09N20160419 12200820160419 122008APReading Room 1|AO830|AB830$28170815|AC|AY2AZEB80"))
10+
11+
#print (mySip.sip_block_patron_request('My Message'))
12+
#print (mySip.sip_checkin_request('083$1234'))
13+
#print (mySip.sip_checkout_request('083$1234'))
14+
#print (mySip.sip_end_patron_session_request())
15+
#print (mySip.sip_fee_paid_request(1, 0, 1.0))
16+
#print (mySip.sip_hold_request('+', 1))
17+
#print (mySip.sip_item_information_request('830$1234'))
18+
#print (mySip.sip_item_status_update_request('830$1234'))
19+
#print (mySip.sip_login_request('user', 'pw'))
20+
#print (mySip.sip_patron_enable_request())
21+
#print (mySip.sip_patron_information_request('hold'))
22+
#print (mySip.sip_patron_information_request('overdue'))
23+
#print (mySip.sip_patron_information_request('unavail'))
24+
#print (mySip.sip_patron_status_request())
25+
#print (mySip.sip_renew_request('830$421'))
26+
#print (mySip.sip_renew_all_request())
27+
#print (mySip.sip_sc_resend_request())
28+
#print (mySip.sip_sc_status_request())
29+
30+
#x = mySip.sip_checkin_response('101YUN20160427 130429AOTUHH|AB830$28328201|AQLS1|AJDigital ävionics handbook; 2: Development 2. ed CRC Pres 2007|AA08300005811|AY5AZD8E7')
31+
#x = mySip.sip_checkout_response('121NUY20160511 112658AOTUB HH|AA08300287914|AB830$26482330|AJStatik / Gross, Dietm 12., Springer 2013|AH08.06.2016|AY4AZDC6F')
32+
#x = mySip.sip_end_patron_session_response('36Y20080228 145537AOWOHLERS|AAX00000000|AY9AZF474')
33+
#x = mySip.sip_fee_paid_response('38Y20160429 212935AOTUHH|AA00180530690|BK00180530690-20160429-212934-954-257|BV2.00|CG81766|FA1.00|FB830$24602811|FC08.12.2014|FDStudentisches Wohnen in Baden-Wuerttemberg: Bestandsaufnahm|FE8|FFLeihfristberschreitung|FG1.00|CG521111|FA1.00|FB830$34278992|FC08.12.2014|FDLe Corbusier - Pavillon Suisse: the biography o/Zaknic, Ivan|FE8|FFLeihfristberschreitung|FG1.00|AY3AZ8EA3')
34+
#x = mySip.sip_hold_response('???')
35+
#x = mySip.sip_item_information_response('1803000120160511 071022CF0|AB830$23487118|AJ17.2004: Marine structures|AQMAG|AY6AZE9B7')
36+
#x = mySip.sip_item_status_update_response('???')
37+
#x = mySip.sip_login_response('941AY1AZFDFC')
38+
#x = mySip.sip_patron_enable_response('???')
39+
#x = mySip.sip_patron_information_response('64 00320160511 084442000000000000 0000AOTUB HH|AA08300076190|AEMalte Baesler|BLY|CQY|BHEUR|BV0.00|[email protected]|AY6AZD946')
40+
#x = mySip.sip_patron_status_response('???')
41+
#x = mySip.sip_renew_response('300NUU20080228 222232AOWOHLERS|AAX00000241|ABM02400028262|AJFolksongs of Britain and Ireland|AH5/23/2008,23:59|CH|AFOverride required to exceed renewal limit.|AY1AZCDA5')
42+
#x = mySip.sip_renew_all_response('???')
43+
#x = mySip.sip_sc_status_response('98YYYYNN90099920160511 0605582.00AOTUB HH|AMTUHH |BXYYYNYYYYYYYNNNYY|SVGossip gossip-1.1.2; scala-Version: 2.11.8; sbt-Version: 0.13.11; built: Mon Apr 18 23:18:00 CEST 2016|AY2AZC870')
44+
#pp.pprint(x)
45+
"""

sip2/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)