---
name: "lr_xml2png"
section: "1"
platform: "linux"
package: "lire"
version: "20020214-7"
release: "Debian 3.0 (Woody)"
platforms: ["linux"]
url: "https://new.carta.tech/lr_xml2png"
---

# lr\_xml2png(1)

generate a PNG graph of a certain subreport

## NAME

lr\_xml2png - generate a PNG graph of a certain subreport

## SYNOPSIS

**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)

## DESCRIPTION

**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)](/lr_xml2pdf/1.md) and [*lr\_xml2html*(1)](/lr_xml2html/1.md).

## EXAMPLE

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)](/lr_dlf2xml/1.md) creates reports in this format.

## SEE ALSO

[*lr\_dlf2xml*(1)](/lr_dlf2xml/1.md), [*lr\_log2report*(1)](/lr_log2report/1.md)

## VERSION

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

## COPYRIGHT

Copyright (C) 2000-2001 Stichting LogReport Foundation LogReport@LogReport.org

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.

## AUTHOR

Egon Willighagen
