lr_xml2png(1)

lr_xml2png1

Generate a png graph of a certain subreport

Usage

lr_xml2png [options] file.xml

Options

-s subreport number

select subreports to convert

-t type

type of chart to generate

-f format

output format (png or eps)

Overview

lr_xml2png reads a raw xml report from stdin, and generates a PNG image of the data in a given subreport in the file.xml document conform the Lire DTD. The type of chart is set with the -t option and can have the values "pie", "bar" and "line".

The CPAN perl modules GD::Graph is used.

This script gets called by lr_xml2pdf(1) and lr_xml2html(1).

Examples

A raw xml report looks like e.g.

 <?xml version="1.0"?>
 <!DOCTYPE report SYSTEM "/usr/lib/xml/dtd/lire.dtd" []>
 <report date="Wed Mar 28 10:53:43 CEST 2001">
  <!-- generated by lr_dlf2xml(1) -->
  <timespan>Tue Mar 27 - Wed Mar 28</timespan>
  <subreport superservice="www" date="Wed Mar 28 2001">
    <title>requests per clienthost, top 10</title>
    <table>
      <entry>
        <value>301</value>
        <name>6.example.com</name>
      </entry>
      <entry>
        <value>20</value>
        <name>118.example.com</name>
      </entry>
    </table>
  </subreport>
  <subreport superservice="www" date="Wed Mar 28 2001">
    <title>requested pages, top 20</title>
    <table>
      <entry>
        <value>8</value>
        <name>/debian</name>
      </entry>
    </table>
  </subreport>
  <subreport superservice="www" date="Wed Mar 28 2001">
    <title>requested pages</title>
    <table>
      <group value="301">
        <title>6.example.com</title>
        <entry>
          <value>1</value>
          <name>/icons/92.example.com</name>
        </entry>
      </group>
    </table>
  </subreport>
 </report>

Lire's lr_dlf2xml(1) creates reports in this format.

Version

$Id: lr_xml2png.in,v 1.19 2001/08/25 19:58:50 flacoste Exp $

Author

Egon Willighagen

From lire 20020214-7 in Debian 3.0 (Woody). Parsed by carta from the page's man source.