These plugins are distributed under "The MIT License." See readme.html for licensing information.
Some libraries included
with RooBeautifier are distributed under
the GNU Public License.
See examples/roobeautifier/lib/README.txt for more
information.
Visit the Builderoo home page.
Builderoo comes with several sample plugins that demonstrate the usefulness of Builderoo's features, and are generally useful in their own right. See each section below for installation instructions.
SmartyFilter is a text filter that replaces quote marks, dashes, and elipses with formal HTML mark-up for the equivalent typographic characters. It uses John Gruber's SmartyPants plugin to perform the transformations.
SmartyFilter can be configured to perform certain transformations by default. Transformations can also be controlled with parameters in a Roo tag.
SmartyFilter requires that the SmartyPants plugin be installed. SmartyFilter 0.2 was tested with SmartyPants 1.5.1.
To install SmartyFilter, copy the smartyfilter directory from the examples/ directory to Movable Type's
plugins/ directory. To configure SmartyFilter, find it
in your weblog's Settings screen, under "Plugins", and select "Show
Settings".
To use SmartyFilter, use the "smartypants" filter.
When used in a Roo tag, the config parameter can override the configuration. The value of the config parameter is the SmartyPants configuration string, which consists of one or more of the following:
0 - nothing1 - all, using 2 dashes for m-dashes (no n-dashes)2 - all, using 3 dashes for m-dashes and 2 for n-dashes3 - all, using 2 dashes for m-dashes and 3 for n-dashesq - quotesb - backtick double quotesB - backtick double and single quotesd - 2 dashes for m-dashesD - 3 dahses for m-dashes, 2 for n-dashesi - 2 dashes for m-dashes, 3 for n-dashese - ellipsesw - convert " to "Here is an example using SmartyFilter and Movable Type's "Convert Line Breaks" filter for a section:
<% Roo:smartypants[config=1],__default__ %>
"Good day, Boris," said the bellboy. He took a knife--one of the big ones--from the shelf and stabbed him thrice. "I bet you didn't expect that, eh old chap?"
"Not at all," Boris replied, bleeding profusely. Then he died... or did he?
</% Roo %>
This example will appear in the blog entry as:
“Good day, Boris,” said the bellboy. He took a knife—one of the big ones—from the shelf and stabbed him thrice. “I bet you didn’t expect that, eh old chap?”
“Not at all,” Boris replied, bleeding profusely. Then he died… or did he?
RegexFilter performs pattern replacements on a section of text, using regular expressions.
RegexFilter can have pattern replacements defined in its plugin configuration. Replacements set in configuration are applied everywhere the entry text is used, including entry preview. RegexFilter also honors MTRegex patterns defined in templates.
To install RegexFilter, copy the regexfilter directory
from the examples/ directory to Movable
Type's plugins/ directory.
To configure default substitution patterns for a weblog, find RegexFilter in your weblog's Settings screen, under "Plugins", and select "Show Settings". Specify one substitution per line, as a Perl substitution regular expression. A substitution may optionally be given a name by specifying the name (consisting of letters, numbers, and underscores) and an equal sign before the pattern. A substitution's name can be used to apply just that specific substitution to text when RegexFilter is invoked.
Named patterns can optionally specify that the pattern is not to be applied within HTML tags by including ":no_html" immediately after the name.
Here is an example of several patterns defined in configuration:
| Pattern substitutions: | s/foo/bar/gi |
To use RegexFilter within Builderoo, use the "regex" filter.
When used in a Roo tag, the "regex" filter can take the following optional parameters:
pattern - This is either:
foo), in which case only that pattern will be applied,m/foo.*/), in which case every substitution pattern whose name matches the match pattern will be applied, ors/foo/bar/g), in which case only the specified pattern will be applied.no_html - If present, the contents of HTML tags will never be matched by a pattern.The following example uses the preset pattern configuration above, and "regex" as the base filter.
They were quite emfoorassed when thier website at http://www.gnu.org/ was hacked.
After substitutions, this would appear in the blog entry as:
They were quite embarrassed when their website at http://www.gnu.org/ was hacked.
RegexFilter includes MTRegex 1.61 in the distribution. The MTRegex
template tags and global filters are disabled by default. To enable
the full MTRegex plugin, rename and
move regexfilter/lib/regex.pl.txt
to regexfilter/regex.pl,
or download
and install the latest version of MTRegex.
RooBeautifier is a Builderoo text filter that formats a section of computer source code in an entry, using syntax highlighting and indentation appropriate for the computer programming langauge used in the section.
To install RooBeautifier:
roobeautifier directory from the examples/ directory to Movable Type's plugins/ directory..linecomment { color: #FF8000; }
.blockcomment { color: #FF8000; }
.prepro { color: #0000BB; }
.select {}
.quote { color: #DD0000; }
.category1 { color: #007700; }
.category2 { color: #0000BB; }
.category3 { color: #0000BB; }To use the plugin, include a Roo tag for the "code" filter in a blog entry.
To specify the language whose syntax rules should be used from indentation and highlighting, provide the language name as a (valueless) parameter. An "HFile" module, such as the ones in RooBeautifier's lib/ directory, must be installed for the language. The language name is the part of the HFile module name after "HFile_". For example, the HFile module for the Java language is named "HFile_java.pm", so the language name to use is "java", like so:
<% Roo:code[java] %> ... </% Roo %>
You may also specify the language via the "language" attribute (language="java"). If no language is specified in the tag, RooBeautifier uses the default specified in the weblog's settings for the plugin.
RooBeautifier will also recognize a few shortcuts for known language names. This version includes aliases for ActionScript (as, using the actionscript HFile), PHP (php, using the php3 HFile), and ColdFusion (cf, using the coldfusion HFile). These are defined near the top of RooBeautifier.pl; feel free to add your own.
RooBeautifier can automatically re-indent the source code according to the language syntax rules. A configuration setting controls whether code is re-indented by default. The indent and noindent (valueless) parameters override the default for a section. If RooBeautifier is configured not to re-indent code, the original indentation will be preserved, and only syntax highlighting will be applied.
Note that colors will not show up during preview of an entry, because the preview screen does not use the blog's stylesheet.
Here is an example of RooBeautifier in action:
This is how the plugin gets its configuration and attributes:
<% Roo:code[perl] %>
my $config = $plugin->get_config_hash('blog:'.$ctx->stash('blog')->id);
my $attrs = $ctx->stash('roo_attributes') || {};
my $myattr;
if (defined($attrs->{myattr})) {
$myattr = $attrs->{myattr}->[0];
} else {
# "myattr" attribute not specified, default to configuration
$myattr = $config->{myattr_default}->[0];
}
</% Roo %>
Notice that the attribute data structure
allows for multiple values for each attribute name. The hash
reference is followed by <code>->[0]</code> to get the
value of the first attribute with that name.
This example will appear in the blog entry as:
This is how the plugin gets its configuration and attributes:
my $config = $plugin->get_config_hash('blog:'.$ctx->stash('blog')->id);
my $attrs = $ctx->stash('roo_attributes') || {};
my $myattr;
if (defined($attrs->{myattr})) {
$myattr = $attrs->{myattr}->[0];
} else {
# "myattr" attribute not specified, default to configuration
$myattr = $config->{myattr_default}->[0];
}
Notice that the attribute data structure
allows for multiple values for each attribute name. The hash
reference is followed by ->[0] to get the
value of the first attribute with that name.
Both RooBeautifier and Voisen's MTCodeBeautifier use Mike
Jewell's Beautifier engine to
perform the formatting. RooBeautifier includes Jewell's Beautifier,
along with some enhancements by Voisen, in the distribution. The
Beautifier formatting engine is distributed under the GNU Public
License. The complete text of the license is included in this
distribution in the file "COPYING.txt", in
RooBeautifier's lib/ directory. See "README.txt" in the
same directory for the list of relevant files.
Verbatim is a simple Movable Type text filter that translates characters into HTML entities, and converts line breaks into HTML break tags.
To install, copy the verbatim directory from the examples/ directory to Movable Type's plugins/ directory.
Verbatim's filter key is "verbatim".
LaTeX is a document preparation system, popular in academic publishing, especially in mathematics. LaTeX and supporting packages include a powerful mark-up language for drawing diagrams and mathematical formulae, with hundreds of other packages available for other printed material. RooLaTeX lets you include such diagrams and formulae in a blog entry using LaTeX mark-up.
RooLaTeX requires that the following software be installed on the server running Movable Type:
Installing this software on a web server is beyond the scope of this document, but it should be easy for most Unix-based systems, including Linux and Mac OS X. For Linux, most distributions include packages for these applications. For Mac OS X, all pieces are available using Fink.
RooLaTeX is expected to work on all Unix-like platforms. This version takes advantage of features of the command shell executed by Perl, and is not expected to run on Windows web servers.
To install the plugin:
roolatex directory from the examples/ directory to Movable Type's plugins/ directory.To use the plugin, include a Roo tag for the "latex" filter in a blog entry. The tag may optionally specify the following parameters to override their corresponding settings in the configuration:
img - attributes to include in the IMG tagsize - a size value (150 is a medium size)res - a "resolution" value between 0 and 1 (must not be 0)greylevel - a "grey level" value between 0 and 1 (0 is black, 1 is white)noheader - (no value) do not include the headernofooter - (no value) do not include the footerImages generated by RooLaTeX have a transparent background, and are anti-aliased for the background color specified by the "grey level" configuration setting or parameter. The text will be black. If the actual background color is not a level of grey, set the grey level to 0 to prevent anti-alias fringes from appearing.
Here is an example of RooLaTeX in action:
The RooLaTeX plugin is based on
<a href="http://www.fourmilab.ch/webtools/textogif/textogif.html">textogif</a>
by John Walker. The textogif website includes the following example.
<% Roo:latex %>
\begin{displaymath}
\int H(x,x')\psi(x')dx' = -\frac{\hbar^2}{2m}\frac{d^2}{dx^2}
\psi(x)+V(x)\psi(x)
\end{displaymath}
</% Roo %>
Very pretty. But what does it mean?
This example will appear in the blog entry as:
The RooLaTeX plugin is based on textogif by John Walker. The textogif website includes the following example.
Very pretty. But what does it mean?
GNU Lilypond generates musical score from a mark-up language. RooLilypond lets you include musical score in a blog entry using Lilypond mark-up.
RooLilypond requires that the following software be installed on the server running Movable Type:
Installing this software on a web server is beyond the scope of this document, but it should be easy for most Unix-based systems, including Linux and Mac OS X.
For Mac OS X, all pieces are available using Fink. Be sure to add "/sw/bin" to the end of the software directories list.
RooLilypond is expected to work on all Unix-like platforms. This version takes advantage of features of the command shell executed by Perl, and is not expected to run on Windows web servers.
To install the plugin:
roolilypond directory from the examples/ directory to Movable Type's plugins/ directory.To use the plugin, include a Roo tag for the "lilypond" filter in a blog entry. The tag may optionally specify the following parameters to override their corresponding settings in the configuration:
img - attributes to include in the IMG tagsize - a size value (150 is a medium size)res - a "resolution" value between 0 and 1 (must not be 0)greylevel - a "grey level" value between 0 and 1 (0 is black, 1 is white)noheader - (no value) do not include the headernofooter - (no value) do not include the footerImages generated by RooLilypond have a transparent background, and are anti-aliased for the background color specified by the "grey level" configuration setting or parameter. The text will be black. If the actual background color is not a level of grey, set the grey level to 0 to prevent anti-alias fringes from appearing.
Here is an example of RooLilypond in action:
In his <i>Arabesque No. 1</i>, Claude Debussy uses triplets in
the melody against quarter notes like a waterfall against stones, not
always touching but always in tandem on the way down.
<% Roo:lilypond %>
\new PianoStaff <<
\new Staff {
\key e \major
\clef treble
r4 \relative c' {
\times 2/3 { e'8 fis cis } \times 2/3 { e b cis }
\times 2/3 { gis b fis } \times 2/3 { gis e gis }
dis2 cis4
}
}
\new Staff {
\key e \major
\clef bass
\relative c, { e8 b' e gis b gis e b e, cis' e gis cis gis e cis }
}
>>
</% Roo %>
A talented pianist can emphasize the detachment of the melody from the
accompaniment without deviating from the rhythm as written.
This example will appear in the blog entry as:
In his Arabesque No. 1, Claude Debussy uses triplets in the melody against quarter notes like a waterfall against stones, not always touching but always in tandem on the way down.
A talented pianist can emphasize the detachment of the melody from the accompaniment without deviating from the rhythm as written.
RooLilypond can be made to work with a version of Lilypond older than 2.6.3, as long as it supports output directly to PostScript. You may need to adjust the Lilypond header and footer in the weblog settings to suppress page numbers. You may also need to adjust the example above.
Graphviz generates graph diagrams from a mark-up language called "dot". RooGraphviz lets you include such diagrams in a blog entry using dot mark-up. All three Graphviz modes are supported: "dot" (directed graphs), "neato" (undirected graphs, spring model), and "twopi" (undirected graphs, circular).
RooGraphviz requires that Graphviz be installed on the server running Movable Type. If available, it uses Netpbm to determine the dimensions of the image. (If Netpbm is not available, the IMG tag will be rendered without "width" and "height" values.)
To install the plugin:
roographviz directory from the examples/ directory to Movable Type's plugins/ directory.To use the plugin, include a Roo tag for the "dot" filter in a blog entry. The default mode is specified in configuration. To select "dot", "neato" or "twopi" when it isn't the default, specify the command as a (valueless) parameter, e.g. <% Roo:dot[neato] %>, or as a value to the "cmd" parameter.
RooGraphviz also supports the following parameters to override their corresponding settings in the configuration:
img - attributes to appear in the IMG tag
noheader - (no value) do not include the headernofooter - (no value) do not include the footerHere is an example of RooGraphviz in action:
It's important to know the classification of animals.
<% Roo:dot %>
digraph hierarchy {
node [fontname=Courier]
Animals->{ Mammals Reptiles }
Mammals->{ Dogs Cats }
Reptiles->{ Iguanas }
}
</% Roo %>
As you can see, an iguana is not a mammal.
This example will appear in the blog entry as:
It's important to know the classification of animals.
As you can see, an iguana is not a mammal.
RooSpell is a spelling checker for blog entries. When you preview an entry, misspelled words are highlighted, with spelling suggestions shown when you hold the mouse pointer over a misspelled word. The highlights do not appear when the entry is published.
RooSpell requires that Ispell be properly installed on the server running Movable Type. Ispell is usually available on most Unix-based systems.
Be sure to determine which version of Ispell is on your system and
adjust the RooSpell configuration accordingly. In particular:
The -H flag that ignores text in HTML tags was not
implemented until Ispell 3.2. If you have Ispell 3.1 or earlier, you
will have to remove the -H from the default
configuration. (You can make up for the lack of this feature by
configuring RooSpell to ignore HTML keywords, like "img" and "alt".)
To determine your version of Ispell, run ispell -v on the
command line.
To install the plugin, copy the roospell directory from the examples/ directory to Movable Type's plugins/ directory. Log in to the Movable Type administrative interface, select System Overview, "Plugins", find RooSpell and select "Show Settings". Confirm that the settings are correct.
Finally, use Builderoo's base filter settings for your weblog to make the "spell" filter the last base filter. (If "spell" were not the last filter, it may insert mark-up for misspelled words that may confuse later filters. In particular, if the "Convert Line Breaks" filter comes after RooSpell, it will add extraneous HTML mark-up to RooSpell's stylesheet, and misspelled words may not be highlighted properly.)
You can add words to RooSpell's dictionary specific to each weblog using the weblog's plugin settings panel.
Please visit the Builderoo home page to download updates, report bugs, and submit feedback and suggestions for new features.