1 #-----------------------------------------------------------------------------
3 # Gotmail - gotmail.awk
5 # 1999 by Thomas Nesges <ThomasNesges@TNT-Computer.de>
7 #-----------------------------------------------------------------------------
9 #-----------------------------------------------------------------------------
10 # This script is part of GotMail. It emits html to a specified File
11 # The AWK-Library htmllib has to be properly installed.
12 #-----------------------------------------------------------------------------
14 #-----------------------------------------------------------------------------
15 function init_environ()
17 TextColor = ENVIRON["GOTM_TXCOL"]
18 BackColor = ENVIRON["GOTM_BGCOL"]
19 MsgColor = ENVIRON["GOTM_MSGCOL"]
20 ErrColor = ENVIRON["GOTM_ERRCOL"]
21 TimColor = ENVIRON["GOTM_TIMCOL"]
22 OutFile = ENVIRON["GOTM_HTMLFILE"]
23 PrintMsg = toupper(ENVIRON["GOTM_MSG"])
24 PrintErr = toupper(ENVIRON["GOTM_ERR"])
25 PrintTim = toupper(ENVIRON["GOTM_TIM"])
26 PrintHed = toupper(ENVIRON["GOTM_HED"])
29 #-----------------------------------------------------------------------------
31 #-----------------------------------------------------------------------------
38 Mails = Mails TableRow("start", MsgColor)
39 Mails = Mails TableItem($5) TableItem($7)
40 Mails = Mails TableItem(Align($2,0))
41 Mails = Mails TableRow("stop")
43 else if($3=="fetchmail")
45 Times = Times TableRow("start", TimColor)
46 Times = Times TableItem($0)
47 Times = Times TableRow("stop")
51 Errors = Errors TableRow("start", ErrColor)
52 Errors = Errors TableItem($0)
53 Errors = Errors TableRow("stop")
57 #-----------------------------------------------------------------------------
59 Stats = StartPage(Title("Gotmail Stats") Body(BackColor, TextColor))
62 Stats = Stats Align(Headline("Gotmail Stats",1),0)
63 Stats = Stats Divider Newline
67 Stats = Stats TableStart(1)
68 Stats = Stats TableRow("start", MsgColor)
69 Stats = Stats TableItem(Bold("Account"))
70 Stats = Stats TableItem(Bold("Server"))
71 Stats = Stats TableItem(Bold("Mails fetched"))
72 Stats = Stats TableRow("stop")
73 Stats = Stats Mails TableEnd Newline Divider Newline
78 Stats = Stats TableStart(1)
79 Stats = Stats TableRow("start", ErrColor)
80 Stats = Stats TableItem(Bold("Error Messages"))
81 Stats = Stats TableRow("stop")
82 Stats = Stats Errors TableEnd Newline Divider
87 Stats = Stats TableStart(1)
88 Stats = Stats TableRow("start", TimColor)
89 Stats = Stats TableItem(Bold("Start/Stop Times"))
90 Stats = Stats TableRow("stop")
91 Stats = Stats Times TableEnd Newline Divider
94 Stats = Stats Center("start") "GotMail - 1999 by Thomas Nesges "
95 Stats = Stats "<ThomasNesges@TNT-Computer.de>" Center("stop") EndPage
99 #-----------------------------------------------------------------------------