Re: [Evolution-hackers] extracting email to structured text (csv)

Reid Thompson wrote:
Tobias Mueller wrote:
Hey Simon :)

On 18.06.2008 19:52 simon le bayon wrote:
I'm a sociology phd student, with few competences in it, and i'd like to
extract thousands of email from evolution to a csv or other structured

I don't know whether mbox or maildir is structered enough and whether Evolution supports copy&paste old mails to a new mbox account. But if both facts are given, you might want to create a new mbox (or maildir) account, copy&paste your mails into that accout, so that all mails are in the mbox file and mess around with your data.



Evolution-hackers mailing list
Evolution-hackers gnome org

rubymail, or one of the other ruby mail libraries may allow you to do what you want..

rubymail has a parse_mbox call that might allow what you want...

found this on the web... might be modifiable for what you want.

#!/usr/bin/ruby -w
# Split a mbox file into $year-$month files
# Copyright (C) 2008 Joerg Jaspert
# BSD style license, on Debian see /usr/share/common-licenses/BSD
require 'pathname'
require 'rmail'
count = 0[0]), 'r') do  mbox
  RMail::Mailbox.parse_mbox(mbox) do  raw
    count += 1
    print "# count  mails\n"
    begin"split/mail-%y%m"), 'a') do out
    rescue NoMethodError
      print "Couldn't parse date header, ignoring broken spam mail\n"

ruby tmail is also very nice.  it should allow you to do what you want. notes that it recognizes mbox, maildir, etc.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]