Re: JSON parsing in mynajs (was Re: Headless mail renderer)

2011-05-16 Thread Tony Zakula
Hi Eric, I will put it on my list, but the main work is being done in - [1] The method probably for your purposes to look at is at the bottom of that file and is: var parseMessage = function parse_message(fileName) { // This function parses the message and gets it back in JSON var object = n

JSON parsing in mynajs (was Re: Headless mail renderer)

2011-05-16 Thread Eric Charles
Hi Tony, Cool! Tks for this :) Event if index.ejs gives some clues on how to run, it would be great to have a short README that explains how to use it (and how to call it from a Java main class). Tks, Eric On 16/05/2011 04:45, Tony Zakula wrote: Hi Eric and all, I have posted some basic

Re: Headless mail renderer

2011-05-15 Thread Tony Zakula
Hi Eric and all, I have posted some basic code for parsing emails using Mime4J and JavaScript at https://bitbucket.org/tzakula/javascript-email-bounce-processor Thanks. Tony Z On Thu, May 12, 2011 at 10:28 PM, Eric Charles wrote: > Hi Tony, > > We've got also the apache-extras [1] which is

Re: Headless mail renderer

2011-05-13 Thread Tony Zakula
Hi Eric, > > We've got also the apache-extras [1] which is mercurial (hosted by google > for addons to apache projects). That good. I will check it out. I prefer mercurial. > > I was wondering if the parser can be used without the full myna server. I > mean, we simply need to parse mail, not t

Re: Headless mail renderer

2011-05-12 Thread Eric Charles
Hi Tony, We've got also the apache-extras [1] which is mercurial (hosted by google for addons to apache projects). I was wondering if the parser can be used without the full myna server. I mean, we simply need to parse mail, not to configure a full server with users,... ([2]). Also, is the

Re: Headless mail renderer

2011-05-12 Thread Tony Zakula
Hi Eric, JavaScript is also extremely flexible. With Rhino, you get the full power of Java plus a lot of flexibility. What is the preferred spot of release? Github, Bitbuckit, or is there another? Tony On Thu, May 12, 2011 at 8:19 AM, Eric Charles wrote: > Hi Tony, > > Javascript in james s

Re: Headless mail renderer

2011-05-12 Thread Eric Charles
Hi Tony, Javascript in james server would be a primeur. But why not... there is more and more JS "on the other side" (thinking to Node.js...). I'm using today Jackson to manipulate JSON in Java, but Javascript has a more natural fit, so I understand why you choose it. We will start around end

Re: Headless mail renderer

2011-05-12 Thread Tony Zakula
Hi Eric, I would be more than happy to release the code now even though it is not entirely finished if you are interested. The parsing part is pretty good, and I am using it in a production project right now. I am not sure it will fit your bill though as I am using it on a mail server to do mess

Re: Headless mail renderer

2011-05-12 Thread Tony Zakula
Hi Robert. Thank you for the detailed response and links. On Tue, May 10, 2011 at 3:00 AM, Robert Burrell Donkin wrote: > On Sun, May 8, 2011 at 2:44 PM, Tony Zakula wrote: >> Not sure on where the project leaders want to go, > > Projects are community led here at Apache (see eg [1][2][3][4]).

Re: Headless mail renderer

2011-05-11 Thread Eric Charles
Hi Tony, We are starting to work on MAILBOX-44 "Design and implement a distributed mailbox using Hadoop" [1] We will need to store the mail in hadoop and the JSON format (in avro file) may be a option. You said you are "still polishing for release" your JSON transformer. Have you got any pl

Re: Headless mail renderer

2011-05-10 Thread Robert Burrell Donkin
On Sun, May 8, 2011 at 2:44 PM, Tony Zakula wrote: > Not sure on where the project leaders want to go, Projects are community led here at Apache (see eg [1][2][3][4]). If there's development interest from the community and it's in scope for the project, then that's a direction the code will move

Re: Headless mail renderer

2011-05-08 Thread Tony Zakula
Not sure on where the project leaders want to go, but I think being able to store messages in different formats to be able to plugin to systems would be great. Instead of each person writing their own parser, most people would just plugin the larger piece to their system and start there. I did no

Re: Headless mail renderer

