Jabber Bot for Centrifuge
Hi, if you stumbled upon this page, please note that it concerns the deprecated library management system Centrifuge. Since it is no longer in active use, the following content is probably not relevant to you and only remains for reference.
Today I started experimenting with Python and xmpppy to create a simple bot that does queries to the mysql database used by Centrifuge.
You can ask it to search for a string or return the details of an item if you specify the barcode number.
Example 1: search revolution india
>>prints a list of all matching items, as well as how many that were
Example 2: barcode 1234567
>>prints out all "main" fields
Example 3: help
>>shows you all possible commands
Example 4: cookies
>>tells you that the CMC-Bot loves cookies.
It works rather well, except that it seems to crash at certain intervals (about 30 to 60 minutes) with the error "sslerror: (8, 'EOF occurred in violation of protocol')". Until that is fixed I won't be able to deploy it but if you want to play with it (and it's not
currently offline) go right ahead - it's currently using my test database dump on my laptop - the JID is cmc@[nolongeravailable].
Pro:
-You can verify directly whether an item is currently checked out or not.
-It's neat.
Contra:
-You can only use this feature while the frontdesk is actually switched on.
So, I definitely need to work a bit more on my knowledge about Python and then implement appropriate exception handling. More to come soon.

