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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
|
#!/usr/local/bin/perl -w
# ***
# *** CGI script: static PDOS publication list
# *** Eddie Kohler, June 10, 1999
# ***
# *** Take a look at PDOSBib.pm
# *** to change things like people's URLs
# *** and how different bibliography entries are generated
# ***
# *** Take a look at PDOSCGI.pm
# *** to change where files are located
# ***
#use lib '/home/am0/httpd/htdocs/pdosbib';
use BibTeX;
use PDOSBib;
use PDOSCGI;
sub do_entries () {
my($section, $key, $d);
foreach $section (@sections) {
# print section header
print '<h3><a name="', url_untranslate($section), '">';
print $section, "</a></h3>\n";
print "<ul class=\"expand\">\n";
# print all papers in that section
foreach $key (@{$e->{'_'}}) {
$d = BibTeX::expand($e, $key);
next if dont_print($d) || $d->{'www_section'} ne $section;
print htmlize_entry $d;
}
print "</ul>\n";
}
}
sub do_sections () {
foreach $section (@sections) {
print '<p class="l2"><a href="#', url_untranslate($section);
print '">', $section, "</a></p>\n";
}
}
# main program
if (@ARGV > 0) {
open(BIB, $ARGV[0]) || die "can't open $ARGV[0]";
} else {
open(BIB, "<&STDIN");
}
$e = BibTeX::parse(*BIB, %initial_strings);
close BIB;
if (@ARGV > 1) {
open(STDOUT, ">$ARGV[1]") || die "can't open $ARGV[1]";
}
# make sections
@sections = ();
foreach $key (@{$e->{'_'}}) {
next if dont_print($e->{$key});
$section = $e->{$key}->{'www_section'};
if (not $section) {
$e->{$key}->{'www_section'} = $section = "Miscellaneous";
}
if (!exists $sections{$section}) {
push @sections, $section if $section ne '';
$sections{$section} = 1;
}
}
push @sections, 'Miscellaneous'
if $sections{''} && !$sections{'Miscellaneous'};
## PRINT STUFF!
$argv_string = join(' ', 'mkpdospubs.pl', @ARGV);
print <<"EOD;";
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<!-- *** I AM MACHINE GENERATED! DO NOT EDIT ME!
-- *** EDIT THE .bib FILE INSTEAD!
--
-- Generated by `$argv_string'
-- (c) Eddie Kohler 1999-2000 -->
<title>Anonymity Bibliography</title>
<link rel="stylesheet" type="text/css" href="main.css">
<link rel="stylesheet" type="text/css" href="pubs.css">
</head>
<body bgcolor="#ffffff" text="#000000" link="#bb0000" vlink="#990099"
alink="#ff9900" marginheight="0" marginwidth="0">
<table cellspacing="0" cellpadding="0" border="0" align="center">
<!--
<tr valign="top">
<td rowspan="5" width="134"><div align="right"><a href="/"><img
src="/img/pdostab.gif" width="134" height="61" border="0"
alt="PDOS Home"></a></div></td>
<td rowspan="5" width="1" bgcolor="#92a6a4"><img src="/img/emptydot.gif"
width="1" height="1" alt=""></td>
<td bgcolor="#ffffcc"><p><br></p></td>
<td bgcolor="#ffffcc"><p><br></p></td>
<td bgcolor="#ffffcc"><p><br></p></td>
<td rowspan="3" width="8" bgcolor="#ffffcc"><img src="/img/emptydot.gif"
width="8" height="1" alt=""></td>
<td rowspan="3" width="1" bgcolor="#92a6a4"><img src="/img/emptydot.gif"
width="1" height="1" alt=""></td>
</tr>
<tr valign="top">
<td bgcolor="#ffffcc"><p> <a href="http://web.mit.edu/">MIT</a> > <a href="http://www.lcs.mit.edu/">LCS</a> > <a href="/">PDOS Home</a> > </p></td>
<td bgcolor="#ffffcc"><p><b>Publications</b> > </p></td>
<td bgcolor="#ffffcc"><p><b>By subject</b></p></td>
</tr>
<tr valign="top">
<td bgcolor="#ffffcc"><p><br></p></td>
<td bgcolor="#ffffcc"><p class="crumbbreadth">
<a href="projects.html">Projects</a><br>
<a href="people.html">People</a><br>
<a href="software.html">Software</a></p></td>
<td bgcolor="#ffffcc"><p class="crumbbreadth">
<a href="/cgi-bin/pubs-date.cgi">By date</a></p></td>
</tr>
<tr valign="top">
<td colspan="2" height="8" bgcolor="#ffffcc"><img src="/img/emptydot.gif"
width="1" height="8" alt=""></td>
<td colspan="1" height="8" bgcolor="#ffffcc"><img src="/img/emptydot.gif"
width="100" height="8" alt=""></td>
<td colspan="2" rowspan="2" width="9" height="9" bgcolor="#ffffcc"><img
src="/img/whitecorner.gif" width="9" height="9" alt=""></td>
</tr>
<tr valign="top">
<td colspan="3" height="1" bgcolor="#92a6a4"><img src="/img/emptydot.gif"
width="1" height="1" alt=""></td>
</tr>
</table>
-->
<h1 align="center">Anonymity bibliography</h1>
<p align="center">By subject | <a href="/cgi-bin/pubs-date.cgi">By date</a></p>
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<tr valign="top">
<td width="10%" height="24"><br></td>
</tr>
<tr valign="top">
<td><div align="right">
<table cellspacing="0" cellpadding="0" border="0" width="161">
<tr valign="top">
<td rowspan="6" width="8"><img src="/img/emptydot.gif"
width="8" height="1" alt=""></td>
<td colspan="4" height="1" bgcolor="#92a6a4"><img src="/img/emptydot.gif"
width="1" height="1" alt=""></td>
</tr>
<tr valign="top">
<td rowspan="5" width="1" bgcolor="#92a6a4"><img src="/img/emptydot.gif"
width="1" height="1" alt=""></td>
<td bgcolor="#ccffff"><p class="l1"><br><form action="/cgi-bin/pubs-date.cgi"
method="get"><strong>Publication search:</strong><br>
<small><input type=entry name=match size=15> <input type=submit
value="Go"><br></small></form></p></td>
<td width="8" bgcolor="#ccffff"><img src="/img/emptydot.gif"
width="8" height="1" alt=""></td>
<td rowspan="3" width="1" bgcolor="#92a6a4"><img src="/img/emptydot.gif"
width="1" height="1" alt=""></td>
<td rowspan="3" width="12"><img src="/img/emptydot.gif"
width="12" height="1" alt=""></td>
</tr>
<tr valign="top">
<td colspan="2" height="1" bgcolor="#92a6a4"><img src="/img/emptydot.gif"
width="1" height="1" alt=""></td>
</tr>
<tr valign="top">
<td bgcolor="#ccffff"><p class="l1"><br><form action="/cgi-bin/pubs-date.cgi"
method="get"><strong>Subjects:</strong><br>
EOD;
## PRINT SECTIONS
do_sections;
print <<"EOD;";
</p></td>
<td width="8" bgcolor="#ccffff"><img src="/img/emptydot.gif"
width="8" height="1" alt=""></td>
</tr>
<tr valign="top">
<td height="8" bgcolor="#ccffff"><img src="/img/emptydot.gif"
width="1" height="8" alt=""></td>
<td colspan="2" rowspan="2" width="9" height="9" bgcolor="#ccffff"><img
src="/img/whitecorner.gif" width="9" height="9" alt=""></td>
</tr>
<tr valign="top">
<td height="1" bgcolor="#92a6a4"><img src="/img/emptydot.gif"
width="1" height="1" alt=""></td>
</tr>
</table>
</div></td>
<td width="75%">
<h2>Publications by subject</h2>
EOD;
## PRINT ENTRIES
do_entries;
print <<"EOD;";
</td>
<td width="15%"><br></td>
</tr>
</table>
</body>
</html>
EOD;
|