summaryrefslogtreecommitdiffstats
path: root/scripts/MarkdownBook
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2012-08-10 17:36:29 (EDT)
committer P. J. McDermott <pjm@nac.net>2012-08-10 17:36:29 (EDT)
commitea75c43dedebe5b6f768841f1a8234d5ef855350 (patch)
treece2c5f64125cbd53c6efeb4d5d346311b2d92dee /scripts/MarkdownBook
parentb3fc81396147a4df176cd86cbf0e42e73fdc418f (diff)
Adjust book and document interfaces.
Diffstat (limited to 'scripts/MarkdownBook')
-rw-r--r--scripts/MarkdownBook/Book.pm12
-rw-r--r--scripts/MarkdownBook/Book/HTML.pm12
-rw-r--r--scripts/MarkdownBook/Document/HTML.pm2
3 files changed, 14 insertions, 12 deletions
diff --git a/scripts/MarkdownBook/Book.pm b/scripts/MarkdownBook/Book.pm
index 77193fd..ac41631 100644
--- a/scripts/MarkdownBook/Book.pm
+++ b/scripts/MarkdownBook/Book.pm
@@ -42,6 +42,8 @@ sub new
}
close($control_fh);
+ $self->create_documents();
+
return $self;
}
@@ -130,6 +132,16 @@ sub create_documents
}
}
+sub parse
+{
+ my ($self) = @_;
+ my $doc;
+
+ foreach $doc (@{$self->{'docs'}}) {
+ $doc->parse();
+ }
+}
+
sub list_documents
{
my ($self) = @_;
diff --git a/scripts/MarkdownBook/Book/HTML.pm b/scripts/MarkdownBook/Book/HTML.pm
index 662b347..864d3f1 100644
--- a/scripts/MarkdownBook/Book/HTML.pm
+++ b/scripts/MarkdownBook/Book/HTML.pm
@@ -39,17 +39,7 @@ sub new
return $self;
}
-sub parse_documents
-{
- my ($self) = @_;
- my $doc;
-
- foreach $doc (@{$self->{'docs'}}) {
- $doc->parse_html();
- }
-}
-
-sub write_templated_documents
+sub output
{
my ($self) = @_;
my $doc_tmpl;
diff --git a/scripts/MarkdownBook/Document/HTML.pm b/scripts/MarkdownBook/Document/HTML.pm
index a7e901a..5dda99a 100644
--- a/scripts/MarkdownBook/Document/HTML.pm
+++ b/scripts/MarkdownBook/Document/HTML.pm
@@ -23,7 +23,7 @@ package MarkdownBook::Document::HTML;
our @ISA = qw(MarkdownBook::Document);
-sub parse_html
+sub parse
{
my ($self) = @_;
my $file = $self->{'book'}->dir() . '/' . $self->{'file'} . '.html.in';