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

Evan Miller emmiller@REDACTED
Mon Jun 6 05:46:04 CEST 2011


(Apologies if this is a double-post, posting via Gmane yesterday did
not appear to work)

On Sat, Jun 4, 2011 at 3:45 PM, Tom Samplonius <tom@REDACTED> wrote:
>
>> 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)

I am looking for a pure-Erlang solution. For what it's worth I went
ahead and added crop and scale functions to erl_img this weekend
(along with PNG write support):

https://github.com/evanmiller/erl_img

>
>
>> 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.

Right, but I'd like to convert among rich-text formats as easily as
converting among image formats. I'd love it if I could email an RTF
file to a server application and have it display on web page as HTML,
then make minor edits via Markdown.

>
>  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.,

Interesting, I will take a look at DKIM. I am using the excellent
gen_smtp library to build some basic MTA functionality:

https://github.com/Vagabond/gen_smtp

I would like to have an email interface to my application without
worrying too much about unauthorized users. I am hoping that SPF or
DKIM will do the trick.

>
>> Thanks,
>
>> Evan
>
>> --
>> Evan Miller
>> http://www.evanmiller.org/
>
>
> Tom
>



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



More information about the erlang-questions mailing list