Skip to content

Commit

Permalink
A and B are documented
Browse files Browse the repository at this point in the history
  • Loading branch information
vlion committed Mar 19, 2011
1 parent 3207abd commit f9d1430
Show file tree
Hide file tree
Showing 6 changed files with 1,541 additions and 1,502 deletions.
32 changes: 16 additions & 16 deletions Makefile
@@ -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
96 changes: 48 additions & 48 deletions emit-html.pl
@@ -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;

50 changes: 25 additions & 25 deletions process-list.pl
@@ -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;

0 comments on commit f9d1430

Please sign in to comment.