Virtual library cards from Library Camp East
Wow, the library camp was such and inspiration. How did John Blyberg create the cards and how can I copy (copy=steal) this idea? I did not want to recreate his entire application but I did love the idea and was wanting to get my feet wet. So where to start. I downloaded and installed the GD.pm for perl. I then took a look at his blog and copied the jpeg of the blank card. Since I was using Unix I then used GIMP and converted it to a .png. I then wrote a simple script to see if I could write text to this image and then output it to another .png file.
#!/usr/bin/perl
############################################################
# Program : test.pl
# Programmer : Sean Robinson
# Description : Proof of concept on using GD.pm to write to a lib card
# Date : 9.26.2006
############################################################
use GD;
# create image object
$myImage = newFromPng GD::Image(‘card.png’);
$black = $myImage->colorClosest(0,0,0);
$myImage->string(gdLargeFont,100,10,”Library Camp East”,$black);
$myImage->string(gdSmallFont,100,35,”A place where people and idea meet”,$black);
$png_data = $myImage->png;
binmode(STDOUT);
print $png_data;
### End of code
At the shell prompt
#./test.pl > hold.png
This runs the program and outputs to hold.png
# display hold.png
This uses the program display to show the .png file
![]()
![]()
Ok no problem. The next step is to use the sirsi api to get the top 10 circulating books and create 10 library cards on the fly. That will have to wait for tomorrow.
No comments yet.
Leave a comment
-
Recent
- My site has moved
- More sook
- Sook continued
- IT Management ideas in libraries
- Sook amazon and ajax
- Amzamash
- Using Sirsi API to get ISBN numbers
- Playing with Amazon’s Web Services and Perl
- Virtual library cards from Library Camp East
- Library Camp East Topics
- Morning of Library Camp East
- Library Camp East
-
Links
-
Archives
- January 2009 (1)
- January 2007 (1)
- November 2006 (4)
- October 2006 (2)
- September 2006 (3)
- December 2005 (1)
-
Categories
-
RSS
Entries RSS
Comments RSS