App-Basis-ConvertText2
view release on metacpan or search on metacpan
author: Kevin Mulholland
keywords: perl, readme
template: coverpage
version: 5
As you can see, we use a series of key value pairs separated with a colon. The keys may be anything you like, except for the following which have special significance.
* *format* shows what output format we should default to.
* *template* shows which template we should use
The keys may be used as variables in your document or in the template, by upper-casing and prefixing and postfixing percent symbols '%'
**Example**
version as a variable _%VERSION%
If you want to display the name of a variable without it being interpreted, prefix it
with an underscore '_', this underscore will be removed in the final document.
**Example**
from_buffer='spark_data' to_buffer='greenspark' no_output=1}
~~~~
~~~~{.sparkline title='green sparkline' scheme='green'
from_buffer='spark_data' to_buffer='greenspark' no_output=1}
~~~~
We can also have the content of a code-block replaced with content from a buffer by using the **from_buffer** argument. This is also displayed in the example above.
To use the contents (or output of a buffered code-block) we wrap the name of the buffer
once again with percent '%' symbols, once again we force upper case.
**Example**
_%SPARK_DATA% has content %SPARK_DATA%
_%GREENSPARK% has a generated image %GREENSPARK%
Buffering also allows us to add content into markdown constructs like bullets.
**Example**
docs/README.html view on Meta::CPAN
date: 2014-05-12
author: Kevin Mulholland
keywords: perl, readme
template: coverpage
version: 5</code></pre>
<p>As you can see, we use a series of key value pairs separated with a colon. The keys may be anything you like, except for the following which have special significance.</p>
<ul>
<li><em>format</em> shows what output format we should default to.</li>
<li><em>template</em> shows which template we should use</li>
</ul>
<p>The keys may be used as variables in your document or in the template, by upper-casing and prefixing and postfixing percent symbols â%â</p>
<p><strong>Example</strong></p>
<pre><code>version as a variable %VERSION%</code></pre>
<p>If you want to display the name of a variable without it being interpreted, prefix it with an underscore â_â, this underscore will be removed in the final document.</p>
<p><strong>Example</strong></p>
<pre><code>%TITLE%</code></pre>
<p><strong>Output</strong></p>
<p>App::Basis::ConvertText2</p>
<h2 id="table-of-contents"><a name='2_table_of_contents'>2 Table of contents</a></h2>
<p>As documents are processed, all the HTML headers (H1..H4) are collected together to make a table of contents. This can be used either in your template or document using the TOC variable.</p>
<p><strong>Example</strong></p>
docs/README.html view on Meta::CPAN
<p><strong>Example</strong></p>
<pre><code>~~~~{.buffer to_buffer='spark_data'}
1,4,5,20,4,5,3,1
~~~~</code></pre>
<p>If the code-block would normally produce some output that we do not want displayed at the current location then we would need to use the <strong>no_output</strong> argument.</p>
<p><strong>Example</strong></p>
<pre><code>~~~~{.sparkline title='green sparkline' scheme='green'
from_buffer='spark_data' to_buffer='greenspark' no_output=1}
~~~~</code></pre>
<p>We can also have the content of a code-block replaced with content from a buffer by using the <strong>from_buffer</strong> argument. This is also displayed in the example above.</p>
<p>To use the contents (or output of a buffered code-block) we wrap the name of the buffer once again with percent â%â symbols, once again we force upper case.</p>
<p><strong>Example</strong></p>
<pre><code>%SPARK_DATA% has content 1,4,5,20,4,5,3,1
%GREENSPARK% has a generated image <img src='/tmp/kmulholland/cache/ct2/1f38c66e765de08fb292e4e410263519.png' alt='green sparkline' height='20' width='80' /></code></pre>
<p>Buffering also allows us to add content into markdown constructs like bullets.</p>
<p><strong>Example</strong></p>
<pre><code>* %SPARK_DATA%
* %GREENSPARK%</code></pre>
<p><strong>Output</strong></p>
<ul>
<li>1,4,5,20,4,5,3,1</li>
( run in 0.470 second using v1.01-cache-2.11-cpan-10c994e2082 )