format logwatch reports as html [Solved]

Tim ignored_mailbox at yahoo.com.au
Wed Apr 18 00:57:29 UTC 2007


Tim:

>> I dare say that, if you didn't mind a plain HTML output, you could have
>> gotten away with making your own header file of:
>> 
>> <html><title>logwatch output</title><body>
>> 
>> And a footer file of just: </body></html>
>> 
>> It's been my experience that much of the HTML trickery gets ignored in
>> mail clients, anyway.  For example, although Evolution supports HTML, it
>> doesn't seem to care about how it presents it.

Mikkel L. Ellertson:
> Shouldn't that be:
> 
> <html><head><title>logwatch output</title></head><body>

Yes, and no...

That's the basic structure of HTML.

But this was a header file, it provides the top of the file, something
else provides the middle (the body section, with or without body tags,
as the case may be - so there was another thing to check for, not
getting them twice), and the footer file closes it off.

So opening header file, plus program output, plus closing footer file,
gives you the whole thing.

> I always thought the <title></title> directive had to be in the
> headers section...

It does, but you don't actually have to type in the opening and closing
head tags, in a log of situations.  It's optional with HTML, and
presumed to be where it's supposed to be, but you do have to
specifically type it with XHTML.

You can actually have a HTML file like the following, and all the
omitted tags will be presumed to be where they should be, though this
makes eyeball debugging harder, because you've got less clues to read.

----- start minimal example -----
<title>A test page</title>

<h1>I'm a test page</h1>

<p>I'm a test page, I am...</p>
----- end minimal example -----

----- example interpreted as, start -----
<html>
<head>
<title>A test page</title>
</head>
<body>
<h1>I'm a test page</h1>

<p>I'm a test page, I am...</p>
</body>
</html>
----- example interpreted as, stop -----


-- 
(This box runs FC6, my others run FC4 & FC5, in case that's
 important to the thread.)

Don't send private replies to my address, the mailbox is ignored.
I read messages from the public lists.





More information about the fedora-list mailing list