Skip to content

Commit 7e22e65

Browse files
author
hacklab
committed
Utility to print list of barcodes#
1 parent 77a6ef8 commit 7e22e65

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

createbarcodeimages.pl

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
use database;
2+
use Data::Dumper;
3+
4+
#print Dumper(database::getPersonList());
5+
6+
print "
7+
<html>
8+
9+
<head>
10+
<title>
11+
Barcodes
12+
</title>
13+
14+
</head>
15+
16+
<body>
17+
To recreate, run the following on galahad. <p>
18+
cd /home/hacklab/barcodescanner<p>
19+
perl createbarcodeimages.pl >list.html<p>
20+
21+
<table>
22+
";
23+
24+
my %barcodes = %{database::getPersonList()};
25+
26+
for my $barcode (keys(%barcodes))
27+
{
28+
$barcode =~ s/\s//g;
29+
my $filename = "images/$barcode.png";
30+
31+
print "<tr><td><img src='$filename'/></td><td>$barcode - " .$barcodes{$barcode} ."</td></tr> ";
32+
if (! -e $filename)
33+
{
34+
`barcodegen $barcode --border=5 --height=60 --write $filename`;
35+
}
36+
else
37+
{
38+
39+
}
40+
}
41+
42+
43+
44+
print "</table></body></html>";
45+

0 commit comments

Comments
 (0)