[erlang-questions] Three useful libraries (do they exist?)

Tom Samplonius tom@REDACTED
Sat Jun 4 22:45:49 CEST 2011


> I am looking for three kinds of functionality in Erlang. Does anyone
> know of a library, or the beginnings of a library, for any of these?

> 1. Image cropping and scaling - I know that erl_img can read and
> write
> various image formats, but I am looking for something to perform a
> resize (which usually involves some fancy math in the resample
> stage).

  As someone already said, ImageMagick is the standard go-to solution for image manipulation.  An Erlang port driver would be nice, but as far as I know, none exists, but you can use the script capability (http://imagemagick.com/script/index.php)


> 2. Rich-text reading and writing - I am looking for an RTF parser.
> Ideally it would parse many rich-text formats into a single abstract
> format which could then be converted to any of the other formats
> (e.g.
> HTML, Markdown, BBCode, WikiCreole)

  Some of those formats are not exactly comparable though.  For instance, RTF is intended as a printable format, and has no semantics.  So sematic markup like "blockquote" from BBCode do not have an RTF equivalent.

  I think the best part of RTF, is that Microsoft has announce they won't be releasing any more versions of the RTF standard.


> 3. Sender Policy Framework implementation - The Sender Policy
> Framework is emerging as the standard way to verify that email hosts
> are who they say they are. I can't imagine writing a serious
> application that receives email without it.

  SPF finished emerging about 5 years ago, and is already in decline.  DKIM is much more useful, and is now widely implemented (Yahoo and Gmail).  SPF just defines what IPs are supposed to be sending email for a given domain, but most sites that have published a SPF, specify that email can come from anywhere.  This means the receiving server has to come up with its own interpretation of what to do a with the policy.

  DKIM is must better, since the sending domain signs the email with a private key.  The public key is in DNS, so receiving sites can easily verify the signature.  If the signature check fails, you can discard the message.  The only decision that you need to make, is what to do with unsigned emails.

  SPF is normally handled by the MTA, and you didn't ask for an SMTP server library for Erlang.  If your MTA is not running in Erlang, it is probably better to leave DKIM and SPF up to your MTA.,

> Thanks,

> Evan

> --
> Evan Miller
> http://www.evanmiller.org/


Tom



More information about the erlang-questions mailing list