Printing incomig Faxes
Kurt Garloff (garloff@kg1.ping.de)
Tue, 20 Oct 1998 07:57:04 +0200
On Sat, Oct 17, 1998 at 01:43:30AM +0200, Christoph Scheuring wrote:
> Hi there,
> Is there a possibility of automatic printing incoming faxes, recieved by
> mgetty,
What about a file /usr/lib/mgetty+sendfax/new_fax like this:
(Don't forget to chmod +x it!)
#!/bin/sh
# This is called from mgetty/vgetty with args
# <HUP> <Sender> <# pages> <Filenames>
hup=$1
shift
sender=$1
shift
nofp=$1
shift
fns=$*
cat $fns | g32pbm | lpr
There is one major problem with this approach: If you receive low and high
resolution faxes you should use the -n/f options for g32pbm. Maybe you can
find a way to have file recognize the type. Maybe the option -d204x196 will
do the job.
--
Kurt Garloff, Dortmund
<K.Garloff@ping.de>
PGP key on http://student.physik.uni-dortmund.de/homepages/garloff
----------------------------------------------------------------------------
The following is a Python RSA implementation. According to the US Government
posting these four lines makes me an international arms trafficker! Join me
in civil disobedience; add these lines of code to your .sig block to help get
this stupid and unconstitutional law changed.
============================================================================
from sys import*;from string import*;a=argv;[s,p,q]=filter(lambda x:x[:1]!=
'-',a);d='-d'in a;e,n=atol(p,16),atol(q,16);l=(len(q)+1)/2;o,inb=l-d,l-1+d
while s:s=stdin.read(inb);s and map(stdout.write,map(lambda i,b=pow(reduce(
lambda x,y:(x<<8L)+y,map(ord,s)),e,n):chr(b>>8*i&255),range(o-1,-1,-1)))