Posts

Showing posts from April, 2009

Journal club cgi

For our journal club, I wrote a small cgi script that provides a web page where people can dump arxiv.org identifies of papers they are interested in and then everybody can see title, abstract and authours as well as a link to the pdf. You can copy the file to your cgi-bin directory, make it world executable and create a world writeable directory /opt/journal . You might need to install the XML::TreeBuilder module (as root run 'perl -MCPAN -e shell' and then do 'install XML::TreeBuilder'. #!/usr/bin/perl # # Journal club cgi # Written by Robert C. Helling (helling@atdotde.de) # Published under the Gnu Public License (most recent version) # use XML::TreeBuilder; use LWP::Simple; use CGI; my $g = CGI::new(); print "Content-type: text/html\n\n"; my @ids = (); system "touch /opt/journal/numbers"; open (IN,'/opt/journal/numbers') ||die "Cannot open /opt/journal/numbers:$!!";; while( ){ chomp; if(/(\d\d\d\d\.\d\d\d\d)/){ push @ids, $1; }...