Hello,
last week I released a bunch of modules which grew up in silence for a
while.
First, there is the new PP::Package 0.40. It has a few new features,
most of them in the API for converter authors, and a few cleanups. Among
the changes for *users* are the new optional dot prefix for text
paragraphs, the requirement for a headline for the very first chapter,
and fixes in variable handling - empty variables are treated as literal
text now according to the docs, and backslashes before variables are
handled more correctly. Please see the changelog for a full list.
0.40 has a few API incompatibilities, but nevertheless pp2html and
pp2latex should continue to run with them.
And, there are two new components in the package. One is an tutorial,
incomplete yet but with many chapters already about basic and advanced
themes.
The second new part is an extended framework, designed to simplify the
writing of new converters. It is built on top of the existing model (so
traditional converters continue to work and will continue to be
supported) and has three components: generators, formatters, and
template engines, all plugged in via module installations and invoked by
*one* converter which comes with 0.40, named pp2tdo. The concept is
described in the "writing converters" documents in the package, but the
base ideas are these:
There's a four layer backend model. The first level comes with the
framework and performes all actions on the parsers output that are
common to all converters. The second level is a *generator*, a module
loaded according to option -target. A generator basically produces the
target language. But one and the same language can be formatted in
various ways, and that's why on the next level a *formatter* is linked
in. Formatters are modules loaded according to option -formatter.
Finally, formatters might want to use templates. As there are several
engines around the new framework has a general interface to template
engines (think DBI) and can load specific "drivers" which translate the
template requests to whatever a specific template system needs. Again,
specific template modules are loaded dynamically by pp2tdo, according to
options.
How does this affect a user? Well, here are a few points:
* PPP 0.40 comes with a generator and formatter for SDF which resample
the entire functionality of pp2sdf.
* Several new distributions were released with a generator to XML
(PP::Generator::XML), XML formatters
to XHTML (one page and multiple pages, PP::Generator::XMML::XHTML)
and a template driver providing
the traditional template syntax of pp2html templates, in an extended
version (PP::Template::Traditional).
* Styles, introduced with pp2html, are generally available now. They
have a new design, too. Two examples
for XHTML are provided in the new package PP::styles. Styles can
include own generators, formatters
and template drivers.
* If you like, you can use one converter for all target formats.
After installation of these packages, you can try the new interface,
e.g. by a call like
pp2tdo -target XML -format XHTML::Pages
-doctitle Test -prefix test -suffix .html
-targetdir slides
-styledir .../PerlPoint-styles/demo/styles
-style GPW7-PPGenerator-01
-contents_header TOC test.pp
(As usual, all options can be stored in an option file.)
Again, the traditional converters will continue to be supported.
The new modules and packages still lack some tests and docs, and
possibly a finish in the API, but a base documentation is already there
(try -help with the call above) and are successfully used in various
internal projects. So, I declare the new distributions beta but they can
be considered to work well.
Greetings
Jochen
last week I released a bunch of modules which grew up in silence for a
while.
First, there is the new PP::Package 0.40. It has a few new features,
most of them in the API for converter authors, and a few cleanups. Among
the changes for *users* are the new optional dot prefix for text
paragraphs, the requirement for a headline for the very first chapter,
and fixes in variable handling - empty variables are treated as literal
text now according to the docs, and backslashes before variables are
handled more correctly. Please see the changelog for a full list.
0.40 has a few API incompatibilities, but nevertheless pp2html and
pp2latex should continue to run with them.
And, there are two new components in the package. One is an tutorial,
incomplete yet but with many chapters already about basic and advanced
themes.
The second new part is an extended framework, designed to simplify the
writing of new converters. It is built on top of the existing model (so
traditional converters continue to work and will continue to be
supported) and has three components: generators, formatters, and
template engines, all plugged in via module installations and invoked by
*one* converter which comes with 0.40, named pp2tdo. The concept is
described in the "writing converters" documents in the package, but the
base ideas are these:
There's a four layer backend model. The first level comes with the
framework and performes all actions on the parsers output that are
common to all converters. The second level is a *generator*, a module
loaded according to option -target. A generator basically produces the
target language. But one and the same language can be formatted in
various ways, and that's why on the next level a *formatter* is linked
in. Formatters are modules loaded according to option -formatter.
Finally, formatters might want to use templates. As there are several
engines around the new framework has a general interface to template
engines (think DBI) and can load specific "drivers" which translate the
template requests to whatever a specific template system needs. Again,
specific template modules are loaded dynamically by pp2tdo, according to
options.
How does this affect a user? Well, here are a few points:
* PPP 0.40 comes with a generator and formatter for SDF which resample
the entire functionality of pp2sdf.
* Several new distributions were released with a generator to XML
(PP::Generator::XML), XML formatters
to XHTML (one page and multiple pages, PP::Generator::XMML::XHTML)
and a template driver providing
the traditional template syntax of pp2html templates, in an extended
version (PP::Template::Traditional).
* Styles, introduced with pp2html, are generally available now. They
have a new design, too. Two examples
for XHTML are provided in the new package PP::styles. Styles can
include own generators, formatters
and template drivers.
* If you like, you can use one converter for all target formats.
After installation of these packages, you can try the new interface,
e.g. by a call like
pp2tdo -target XML -format XHTML::Pages
-doctitle Test -prefix test -suffix .html
-targetdir slides
-styledir .../PerlPoint-styles/demo/styles
-style GPW7-PPGenerator-01
-contents_header TOC test.pp
(As usual, all options can be stored in an option file.)
Again, the traditional converters will continue to be supported.
The new modules and packages still lack some tests and docs, and
possibly a finish in the API, but a base documentation is already there
(try -help with the call above) and are successfully used in various
internal projects. So, I declare the new distributions beta but they can
be considered to work well.
Greetings
Jochen