App-Basis-ConvertText2
view release on metacpan or search on metacpan
YAML: 0
constant: 0
feature: 0
namespace::autoclean: 0
namespace::clean: 0
perl: v5.10.0
strict: 0
vars: 0
warnings: 0
resources:
repository: git://github.com/27escape/App-Basis-ConvertText2.git
version: 0.4
docs/README.html view on Meta::CPAN
-s, --template name of template to use
-v, --verbose verbose mode
-w, --wkhtmltopdf Convert to PDF using wkhtmltopdf, can handle
embedded images</code></pre>
<p>If you are creating HTML documents to send out in emails or share in other ways, and use locally referenced images, then it is best to make use of the <strong>âembed</strong> option to pack these images into the HTML file.</p>
<p>If you are using <a href="http://www.princexml.com">PrinceXML</a> remember that it is only free for non-commercial use, it also adds a purple <strong>P</strong> to the top right of the first page of your document.</p>
</div>
<div class='footer'>
<table class='footer' width='100%'>
<tr><td colspan='2' class='commercial' align='center'>27escape</td></tr>
<tr><td>Kevin Mulholland (c) 2014</td><td align='right'>2014-05-12</td></tr>
</table>
</div>
</body>
</html>
lib/App/Basis/ConvertText2.pm view on Meta::CPAN
* 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.
=head1 Todo
Consider adding plugins for
* http://blockdiag.com/en/index.html,
* https://metacpan.org/pod/Chart::Strip
* https://metacpan.org/pod/Chart::Clicker
lib/App/Basis/ConvertText2.pm view on Meta::CPAN
# ----------------------------------------------------------------------------
sub _do_replacements {
my $self = shift;
my ($content) = @_;
foreach my $k ( keys %{ $self->replace() } ) {
next if ( !$self->{replace}->{$k} );
# in the text the variables to be replaced are surrounded by %
# zero width look behind to make sure the variable name has
# not been escaped _%VARIABLE% should be left alone
$content =~ s/(?<!_)%$k%/$self->{replace}->{$k}/gsm;
}
return $content;
}
# ----------------------------------------------------------------------------
sub _call_function {
my $self = shift;
my ( $block, $params, $content, $linepos ) = @_;
lib/App/Basis/ConvertText2/Plugin/Text.pm view on Meta::CPAN
$content = "0.1 2014-04-12
* removed ConvertFile.pm
* using Path::Tiny rather than other things
* changed to use pandoc fences ~~~~{.tag} rather than xml format <tag>
0.006 2014-04-10
* first release to github" ;
$out = $obj->process( 'table', $content, $params) ;
$content = "BBC | http://bbc.co.uk
DocumentReference | #docreference
27escape | https://github.com/27escape" ;
$out = $obj->process( 'table', $content, $params) ;
=head1 DESCRIPTION
Various simple text transformations
=cut
# ----------------------------------------------------------------------------
lib/App/Basis/ConvertText2/Plugin/Uml.pm view on Meta::CPAN
Alice -> Bob: Another authentication Request
Alice <-- Bob: another authentication Response
" ;
my $params = {} ;
my $obj = App::Basis::ConvertText2::Plugin::Uml->new() ;
my $out = $obj->process( 'uml', $content, $params) ;
=head1 DESCRIPTION
convert a uml text string into a PNG, requires uml program and plantuml
from https://github.com/27escape/bin/blob/master/uml and http://plantuml.sourceforge.net
=cut
# ----------------------------------------------------------------------------
package App::Basis::ConvertText2::Plugin::Uml;
$App::Basis::ConvertText2::Plugin::Uml::VERSION = '0.4';
use 5.10.0;
use strict;
use warnings;
lib/App/Basis/ConvertText2/Plugin/Uml.pm view on Meta::CPAN
if ( $x && $y ) {
$content =~ s/\@startuml/\@startuml\nscale $x*$y\n/;
}
my $umlfile = Path::Tiny->tempfile("umlXXXXXXXX");
path($umlfile)->spew_utf8($content);
my $cmd = UML . " $umlfile $filename";
my ( $exit, $stdout, $stderr ) = run_cmd($cmd);
if( $exit) {
warn "Could not run script " . UML . " get it from https://github.com/27escape/bin/blob/master/uml" ;
}
}
my $out;
if ( -f $filename ) {
# create something suitable for the HTML
$out = create_img_src( $filename, $params->{title} );
}
return $out;
( run in 0.403 second using v1.01-cache-2.11-cpan-c21f80fb71c )