Typo @rev 586
I updated Typo to the latest svn (rev 586) yesterday and got a sample of the new Filters API. Looks very slick. For example, here’s a filter which formats Ruby code with syntax highlighting:
class Foo
def bar
"abcde"
end
endThe syntax for declaring that looks like this:
<typo:code lang="ruby">
class Foo
def bar
"abcde"
end
end
<typo:code>
<typo:flickr img=”38104907” style=”border: 1px solid #8ab3d1; padding: 5px; margin: 5px; float: right;” size=”small”/>
And it’s very easy to drop in a reference to a flickr image:
<typo:flickr
style="border: 1px
<span class="k">solid #8ab3d1;</span>
<span class="k">padding: 5px;</span>
<span class="k">margin: 5px;</span>
<span class="k">float: right;</span><span class="dl">"</span></span>
img="31367273"
size="small" />
Is translated into the picture at the right. I’m quite impressed with that one.
Lastly, there is a filter for Sparklines, which allows you generate a chart (pie, area, discreet, etc) from dynamic data. e.g.:
<typo:sparkline
type="pie"
data="33.3 66.6" />That bit of code renders the following graphic:
<typo:sparkline type=”pie” data=”33.3 66.6” />
Posted in Technology | no comments |
