> From [EMAIL PROTECTED] Tue Aug 1 10:30:25 2000
> Date: Tue, 1 Aug 2000 12:04:32 -0400 (EDT)
> From: Lars Kellogg-Stedman <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Re: LPRng: ifhp - Xerox 4CP
>
> On Tue, 1 Aug 2000 [EMAIL PROTECTED] wrote:
>
> > Note: I am currently in the middle of writing a 'ppd reader'
> > that will allow you to specify a PPD file in the ifhp.conf
> > (or on the printer command line) and get the commands from
> > the PPD file.
>
> Have you looked at ppdfilt (part of libppd, available from
> http://sourceforge.net/project/?group_id=1658)? While I
> haven't actually got it working yet, it appears to do pretty
> much the same thing.
>
> It doesn't appear to be entirely functional yet (for instance, I ran into
> an infinite loop in the code that was making it hang all the time), but it
> looks like it has some possibility.
>
> -- Lars
>
> --
> Lars Kellogg-Stedman <[EMAIL PROTECTED]> --> http://www.larsshack.org/
Yes. For my feeble purposes it is considerable overkill and at the
same time not enough.
Here is what I am currently doing:
Extending the PPD syntax to allow:
[ name name name ]
* ppd file stuff
This allows multiple PPD files to be put in a single file,
and referenced/aliased to a single entry. I have found that there
is a LOT of commonality among the various PPD files.
*Subclass: name name name
This printer is a subclass of the indicated printers, i.e. -
you use all of the PPD information of the specified entries,
in the order given, and then the PPD in the current entry
overrides them.
Extending the 'conventions' of the PPD items
*Option - option name ... as before
*DefaultOption - default value ... as before
*Tag_lang_Option - option tag in the language indicated
This expands on/replaces the Option xxx/tag stuff
(which I think is UGLY) in the original PPD
*Help_lang_Option - help in the language indicated
Note that if you do not want to use these conventions
your PPD file will be parsed as normal.
Comments on parsing PPD files.
There are two types of structure you want out of the PPD file-
- the names of options/values
- grouping for the pretty 'user level interface'
The grouping can be modelled by:
menu name
option name
option name
menu name
option name
option name
...
Now I am NOT going to suggest that a simple text form
would be easy to use, parse, etc., etc., but as a diagnostic
tool it sure would be easy. And, of course, you could make up
a menu builder real easily from the text. Not suggesting
anything here...
And to have a similar format for:
option
Default => value
Tag => value
Tag_lang => value
Help_lang => value
Ummm... needless to say, any resemblance between this and Perl
is a wild coincidence, just happens to look like it...
Note that doing this really simplifies construction, editting,
and other things you do with the PPD file.
Patrick
P.S. - I am also building a PPD diff tool to compare the content
of the two PPD files, and I will be normalizing the PostScript
as well.
Patrick Powell Astart Technologies,
[EMAIL PROTECTED] 9475 Chesapeake Drive, Suite D,
Network and System San Diego, CA 92123
Consulting 858-874-6543 FAX 858-279-8424
LPRng - Print Spooler (http://www.astart.com)
-----------------------------------------------------------------------------
If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
or lprng-digest-requests) with the word 'help' in the body. For the impatient,
to subscribe to a list with name LIST, send mail to [EMAIL PROTECTED]
with: | example:
subscribe LIST <mailaddr> | subscribe lprng-digest [EMAIL PROTECTED]
unsubscribe LIST <mailaddr> | unsubscribe lprng [EMAIL PROTECTED]
If you have major problems, send email to [EMAIL PROTECTED] with the word
LPRNGLIST in the SUBJECT line.
-----------------------------------------------------------------------------