2011-05-06 Thread Robert Burrell Donkin
On Fri, May 6, 2011 at 12:05 PM, Tony Zakula wrote: > Hey, > > That is a cool project!  Congratulations!  I have one where that I am > still polishing for release that transforms messages into JSON format > and then stores the JSON.  My initial benchmarks on non-optimized code > is an average of 2

Re: Headless mail renderer

2011-05-06 Thread Noss Benoit
Hi Eric, * OpenOffice is used to render MicrosoftOffice and OpenOffice attachments into PDF OpenOffice badly renders html into PDF * iText is used to render XHTML to PDF. Like Stefano proposed, render html into XHTML with nu.validator (or with jtidy in my case) and then

Re: Headless mail renderer

2011-05-06 Thread Tony Zakula
Hey, That is a cool project! Congratulations! I have one where that I am still polishing for release that transforms messages into JSON format and then stores the JSON. My initial benchmarks on non-optimized code is an average of 25,000 messages an hour with the main bottle neck being the IO.

Re: Headless mail renderer

2011-05-06 Thread Eric Charles
I Benoït, Many tks for feedback and contribution. I just downloaded your zip and saw jodconverter (and associated uno..., ju.. jars from openoffice sdk) and itext libs. You also import jdoconverter and itext classes in PDFConverterJAVA. What would you advice for any html/text pdf convertion

Re: Headless mail renderer

2011-05-06 Thread Noss Benoit
Hello Stefano and all the other who helped me, I worked with two students on a headless mail renderer (written in JAVA) I recently opened a project on SourceForge to share this experience (http://sourceforge.net/projects/mailtopdf/) Purpose is to render allmost all mails (body + attachments) i

Re: Headless mail renderer

2011-01-25 Thread Noss Benoit
Hello Stefano, after having read your mail, I think I can keep a lot of the code I wrote. I didn't know a better tool than tidy to generate the XTML and it did often fail, so I resigned to render HTML. In fact, if I can replace the use of tidy by validator.nu to transform the HTML and then let i

Re: Headless mail renderer

2011-01-25 Thread Stefano Bagnara
2011/1/25 Noss Benoit : > Hi, after your comments, I know think I have to split my project in two > parts > > 1/ The first part has to parse the message and write an html or xhtml page > representing the output I want for the message > 2/ The second part has to render the html I precedently generat

Re: Headless mail renderer

2011-01-24 Thread Noss Benoit
Hi, after your comments, I know think I have to split my project in two parts 1/ The first part has to parse the message and write an html or xhtml page representing the output I want for the message 2/ The second part has to render the html I precedently generated to PDF I tried flying sauce

Re: Headless mail renderer

2011-01-24 Thread Eric Charles
Hi, fyi I also used java/mozilla integration via javaxpcom which needs investment from developer (API changes,...). An alternative is to use an html to pdf add-on and call it from xul with a java/xulrunner integration. I also used Flying Saucer but didn't know it was able to generate PDF. For

Re: Headless mail renderer

2011-01-24 Thread Noss Benoit
thanks for your comments Stefano, I will look in the directions you suggested and keep you informed (if you want to) Benoît On 24.01.2011 11:57, Stefano Bagnara wrote: 2011/1/24 Noss Benoit: Hi Stefano, thanks for your answer. In the past, I already tried to do this with the javax.mail.Messa

Re: Headless mail renderer

2011-01-24 Thread Stefano Bagnara
2011/1/24 Noss Benoit : > Hi Stefano, > thanks for your answer. In the past, I already tried to do this with the > javax.mail.Message class. > it was not a big success..., and found lots of issues due to the variety of > incoming mails, so couldn't get in production. You can tweak javamail with so

Re: Headless mail renderer

2011-01-24 Thread Noss Benoit
Hi Stefano, thanks for your answer. In the past, I already tried to do this with the javax.mail.Message class. it was not a big success..., and found lots of issues due to the variety of incoming mails, so couldn't get in production. With each parsed Message, I tried to build in parallel a xhtml

Re: Headless mail renderer

2011-01-24 Thread Stefano Bagnara
2011/1/24 Noss Benoit : > I don't want to spam you with this question, but I would like to make an > headless PDF mail renderer. > In my project, I want to batch process incoming mails and inject them in a > content management DB as PDF. > Am I on the right way if I use your MimeStreamParser combin