lout-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

maillout


From: Luis Melendez Aganzo
Subject: maillout
Date: Thu, 29 Dec 1994 11:16:44 +0100 (MET)

Hello, Lout users.

I have just written a simple filter for printing mail messages 
via Lout. I have called it 'maillout' and the listing goes below.
Some remarks:

1. The program txt2lout just quotes some needed characters. It can be
   downloaded from ftp://ftp.uco.es/luism/txt2lout.c
   If you use it, I'd like to know your suggestions or bug reports.

2. You can alter maillout to use another font. Some things don't look
   fine with Times (such as tables), but the way to solve it is to
   use Courier and quote all the whole lines in the message (it can be
   done with txt2lout), but then the long lines (many people uses
   very long lines in mail messages) won't work.

maillout can be downloaded from: ftp://ftp.uco.es/luism/maillout

--------------- CUT HERE -------------------------------------

#!/bin/sh
############################################################################
#
#  maillout
#
#  Filter to print mail messages via LOUT
#
#  Luis Melendez, Universidad de Cordoba - SPAIN ( address@hidden)
#
############################################################################

TXT2LOUT=/usr/local/bin/txt2lout
LOUT=/usr/local/bin/lout
LP=lp

(
cat <<FIN
@SysInclude { fontdefs       }
@SysInclude { langdefs       }
@SysInclude { dl             }
@SysInclude { ordinarylayout }
@SysInclude { fig            }
 
@Use { @DocumentLayout 
@TopMargin       { 2c }
@FootMargin      { 2c }
@OddLeftMargin   { 2c }
@EvenLeftMargin  { 2c }
@OddRightMargin  { 2c }
@EvenRightMargin { 2c }
@PageHeaders     { None }
}
@Use { @OrdinaryLayout }
@Doc @Text @Begin
 
{Helvetica Base 14p} @Font {
FIN

$TXT2LOUT | awk '/^From:/ {fromline=substr($0, 6)}
/^To:/      {toline=substr($0, 4)}
/^Subject:/ {subjectline=substr($0, 9)}
/^$/        {
if(mens!=1) {
  printf("From |10mt : @B{%s} //1.5fx \n", fromline);
  printf("To |10mt : @B{%s} //1.5fx \n", toline);
  printf("Subject |10mt : @B{%s} //1.5fx \n", subjectline);
  printf("} // @address@hidden linewidth{.06 cm} @HExpand {}} //1c \n");
  printf("{Times Base 10p} @Font lines @Break { \n");
}
mens=1;}
{ if(mens==1) { print }
}'

echo "} @End @Text"
) | $LOUT | $LP

--------------- CUT HERE -------------------------------------

-- 
+-----------------------------------^---------------------------------------+
| Luis Melendez                     ^  email: address@hidden        |
| Centro de Calculo Cientifico      ^  Tlf: 957-218119                      |
| Universidad de Cordoba (SPAIN)    ^  MIME Spoken Here                     |
| gopher://gopher.uco.es            ^  http://www.uco.es                    |
+-----------------------------------^---------------------------------------+


reply via email to

[Prev in Thread] Current Thread [Next in Thread]