Changes in directory llvm-www:
developers.cgi added (r1.1) developers.txt added (r1.1) --- Log message: First attempt to automate the developers page. --- Diffs of the changes: (+194 -0) developers.cgi | 177 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ developers.txt | 17 +++++ 2 files changed, 194 insertions(+) Index: llvm-www/developers.cgi diff -c /dev/null llvm-www/developers.cgi:1.1 *** /dev/null Mon Oct 24 20:03:46 2005 --- llvm-www/developers.cgi Mon Oct 24 20:03:36 2005 *************** *** 0 **** --- 1,177 ---- + #!/usr/bin/perl -w + + + my $Folder = "/Volumes/Big2/llvm/llvm-www/"; + + # + # CopyInclude - Copy the contents of an include file to page. + # + sub CopyInclude { + (my $file_name) = @_; + + if (open(INCLUDE, "<".$file_name)) { + while ($include = <INCLUDE>) { + print $include; + } + close INCLUDE; + } else { + print "Could not open file '$file_name' for reading!\n"; + exit; + } + } + + # + # Prolog - Issue all text prior to table. + # + sub Prolog { + # Issue the include prolog + CopyInclude($Folder."header.incl"); + + # Issue the table prolog + print <<EOD + <div class="www_sectiontitle">Meet The LLVM Developers</div> + + <p>The developers of LLVM have a variety of backgrounds and interests. This page + provides links to each developer's home page (or LLVM page if they have one). + If you'd like to get a link added to this page, email or contact us!</p> + + <center> + <table cellpadding=2 cellspacing=3 border=0> + <tr align=center> + <td><b>Name</b></td> + <td><b>Picture</b></td> + <td rowspan=9> </td> + <td><b>Name</b></td> + <td><b>Picture</b></td> + </tr> + EOD + ; + } + + # + # Epilog - Issue all text after table. + # + sub Epilog { + # Issue the table epilog + print <<EOD + </table> + </center> + EOD + ; + + # Issue the include epilog + CopyInclude($Folder."footer.incl"); + } + + # Start the html page + print "Content-type: text/html\n\n"; + + # Issue the page prolog + Prolog; + + # Open the developer data file + if (!open(DEVELOPERS, "<".$Folder."developers.txt")) { + print "Could not open file 'developers.txt' for reading!\n"; + exit; + } + + # Iterate though all developer data + my %Developers = (); + my @Fullnames = (); + my %Person = (); + + while (my $Line = <DEVELOPERS>) { + # Clean up line + chomp $Line; + # Skip blank lines + next if $Line =~ /^\s*$/; + + # Split out firstname surname and parameters + if ($Line =~ /\s*(\w+)\s+(\w+)\s+(.*)$/) { + my ($Name, $Surname,$Rest) = ($1, $2, $3); + # Create sorting name + my $Fullname = $Name.", ".$Surname; + # Construct developer record + my %Developer = ( name => $Name, surname => $Surname ); + # Break down parameters + my @Params = split(/\s+/, $Rest); + + # For each parameter + for my $Param (@Params) { + # Break out key and value + if ($Param =~ /^\s*(\w+)\s*=\s*(\S*)\s*/) { + my ($Key, $Value) = ($1, $2); + # Add parameter to developer record + $Developer{$Key} = $Value; + } else { + # Error + print "Unrecognized developer parameter: $Param\n"; + exit; + } + } + + # Add developer to database + $Developers{$Fullname} = {%Developer}; + # Add sort name to sort array + push @Fullnames, $Fullname; + } else { + # Error + print "Unrecognized developer record\n"; + print $Line."\n"; + exit; + } + } + + # Close the developer data file + close DEVELOPERS; + + # Sort names + @Fullnames = sort @Fullnames; + + # Track column + my $Column = 0; + + # For each developer in sorted order + for my $Fullname (@Fullnames) { + # Extract fields + my $Name = $Developers{$Fullname}{name}; + my $Surname = $Developers{$Fullname}{surname}; + my $HRef = $Developers{$Fullname}{href}; + my $Image = $Developers{$Fullname}{img}; + my $Width = $Developers{$Fullname}{width}; + my $Height = $Developers{$Fullname}{height}; + my $Alt = $Developers{$Fullname}{alt}; + + print " <tr align=center>\n" if $Column == 0; + print " <td>\n"; + print " <a href=\"$HRef\">\n" if (defined $HRef); + print " $Name $Surname\n"; + print " </a>\n" if (defined $HRef); + print " </td>\n"; + + print " <td>\n"; + print " <a href=\"$HRef\">\n" if (defined $HRef); + print " <img src=\"img/$Image\""; + print " width=\"$Width\"" if defined $Width; + print " height=\"$Height\"" if defined $Height; + print " alt=\"$Alt\"" if defined $Alt; + print " title=\"$Alt\"" if defined $Alt; + print ">\n"; + print " </a>\n" if (defined $HRef); + print " </td>\n"; + + print " </tr>\n" if $Column == 1; + $Column = $Column ^ 1; + } + + # Clean up if odd number of developers + if ($Column == 1) { + print " <td>\n"; + print " </td>\n"; + print " </tr>\n"; + } + + # Issue the table epilog + Epilog; + + exit; Index: llvm-www/developers.txt diff -c /dev/null llvm-www/developers.txt:1.1 *** /dev/null Mon Oct 24 20:03:48 2005 --- llvm-www/developers.txt Mon Oct 24 20:03:36 2005 *************** *** 0 **** --- 1,17 ---- + Vikram Adve href=http://www-sal.cs.uiuc.edu/~vadve/ img=PhotoVikram.jpg width=120 height=120 alt=vadve + Henrik Bach href=mailto:[EMAIL PROTECTED] img=PhotoHenrik.jpg width=172 height=219 alt=Henrik + Nate Begeman href=http://sampo.lasthome.net/ img=PhotoNate.jpg width=160 height=130 alt=Sampo + Rob Bocchino img=PhotoRob.jpg width=140 height=187 alt=Rob + Misha Brukman href=http://misha.brukman.net/code/llvm/ img=PhotoMisha.png width=175 height=198 alt=Misha + Jeff Cohen href=http://jolt-lang.org/ img=PhotoJeffCohen.jpg width=165 height=134 alt=jeffc + John Criswell href=http://www.bigw.org/~jcriswel/ img=PhotoJohn.gif width=76 height=76 alt=Dogbert + Alkis Evlogimenos href=http://alkis.evlogimenos.com img=PhotoAlkis.jpg width=200 height=170 alt=alkis + Brian Gaeke href=http://netfiles.uiuc.edu/gaeke/www/ img=PhotoBrian.png width=155 height=163 alt=brg + Brad Jones href=http://www.nondot.org/~kungfoomaster/ img=PhotoBrad.jpg width=200 height=171 alt=KungFooMaster + Jim Laskey href=mailto:[EMAIL PROTECTED] img=PhotoJim.jpg width=128 height=128 alt=Wickund + Chris Lattner href=http://nondot.org/sabre/LLVMNotes/ img=PhotoChris.jpg width=150 height=152 alt=Sabre + Tanya Lattner href=http://nondot.org/tonic/ img=PhotoTanya.jpg width=200 height=217 alt=tonic + Andrew Lenharth href=http://www.lenharth.org/~andrewl/ img=PhotoAndrew.jpg width=140 height=177 alt=Andrew + Duraid Madina href=http://kinoko.c.u-tokyo.ac.jp/~duraid/llvm.html img=PhotoDuraid.jpg width=138 height=195 alt=camel_ + Reid Spencer href=http://illuvium.net/rspencer/ img=PhotoReid.jpg width=145 height=172 alt=Reid + Bill Wendling href=http://www.isanbard.org/~wendling/ img=PhotoBill.jpg width=173 height=240 alt=Bill _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits