Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
vlion
committed
Mar 19, 2011
1 parent
3207abd
commit f9d1430
Showing
6 changed files
with
1,541 additions
and
1,502 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
# builds docummentation. | ||
all: quicklisp_documentation.html | ||
|
||
|
||
quicklisp_documentation.html: quicklisp_documentation.txt | ||
perl emit-html.pl quicklisp_documentation.txt quicklisp_documentation.html | ||
|
||
release: | ||
rm -f quicklisp_documentation.html | ||
perl emit-html.pl quicklisp_documentation.txt quicklisp_documentation.html | ||
git checkout -m gh-pages | ||
git add quicklisp_documentation.html | ||
git commit -m "Release build" | ||
git checkout master | ||
|
||
clean: | ||
# builds docummentation. | ||
all: quicklisp_documentation.html | ||
|
||
|
||
quicklisp_documentation.html: quicklisp_documentation.txt | ||
perl emit-html.pl quicklisp_documentation.txt quicklisp_documentation.html | ||
|
||
release: | ||
rm -f quicklisp_documentation.html | ||
perl emit-html.pl quicklisp_documentation.txt quicklisp_documentation.html | ||
git checkout -m gh-pages | ||
git add quicklisp_documentation.html | ||
git commit -m "Release build" | ||
git checkout master | ||
|
||
clean: | ||
rm quicklisp_documentation.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,48 @@ | ||
use strict; | ||
use warnings; | ||
|
||
sub trim | ||
{ | ||
my $str = shift; | ||
$str =~ s/^\s+(.*)\s+$/$1/; | ||
} | ||
|
||
my ($input, $output) = @ARGV; | ||
|
||
die("Syntax: perl emit-html.pl $0 infile outfile") unless $input && $output; | ||
|
||
my $fh; | ||
|
||
my $data; | ||
{ | ||
local $/ = undef; | ||
open( $fh, "<", $input) or die($!); | ||
$data = <$fh>; | ||
close $fh; | ||
} | ||
# data has the form name %% systems %% desc %% | ||
#pulls the data in using parallel arrays | ||
my @entries = $data =~ m/(.+?)%% | ||
(.+?)%% | ||
(.+?)%%/msgx; | ||
|
||
#reshape the arrays to be less parallel. | ||
@entries = map { | ||
[ $entries[$_], | ||
$entries[$_+1], | ||
$entries[$_+2]] } (map { $_ * 3 } (0 .. $#entries / 3)); | ||
|
||
open( $fh, ">", $output) or die($!); | ||
# Add in some better html conformance | ||
print $fh "<html>"; | ||
print $fh "<body>"; | ||
print $fh "<table border=1>"; | ||
foreach my $data_ref (@entries) | ||
{ | ||
my ($name, $packages, $desc) = @$data_ref; | ||
print $fh "<tr><td> $name </td><td> $desc </td></tr>\n"; | ||
} | ||
print $fh "</table>\n"; | ||
print $fh "<body>"; | ||
close $fh; | ||
|
||
use strict; | ||
use warnings; | ||
|
||
sub trim | ||
{ | ||
my $str = shift; | ||
$str =~ s/^\s+(.*)\s+$/$1/; | ||
} | ||
|
||
my ($input, $output) = @ARGV; | ||
|
||
die("Syntax: perl emit-html.pl $0 infile outfile") unless $input && $output; | ||
|
||
my $fh; | ||
|
||
my $data; | ||
{ | ||
local $/ = undef; | ||
open( $fh, "<", $input) or die($!); | ||
$data = <$fh>; | ||
close $fh; | ||
} | ||
# data has the form name %% systems %% desc %% | ||
#pulls the data in using parallel arrays | ||
my @entries = $data =~ m/(.+?)%% | ||
(.+?)%% | ||
(.+?)%%/msgx; | ||
|
||
#reshape the arrays to be less parallel. | ||
@entries = map { | ||
[ $entries[$_], | ||
$entries[$_+1], | ||
$entries[$_+2]] } (map { $_ * 3 } (0 .. $#entries / 3)); | ||
|
||
open( $fh, ">", $output) or die($!); | ||
# Add in some better html conformance | ||
print $fh "<html>"; | ||
print $fh "<body>"; | ||
print $fh "<table border=1>"; | ||
foreach my $data_ref (@entries) | ||
{ | ||
my ($name, $packages, $desc) = @$data_ref; | ||
print $fh "<tr><td> $name </td><td> $desc </td></tr>\n"; | ||
} | ||
print $fh "</table>\n"; | ||
print $fh "<body>"; | ||
close $fh; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
# This reads in the quicklisp_package_src.txt and formats in | ||
# placeholders for documentation. | ||
use strict; | ||
use warnings; | ||
|
||
open( my $fh, "<", "quicklisp_package_src.txt") or die($!); | ||
my @arr = <$fh>; | ||
foreach my $line (@arr) | ||
{ | ||
chomp $line; | ||
$line =~ s/\s/ %% /; | ||
$line =~ s/$/ %% INSERT DOCS BETWEEN PERCENTS %%\n/ | ||
#$line =~ s/,/;/; | ||
# print $line; | ||
|
||
} | ||
close $fh; | ||
#exit(0); | ||
open( $fh, ">", "quicklisp_documentation.txt") or die($!); | ||
foreach my $line (@arr) | ||
{ | ||
print $fh $line; | ||
} | ||
close $fh; | ||
|
||
# This reads in the quicklisp_package_src.txt and formats in | ||
# placeholders for documentation. | ||
use strict; | ||
use warnings; | ||
|
||
open( my $fh, "<", "quicklisp_package_src.txt") or die($!); | ||
my @arr = <$fh>; | ||
foreach my $line (@arr) | ||
{ | ||
chomp $line; | ||
$line =~ s/\s/ %% /; | ||
$line =~ s/$/ %% INSERT DOCS BETWEEN PERCENTS %%\n/ | ||
#$line =~ s/,/;/; | ||
# print $line; | ||
|
||
} | ||
close $fh; | ||
#exit(0); | ||
open( $fh, ">", "quicklisp_documentation.txt") or die($!); | ||
foreach my $line (@arr) | ||
{ | ||
print $fh $line; | ||
} | ||
close $fh; | ||
|
Oops, something went wrong.