]> Pileus Git - ~andy/fetchmail/blob - contrib/gotmail.awk
Update German translation.
[~andy/fetchmail] / contrib / gotmail.awk
1 #-----------------------------------------------------------------------------
2 #
3 #                           Gotmail - gotmail.awk
4 #
5 #             1999 by Thomas Nesges <ThomasNesges@TNT-Computer.de>
6 #
7 #-----------------------------------------------------------------------------
8
9 #-----------------------------------------------------------------------------
10 # This script is part of GotMail. It gives back normal text to the console
11 #-----------------------------------------------------------------------------
12
13 {
14   if($2!="reading")
15   {
16         if(($3=="message") || ($3=="messages"))
17         {       
18                 Mails = Mails sprintf(" %- 40s ",substr($5,1,40))
19                 Mails = Mails sprintf(" %- 5s ",substr($2,1,5))
20                 Mails = Mails sprintf(" %- 30s\n",substr($7,1,30))
21         }
22         else if($3=="fetchmail")
23         {
24                 Started = Started " " $0 "\n"
25         }
26         else
27         {
28                 Errors = Errors $0 "\n"
29         }
30   }
31 }
32
33 END     {
34                 Separator = "-------------------------------------------------------------------------------"
35                 if(ENVIRON["GOTM_HED"]=="yes")
36                 {
37                         print "\n\t\t---------------------------------------"
38                         print "\t\t| ** GotMail - Stats for fetchmail ** |"
39                         print "\t\t---------------------------------------"
40                 }
41                 if(ENVIRON["GOTM_MSG"]=="yes")
42                 {
43                         print Separator 
44                         print "|    Fetched Mails:"
45                         print Separator 
46                         print Mails
47                 }
48                 if(ENVIRON["GOTM_ERR"]=="yes")
49                 {
50                         print Separator 
51                         print "|    Error Messages:"
52                         print Separator 
53                         print Errors
54                 }
55                 if(ENVIRON["GOTM_TIM"]=="yes")
56                 {
57                         print Separator
58                         print "|    Fetchmail started/stoped:"
59                         print Separator
60                         print Started
61                 }
62         }