-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathbibWeb.pl
More file actions
executable file
·40 lines (36 loc) · 842 Bytes
/
bibWeb.pl
File metadata and controls
executable file
·40 lines (36 loc) · 842 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/usr/bin/perl
# Script: bibWeb.pl
# Description:
# Author: Steven Ahrendt
# email: sahrendt0@gmail.com
# Date: 05.26.2015
##################################
use warnings;
use strict;
use Getopt::Long;
use lib '/rhome/sahrendt/Scripts';
#####-----Global Variables-----#####
my $input;
my ($help,$verb);
GetOptions ('i|input=s' => \$input,
'h|help' => \$help,
'v|verbose' => \$verb);
my $usage = "Usage: bibWeb.pl -i input\n\n";
die $usage if $help;
die "No input.\n$usage" if (!$input);
#####-----Main-----#####
open(IN,"<",$input) or die "Can't\n";
while(my $line = <IN>)
{
chomp $line;
my($code,$site,$tex) = split(/\t/,$line);
print '@online{'.$code.',
author = {},
title = {'.$code.' source},
url = {'.$site.'}
}'."\n";
}
close(IN);
warn "Done.\n";
exit(0);
#####-----Subroutines-----#####