[MacTUG] Parsing Plists

Mike Patterson mpatterson at uwaterloo.ca
Wed Jan 19 11:16:44 EST 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 2011/01/19 10:52 AM, Dani Roloson wrote:
> Piping it into "fgrep -e device-uri -e printer-make-and-model" works 
> but is there something that pulls out specific fields from more
> complex plists. (Property List Editor doesn't seem to be the answer
> either.)

If you're comfortable with scripting languages, a quick google found:
 http://plist.rubyforge.org/
 http://search.cpan.org/~bdfoy/Mac-PropertyList-1.33/lib/PropertyList.pm
(ruby and perl respectively)

or otherwise, they're just XML, right?  Anything that parses XML should
be able to do it, Apple publish the DTD.

But less "I bet I could write my own tool to do this" type people might
have better solutions.  :-)

Mike
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk03DmwACgkQrqw9H9F0mCR0ygCdGIUir09BCsc3Xc/puQz5lqsf
4lEAoI2TkdpMB+LOuhIUqUZxGAX277pB
=xQc9
-----END PGP SIGNATURE-----


More information about the MacTUG mailing list