[Date Prev][Date Next] [Chronological] [Thread] [Top]

"Pretty Printing" schemas using a2ps

FWIW I have attached an 'ldapschema.ssh' a2ps style sheet for "pretty
printing" LDAP v3 schema files such that certain keywords
(matchingRules:, attributeTypes:, et cetera), the "NAME" label, and its
value(s) are highlighted.

I have tested this with NSDS/iPlanet-5.0 and OpenLDAP-2.1.12 schema
files. Also attached is a mini-PNG snapshot of a couple of schema lines,
albeit line wrapped, which shows the highlighting affects.

For those who have/use a2ps (ASCII to Postscript) and need a reasonably
readable hardcopy of a schema file, this style sheet may be useful.

style ldapschema is
version is 1.0
written by "Jim Dutton (23 Jan 2003) <jimd@siu.edu>"
documentation is
  "Highlight common LDAP schema keywords."
end documentation
case sensitive
keywords in Keyword_strong are
end keywords

operators are
	(/( NAME *)/
	 /(\'[a-zA-Z0-9]+\' |\\( (\'[a-zA-Z0-9]+\' )+\\) )/
	 \1 Label_strong, \2 Keyword_strong)
end operators
end style

Attachment: OpenLDAP.schema.a2ps.mini.png
Description: PNG image