summaryrefslogtreecommitdiff
path: root/web/mkhtml
diff options
context:
space:
mode:
authorRuss Cox <[email protected]>2011-02-19 10:36:14 -0500
committerRuss Cox <[email protected]>2011-02-19 10:36:14 -0500
commit97b21b5838759e71144d02ff554f594c56fe54ae (patch)
treeff703b3f7a1b76846446f347f7f05b714aa9b45c /web/mkhtml
parent08864affaab14743b59b83f6985dad03545a6d71 (diff)
downloadxv6-labs-97b21b5838759e71144d02ff554f594c56fe54ae.tar.gz
xv6-labs-97b21b5838759e71144d02ff554f594c56fe54ae.tar.bz2
xv6-labs-97b21b5838759e71144d02ff554f594c56fe54ae.zip
xv6: refresh from 2010 page
Diffstat (limited to 'web/mkhtml')
-rwxr-xr-xweb/mkhtml70
1 files changed, 0 insertions, 70 deletions
diff --git a/web/mkhtml b/web/mkhtml
deleted file mode 100755
index 74987e6..0000000
--- a/web/mkhtml
+++ /dev/null
@@ -1,70 +0,0 @@
-#!/usr/bin/perl
-
-my @lines = <>;
-my $text = join('', @lines);
-my $title;
-if($text =~ /^\*\* (.*?)\n/m){
- $title = $1;
- $text = $` . $';
-}else{
- $title = "Untitled";
-}
-
-$text =~ s/[ \t]+$//mg;
-$text =~ s/^$/<br><br>/mg;
-$text =~ s!\b([a-z0-9]+\.(c|s|pl|h))\b!<a href="src/$1.html">$1</a>!g;
-$text =~ s!^(Lecture [0-9]+\. .*?)$!<b><i>$1</i></b>!mg;
-$text =~ s!^\* (.*?)$!<h2>$1</h2>!mg;
-$text =~ s!((<br>)+\n)+<h2>!\n<h2>!g;
-$text =~ s!</h2>\n?((<br>)+\n)+!</h2>\n!g;
-$text =~ s!((<br>)+\n)+<b>!\n<br><br><b>!g;
-$text =~ s!\b\s*--\s*\b!\&ndash;!g;
-$text =~ s!\[([^\[\]|]+) \| ([^\[\]]+)\]!<a href="$1">$2</a>!g;
-$text =~ s!\[([^ \t]+)\]!<a href="$1">$1</a>!g;
-
-$text =~ s!``!\&ldquo;!g;
-$text =~ s!''!\&rdquo;!g;
-
-print <<EOF;
-<!-- AUTOMATICALLY GENERATED: EDIT the .txt version, not the .html version -->
-<html>
-<head>
-<title>$title</title>
-<style type="text/css"><!--
-body {
- background-color: white;
- color: black;
- font-size: medium;
- line-height: 1.2em;
- margin-left: 0.5in;
- margin-right: 0.5in;
- margin-top: 0;
- margin-bottom: 0;
-}
-
-h1 {
- text-indent: 0in;
- text-align: left;
- margin-top: 2em;
- font-weight: bold;
- font-size: 1.4em;
-}
-
-h2 {
- text-indent: 0in;
- text-align: left;
- margin-top: 2em;
- font-weight: bold;
- font-size: 1.2em;
-}
---></style>
-</head>
-<body bgcolor=#ffffff>
-<h1>$title</h1>
-<br><br>
-EOF
-print $text;
-print <<EOF;
-</body>
-</html>
-EOF