diff options
| author | Frans Kaashoek <kaashoek@Frans-Kaashoeks-MacBook-Pro.local> | 2011-07-27 20:49:45 -0400 | 
|---|---|---|
| committer | Frans Kaashoek <kaashoek@Frans-Kaashoeks-MacBook-Pro.local> | 2011-07-27 20:49:45 -0400 | 
| commit | dccb915282854476ce47752df6631dcce3b8f661 (patch) | |
| tree | a84aa8ed35618f99c3d7e8cdd466d22ae7bad597 /web/mkhtml | |
| parent | 9acdfe0d04f3fcf95c6e392e08afb45bdfe16c20 (diff) | |
| parent | 13a96baefc0ff5d8262c4bc8c797bee4b157443c (diff) | |
| download | xv6-labs-dccb915282854476ce47752df6631dcce3b8f661.tar.gz xv6-labs-dccb915282854476ce47752df6631dcce3b8f661.tar.bz2 xv6-labs-dccb915282854476ce47752df6631dcce3b8f661.zip | |
Merge commit 'origin/master' into page
Diffstat (limited to 'web/mkhtml')
| -rwxr-xr-x | web/mkhtml | 70 | 
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!\–!g; -$text =~ s!\[([^\[\]|]+) \| ([^\[\]]+)\]!<a href="$1">$2</a>!g; -$text =~ s!\[([^ \t]+)\]!<a href="$1">$1</a>!g; - -$text =~ s!``!\“!g; -$text =~ s!''!\”!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 | 
