Re: magicfilter and a2ps
Quoting Alberto Maurizi (alberto@alice.fisbat.bo.cnr.it):
>
> Does anybody use a2ps in magicfilter as the default for
> plain text? (e.g. to avoid waste of paper, save forests
> ... and get nicer presentation of plain text ...)
>
> If so, how could the filename and username
> be printed in the a2ps formatted page?
>
> I tried using
>
> default pipe /usr/bin/a2ps -o -
>
> but I obtain "stdin" for file name and "lp" for user ("Printed
> by ..").
It doesn't look straightforward if you use a2ps as the last resort.
I would suggest you use a2ps to print the file (as postscript) and
let magicfilter handle that.
a2ps has so many options, and they all changed between bo and hamm,
so I use a bash wrapper for the ones I commonly want, and I have a
copy of dwww's realpath to print the canonical name of the file
rather than what I typed. For example, 2up landscape:
if [ "$1" == "" ]; then
echo Usage: l2up filename-to-be-printed-landscape [options-for-a2ps]
else
{
REALPATH=`$HOME/realpath $1` ;
shift;
if [ -f "$REALPATH" ]
then
a2ps "$REALPATH" -2 \
--header='%T %E' \
--left-title=\$f \
--right-title='line $l^' \
--center-title --left-footer --footer $@
else
...
Cheers,
--
Email: d.wright@open.ac.uk Tel: +44 1908 653 739 Fax: +44 1908 655 151
Snail: David Wright, Earth Science Dept., Milton Keynes, England, MK7 6AA
Disclaimer: These addresses are only for reaching me, and do not signify
official stationery. Views expressed here are either my own or plagiarised.
Reply to: