Re: [CODE4LIB] perl question

2008-01-22 Thread James M. Gilbert
Edward,

I don't see any problems staring at me, operating system is constant across
the old and new servers?


James M. Gilbert
Systems Librarian
Whitehall Township Public Library
3700 Mechanicsville Road
Whitehall, PA 18052
610-432-4339

-Original Message-
From: Code for Libraries [mailto:[EMAIL PROTECTED] On Behalf Of
Iglesias, Edward G. (Library)
Sent: Tuesday, January 22, 2008 2:54 PM
To: CODE4LIB@listserv.nd.edu
Subject: [CODE4LIB] perl question

Okay,  I should be able to solve this on my own but I can't.  I've had to
move to a new web server and can't get an old script to work.  All it does
is convert a fund activity report to a web page.  It worked fine on the old
server.  I updated the directory paths and checked permissions.
All are fine.  What's more I don't get an error.  It just works and returns
nothing.  Any help would be appreciated.

EI



#!/usr/bin/perl
## usage: cat inputfile | abiglobal.pl



$i=0;
while ($_ = STDIN) {

if(/(FUND ACTIVITY REPORT)/ ) {

$input=$_;
chop($input);
$fundcode=substr($input,0,5);
$fundcode=~ s/ //g;
$input=~ tr/\//;
$input=~ tr/\'//;
#   $input=~ tr/,/\t/;
$input=~s/REPORT,/REPORT  /g;
$input=~s/   /  /g;
@in=split(/  /,$input);

#   @fund=$in[0];

if($i==0){
$final=$in[3]..html;
open (OUT,body.txt) || die I am not able to write to file;
open (HEAD,head.txt) || die not able to open temp header;
print HEAD HTMLHEADTITLEFund Activity
Report/TITLE/HEADBODYTABLE border=1trtdstrongFund Activity
Reports:   $in[3]/strong/td/trTRtd valign='top'a
href='#$fundcode'$fundcode/anbsp;\n;
$i=99;
}
print HEAD a href='#$fundcode'$fundcode/anbsp;\n;
print OUT stronga name='$fundcode'Fund: u$in[0]/u
/aFundInfo: u$in[1] $in[2]/u/strongbr\n;

}
else {
print OUT pre$_/pre\n;
}


}  end while stdin
print HEAD /td/tr/tablebrbr\n; print OUT /body/html\n;
close OUT; close HEAD;

#$outfile=~tr/ /_/;
#$outfile=~tr/,/_/;
print $outfile\n;
system cat head.txt body.txt  /data/www/htdocs/fundlist/$final;
system rm head.txt;
system rm body.txt;

opendir(DIR, /public_html);
open (OUT, /data/www/htdocs/fundlist/index.html) || die I am not
able to write to file; print OUT (HTMLHEADTITLEFund List
Directory/TITLE/HEADBODY\n);
print OUT (h4Directory Listing/h4\n);

while($file = readdir(DIR) ) {

print OUT (A HREF=\$file\$filebr\n);

}
print OUT (/body/html\n);
closedir(DIR);
close (OUT);


Edward Iglesias
Systems Librarian
Central Connecticut State University
860.832.2082


Re: [CODE4LIB] free movie cover images?

2008-05-19 Thread James M. Gilbert
Haven't tried any of this...

http://www.trynt.com/trynt-movie-imdb-api/

James M. Gilbert
Systems Librarian
Whitehall Township Public Library
3700 Mechanicsville Road
Whitehall, PA  18052
610-432-4339
[EMAIL PROTECTED]
http://whitehall.lib.pa.us


-Original Message-
From: Code for Libraries [mailto:[EMAIL PROTECTED] On Behalf Of Ken
Irwin
Sent: Monday, May 19, 2008 10:39 AM
To: CODE4LIB@LISTSERV.ND.EDU
Subject: [CODE4LIB] free movie cover images?

Hi folks,

With some limitations, the Google Books API allows folks to access book
covers for free. (How's that working out? Anyone having luck with it?)
-- what about movie/DVD/VHS covers? Are there any free sources for those
images?

I'd like to work up a virtual-browsing interface for our library's
pretty small collection of feature films, and I'd love to include
covers. Any ideas on how I might get them? Anyone else doing this?

Thanks
Ken

--
Ken Irwin
Reference Librarian
Thomas Library, Wittenberg University