NAME

App::Slackeria::Output - XHTML output for App::Slackeria

SYNOPSIS

# $project looks like this:
# {
#     perl => {
#         Debian    => { ok => 1, data => '5.12.3-7' },
#         Freshmeat => { ok => 1, data => '5.14.0' },
#     },
#     irssi => {
#         Debian    => { ok => 1, data => '0.8.15-3+b1' },
#         Freshmeat => { ok => 1, data => '0.8.12' },
#     },
# }
App::Slackeria::Output->write_out(
    filename => '/tmp/out.html',
    data => $project
);

VERSION

version 0.12

DESCRIPTION

App::Slackeria::Out::XHTML takes a hashref of projects, which themselves are hashrefs of plugin name => plugin output pairs, and stuffs it into a nicely formatted (X)HTML table.

FUNCTIONS

App::Slackeria::Output->write_out(filename => filename, data => data, [template => template file])

Creates HTML in filename based on data.

TEMPLATE VARIABLES

In the outer layer, there are just two loop variables available, headers and projects. Use <TMPL_LOOP headers> ... stuff ... </TMPL_LOOP> to access their content.

HEADERS

The headers loop contains the table fields, i.e. the names of the executed plugins in the correct order, in the variable plugin. It can be used like <TMPL_VAR plugin>.

PROJECTS

projects loops over each project, which in turn loops over each plugin result. It provides the variable project with the current project's name and the loop variable plugins.

plugins provides the following variables:

  • class

    CSS class for plugin result. Either "ok" or "fail".

  • href

    URL to project page for this plugin, if available.

  • data

    plugin's text output

DEPENDENCIES

HTML::Template(3pm)

SEE ALSO

slackeria(1)

AUTHOR

Copyright (C) 2011 by Daniel Friesel <derf@finalrewind.org>

LICENSE

0. You just DO WHAT THE FUCK YOU WANT TO.