![]() |
Export website in HTML | ||||||||||||||||
PPresenter Manual Export Website HTML
Simple Website |
Portable Presenter is a package designed to give
presentations. Doing the presentation is one thing, but you like to
have this show publicly available afterwards.
The most popular way to present your slides after "the real thing" is
by creating a website. The module
This export option is useless whithout Image::Magick installed. A Simple WebsiteExporters are not automatically added to your show. It is not (but could be) a part of a style. So: anywhere in your program you have to add the line$show->addExporter('PPresenter::Export::Website::HTML');Start the show. When the compilation of the exporter module is successful, you can access the options of the module via the background module. Some basic changes can be made, like the format and the width of the images to be produced (the height of the image is scaled the same as the width is). Most changes you want to make to the produced site require you to write your own exporter module. OptionsThe Website object extends to IM_Images object and the general Export object. Next to those options, you may set:
Using an ExporterYou can only use an export if you invoke it explicitly in your presentation program. There are two ways to do this:my $show = PPresenter->new(options); my $export = $show->addExporter('PPresenter::Export::Website::HTML'); $export->change(options);or my $show = PPresenter->new(options); my $export = PPresenter::Export::Website::HTML->new(options); Your own Website ContentsEach website is different. An option-menu is not sufficient to all demands. Therefore, if you want to produce your own layout, you have to override parts of the standard exporter.Perl offers two ways to override the functionality: a very dirty but fast one, and a pretty OO-version which is a bit more work. The dirty way: $show->addExporter('PPresenter::Export::Website::HTML'); sub PPresenter::Export:Website::HTML::PageLogo($$) { my ($export, $show, $slide) = @_; my $file = $slide ? "../logo.gif" : "logo.gif"; "<IMG SRC=$file WIDTH=150 HEIGHT=107>"; }and the nice OO-way: $show->addExporter('MyWebsite');file MyWebsite.pm package MyWebsite; use PPresenter::Export:Website::HTML'; use base 'PPresenter::Export:Website::HTML'; sub PageLogo($$) { my ($export, $show, $slide) = @_; my $file = $slide ? "../logo.gif" : "logo.gif"; "<IMG SRC=$file WIDTH=150 HEIGHT=107>"; } 1; The Functions to OverrideThe Page table built by calling a huge amount of functions, which all can be overridden when needed. The main structure of the default webpages is:
Now the name of the functions. The parameters show which arguments are
passed on. In each case, the
Change the StructureThe structure of the produced sites is controled by the following functions (can be overruled too)
An ExampleAs example, a exporter module which has some things changed to personal whishes.package MyWebsite; use PPresenter::Export::Website::HTML; use base 'PPresenter::Export::Website::HTML'; sub PageLogo($$) { my ($export, $show, $slide) = @_; my $file = $slide ? "../logo.gif" : "logo.gif"; "<IMG SRC=$file WIDTH=150 HEIGHT=107 HSPACE=5 VSPACE=5>"; } sub ExtraText($$) { my ($export, $show, $slide) = @_; return '' if $slide; # only extra text for the intro page. <<INTRO; This presentation was given for.... INTRO } In the main program, you have to add the one line: $show->addExporter('MyWebsite');
Start your presentation and select in your background menu the entry
| ||||||||||||||||
Portable Presenter is written and maintained by Mark Overmeer. There is no relation between this software product and his employer. Copyright (C) 2000, Free Software Foundation FSF. |