The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

App::Basis::ConvertText2

SYNOPSIS

TO be used in conjuction with the supplied ct2 script, which is part of this distribution. Not really to be used on its own.

DESCRIPTION

This is a perl module and a script that makes use of %TITLE%

This is a wrapper for [pandoc] implementing extra fenced code-blocks to allow the creation of charts and graphs etc. Documents may be created a variety of formats. If you want to create nice PDFs then it can use [PrinceXML] to generate great looking PDFs or you can use [wkhtmltopdf] to create PDFs that are almost as good, the default is to use pandoc which, for me, does not work as well.

HTML templates can also be used to control the layout of your documents.

The fenced code block handlers are implemented as plugins and it is a simple process to add new ones.

There are plugins to handle

    * ditaa
    * mscgen
    * graphviz
    * uml
    * gnuplot
    * gle
    * sparklines
    * charts
    * barcodes and qrcodes
    * and many others

See https://github.com/27escape/App-Basis-ConvertText2/blob/master/README.md for more information.

Todo

Consider adding plugins for

    * http://blockdiag.com/en/index.html, 
    * https://metacpan.org/pod/Chart::Strip
    * https://metacpan.org/pod/Chart::Clicker

Public methods

new

Create a new instance of a of a data formating object

Parameters passed in a HASH name - name of this formatting action - required basedir - root directory of document being processed cache_dir - place to store cache files - optional use_cache - decide if you want to use a cache or not template - HTML template to use, must contain %_CONTENTS_% replace - hashref of extra keywords to use as replaceable variables verbose - be verbose embed - embed images, do not create links to them

clean_cache

Remove all files from the cache

parse

parse the markup into HTML and return it, HTML is also stored internally

Parameter markdown text

save_to_file

save the created html to a named file

Parameters filename filename to store/convert stored HTML into pdfconvertor indicate that we should use prince or wkhtmltopdf to create PDF