how to change output format for text and html

Fabien Tassin fta at oleane.net
Mon Sep 20 19:33:50 UTC 1999


According to Katsuhiro Kondou:
> 
> I'm thinkig of add other fields into incoming feeds section(size
> and dupes) of innreport output.  But adding new sections in
> innreport.conf will break the result of text version, since most
> of the default columns of the window is 80.
> 
> So I'd like to know how to change output format of innreport for
> each text and html.  I'll add other info into syslog output and
> modify innreport stuff, unless it's so difficult.

the HTML engine doesn't care about column width. To obtain well formated
text tables, you must play with the 'format_name', 'format' and 'format_total'
fields of each 'column' block. The syntax is the same a perl printf.
The max width is set to 79 chars. There's a space between each column.

section innd_control {
        title   "Control commands to INND:";
        data    "%innd_control";
        column {
                name          "Command";
                format        "%-71.71s";
                value         "$key";
                format_total  "TOTAL: %-64.64s";
                total         "$num";
        };
        column {
                name          "Number";
                format_name   "%7s";
                value         "$innd_control{$key}";
                format        "%7d";
                total         "total(%innd_control)";
        };
};


header: format_name || format       71+1+7=79
common line : format                71+1+7=79
footer: format_total || format      length('TOTAL: ')+64+1+7=79


 
-- 
Fabien Tassin -+- fta at oleane.net


More information about the inn-workers mailing list