[ANN] New packages: plist-xml 0.1 and plist-xml-lwt 0.1

Dear OCaml community,

I would like to announce my first two OPAM packages, plist-xml and plist-xml-lwt. These two packages build upon the markup and markup-lwt libraries to read and write plist files expressed as XML.

I originally wrote this code to process the TextMate grammar files found in https://github.com/github/linguist/tree/master/vendor. I hope that other people can find good use of these two libraries. Please report any bugs as well as any inconveniences in the API.

5 Likes

Thanks for sharing this! I was just about to roll my own code for writing plist XML (to generate TextMate grammars), so I’m giving yours a try. You might have saved me a bunch of work, great timing.

I like that you defined t as polymorphic variant, like Yojson. I’m not sure about Date being float * float option but I see you borrowed that from the ISO8601 library and I don’t really know the reasoning behind it.

The only inconvenience I noticed is that it doesn’t emit the XML declaration or the doctype. It took me longer than I’d like to admit to add them to the stream myself, because I had never used Markup before and I couldn’t find any utility function to append streams or prepend signals to them.

1 Like

Hi @debugnik,

I’m so glad that you found my package serendipitous! Okay, I just updated my code so that signals emits the xml and doctype elements. I’ve made a PR to opam-repository to publish my changes. Do these changes satisfy your needs?

For the Date constructor, yeah, I was just following whatever ISO8601 was doing. I’m pretty sure that the float option is supposed to be the timezone offset, or something like that. I’m not an expert on the ISO 8601 specification, so I deferred my API design to my dependency.

1 Like

Yes, that’s exactly what I expected, thanks! I’ve pointed Esy to your 0.2.0 commit until it goes through opam, so I’ve already updated my code; it’s working great for my use case.

2 Likes