From 6bf41292c1807437ec7472f7957227f6736109b0 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Fri, 8 Jun 2012 14:01:09 -0400 Subject: Why are we still carrying the old perl scripts around? --- perl-v2/PDOSBib.pm | 233 ----------------------------------------------------- 1 file changed, 233 deletions(-) delete mode 100644 perl-v2/PDOSBib.pm (limited to 'perl-v2/PDOSBib.pm') diff --git a/perl-v2/PDOSBib.pm b/perl-v2/PDOSBib.pm deleted file mode 100644 index 013cfbe..0000000 --- a/perl-v2/PDOSBib.pm +++ /dev/null @@ -1,233 +0,0 @@ -package main; - -# maps regexps, which are applied to authors, to their home page URLs -@author_urls = - ( - 'Berthold' => 'http://page.inf.fu-berlin.de/~berthold/', - 'Chaum' => 'http://www.chaum.org', - 'Dingledine' => 'http://www.freehaven.net/~arma/cv.html', - 'Desmedt' => 'http://www.cs.fsu.edu/~desmedt/', - 'Jakobsson' => 'http://www.cs.ucsd.edu/users/markus/', - 'K.*Kurosawa' => 'http://kuro.cis.ibaraki.ac.jp/~kurosawa/', - 'Mathewson' => 'http://www.wangafu.net/~nickm/', - 'Mazières' => 'http://www.scs.cs.nyu.edu/~dm/', - 'A.*Pfitzmann' => 'http://dud.inf.tu-dresden.de/~pfitza/', - 'B.*Pfitzmann' => 'http://www.zurich.ibm.com/~bpf/', - 'Rivest' => 'http://theory.lcs.mit.edu/~rivest/', - 'Serjantov' => 'http://www.cl.cam.ac.uk/users/aas23/', - 'Syverson' => 'http://www.syverson.org/', - 'David.*Wagner' => 'http://www.cs.berkeley.edu/~daw/', - 'Shoup' => 'http://www.shoup.net/', - 'B.*Möller' => 'http://www.informatik.tu-darmstadt.de/TI/Mitarbeiter/moeller.html', - - -# From the old PDOS file... - 'Engler' => 'http://www.pdos.lcs.mit.edu/~engler/', - 'Kaashoek' => 'http://www.pdos.lcs.mit.edu/~kaashoek/', - 'Blake' => 'http://www.pdos.lcs.mit.edu/cb/', - - 'Ganger' => 'http://www.ece.cmu.edu/~ganger/', - 'Grimm' => 'http://www.cs.washington.edu/homes/rgrimm/', - 'Hsieh' => 'http://www2.cs.utah.edu/~wilson/', - 'Briceño' => 'http://mit.edu/hbriceno/www/', - 'Wallach' => 'http://www.pdos.lcs.mit.edu/~kerr/', - 'Candea' => 'http://www.cs.stanford.edu/~candea/', - 'Kohler' => 'http://www.pdos.lcs.mit.edu/~eddietwo/', - 'Kirk.*Johnson' => 'http://www.cs.colorado.edu/~tuna/', - 'Weihl' => 'http://www.research.digital.com/SRC/staff/weihl/', - 'Nygren' => 'http://www.mit.edu/people/nygren/', - 'Anthony.*Joseph' => 'http://www.cs.berkeley.edu/~adj/', - 'Poletto' => 'http://www.pdos.lcs.mit.edu/~maxp/', - 'Kaminsky' => 'http://www.pdos.lcs.mit.edu/~kaminsky/', - 'Morris' => 'http://www.pdos.lcs.mit.edu/~rtm/', - 'Jannotti' => 'http://www.jannotti.com/', - 'Benjie' => 'http://www.pdos.lcs.mit.edu/~benjie/', - 'Jinyang' => 'http://www.pdos.lcs.mit.edu/~jinyang/', - 'Douglas.*outo' => 'http://www.pdos.lcs.mit.edu/~decouto/', - 'Kevin.*Fu' => 'http://snafu.fooworld.org/~fubob/', - 'Karger' => 'http://theory.lcs.mit.edu/~karger/', - 'Dabek' => 'http://pdos.lcs.mit.edu/~fdabek/', - 'Brunskill' => 'http://pdos.lcs.mit.edu/~emma/', - 'Balakrishnan' => 'http://nms.lcs.mit.edu/~hari/', - 'Stoica' => 'http://www.cs.berkeley.edu/~istoica/', - 'Andersen' => 'http://nms.lcs.mit.edu/~dga/', - 'Snoeren' => 'http://nms.lcs.mit.edu/~snoeren/', - 'Freedman' => 'http://www.pdos.lcs.mit.edu/~mfreed/', - 'Emil.*Sit' => 'http://www.mit.edu/~sit/', - 'Nick.*Feamster' => 'http://nms.lcs.mit.edu/~feamster/', - ); - -# don't print entries for these types, which are only used for crossreferences -%dont_print = - ('proceedings' => 1, 'journal' => 1); - -%initial_strings = - ('jan' => 'January', 'feb' => 'February', - 'mar' => 'March', 'apr' => 'April', - 'may' => 'May', 'jun' => 'June', - 'jul' => 'July', 'aug' => 'August', - 'sep' => 'September', 'oct' => 'October', - 'nov' => 'November', 'dec' => 'December'); - - -sub dont_print ($) { - my($d) = @_; - $dont_print{$d->{'_type'}} || - ($d->{'www_show'} && ($d->{'www_show'} eq 'no')); -} - -sub htmlize ($) { - my($x) = @_; - $x =~ s/&([^a-z0-9])/&$1/g; - $x =~ s/\\i([^a-zA-Z@])/i$1/g; - $x =~ s/\\'(.)/&$1acute;/g; - $x =~ s/\\`(.)/&$1grave;/g; - $x =~ s/\\~(.)/&$1tilde;/g; - $x =~ s/\\\^(.)/&$1circ;/g; - $x =~ s/\\"(.)/&$1uml;/g; - $x =~ s/\\[a-zA-Z@]+//g; - $x =~ s/\\.//g; - $x =~ tr/{}//d; - $x =~ s/(\d)--(\d)/$1-$2/g; - $x; -} - -sub htmlize_author ($) { - my($aaa) = @_; - my($x) = join(' ', @{$aaa->[0]}, @{$aaa->[1]}, @{$aaa->[2]}); - if (@{$aaa->[3]}) { - $x .= ', ' . join(' ', @{$aaa->[3]}); - } - htmlize($x); -} - -sub push_availability ($$\@$) { - my($d, $key, $availability, $name) = @_; - if ($d->{$key}) { - my($url) = $d->{$key}; - $url = $server_url . $url if $url =~ /^\//; - push @$availability, '' . $name . ''; - } -} - -sub htmlize_biblio_info ($) { - my($d) = @_; - my($_type) = $d->{'_type'}; - my($x, $i); - - if ($_type eq 'inproceedings') { - $x = "In the " . $d->{'booktitle'}; - if ($d->{'bookurl'}) { - if ($x =~ /^(in the proceedings of( the)? )(.*)/i - || $x =~ /^(in the workshop record of( the)? )(.*)/i) { - $x = $1 . "{'bookurl'}\">" . $3 . ""; - } else { - $x = "In the {'bookurl'}\">$d->{'booktitle'}"; - } - } - $x .= ", " . $d->{'edition'} if $d->{'edition'}; - $x .= ", " . $d->{'address'} if $d->{'address'}; - $x .= ", " . ($d->{'month'} or "") . " " . ($d->{'year'} or "") - if $d->{'month'} || $d->{'year'}; - $x .= ($d->{'pages'} =~ /^\d+$/ ? ", page " : ", pages ") - . $d->{'pages'} if $d->{'pages'}; - - } elsif ($_type eq 'article') { - $x = "In " . $d->{'journal'}; - if ($d->{'journalurl'}) { - $x =~ s/^(in )(.*)$/$1$2<\/a>/; - } - $x .= " " . $d->{'volume'} . "" if $d->{'volume'}; - $x .= "(" . $d->{'number'} . ")" if $d->{'number'}; - $x .= ", " . ($d->{'month'} or "") . " " . ($d->{'year'} or "") - if $d->{'month'} || $d->{'year'}; - $x .= ($d->{'pages'} =~ /^\d+$/ ? ", page " : ", pages ") - . $d->{'pages'} if $d->{'pages'}; - - } elsif ($_type eq 'techreport') { - $x = $d->{'institution'}; - $x .= " " . ($d->{'type'} ? $d->{'type'} : "technical report"); - $x .= " " . $d->{'number'}; - $x .= ", " . $d->{'month'} . " " . $d->{'year'} - if $d->{'month'} || $d->{'year'}; - - } elsif ($_type eq 'mastersthesis' || $_type eq 'phdthesis') { - $x = ($_type eq 'mastersthesis' ? "Master's thesis" : "Ph.D. thesis"); - $x = $d->{'type'} if $d->{'type'}; - $x .= ", " . $d->{'school'} if $d->{'school'}; - $x .= ", " . $d->{'month'} . " " . $d->{'year'} - if $d->{'month'} || $d->{'year'}; - - } elsif ($_type eq 'misc') { - $x = $d->{'howpublished'}; - $x .= ", " . $d->{'month'} . " " . $d->{'year'} - if $d->{'month'} || $d->{'year'}; - $x .= ($d->{'pages'} =~ /^\d+$/ ? ", page " : ", pages ") - . $d->{'pages'} if $d->{'pages'}; - - } else { - $x = "<odd type $_type>"; - } - - $x = '' . ($x or "") . ". "; - $x .= "({'_key'} . "\">BibTeX entry)"; - htmlize($x); -} - -sub htmlize_entry ($) { - my($d) = @_; - my(@availability, @a, $a, $i, $j, $x); - - # print title - $x .= '
  • ' . htmlize($d->{'title'}) . "."; - - # print availability - @availability = (); - push_availability $d, 'www_abstract_url', @availability, 'abstract'; - push_availability $d, 'www_html_url', @availability, 'HTML'; - push_availability $d, 'www_txt_url', @availability, 'TXT'; - push_availability $d, 'www_pdf_url', @availability, 'PDF'; - push_availability $d, 'www_ps_url', @availability, 'PS'; - push_availability $d, 'www_ps_gz_url', @availability, 'gzipped PS'; - if (@availability) { - $x .= ' ('; - $x .= join(', ', @availability) . ")"; - } - $x .= "
    \n"; - - # print authors - $x .= 'by '; - @a = BibTeX::parse_author($d->{'author'}); - foreach $i (0..$#a) { - $x .= ", " if ($i > 0 && $i < $#a); - $x .= " and " if ($i == $#a && $#a == 1); - $x .= ", and " if ($i == $#a && $#a > 1); - $a = htmlize_author($a[$i]); - for ($j = 0; $j < @author_urls; $j += 2) { - if ($a =~ /$author_urls[$j]/) { - $x .= '' . $a . ''; - undef $a; - last; - } - } - $x .= $a if defined $a; - } - $x .= "." if (defined $a and $a !~ /\.$/); - $x .= "
    \n"; - - $x .= htmlize_biblio_info($d); - $x .= "

  • \n\n"; - - $x; -} - - -sub url_untranslate ($) { - my($x) = $_[0]; - $x =~ s/ /+/g; - $x =~ s/([%<>])/sprintf("%02x", chr($1))/eg; - $x; -} - -1; -- cgit v1.2.3-70-g09d2