Results 1 to 3 of 3

Thread: How to retain formatting when copying HTML msg in KMAIL?

  1. #1
    Join Date
    Jun 2008
    Location
    UK; deep south, far below Watford.
    Posts
    275

    Default How to retain formatting when copying HTML msg in KMAIL?

    I'm trying to copy parts of emails I receive (using Kmail as my client) into an Open Office Writer document. The emails are encoded as HTML. The only option I seem to have is to use Ctrl-C and Ctrl-V, but this places only plain, unformatted text into the Writer document.

    Using 'File, Save As' on the message produces an mbox file type - so that's not the way to do it.


    How do I achieve what I want to do?
    They said I wasn't fit to live with a pig; my brother stood up for me and said I was.

  2. #2
    Join Date
    Jul 2008
    Location
    Voorhout, Netherlands
    Posts
    262

    Default Re: How to retain formatting when copying HTML msg in KMAIL?

    XEyedBear wrote:
    > I'm trying to copy parts of emails I receive (using Kmail as my client)
    > into an Open Office Writer document. The emails are encoded as HTML. The
    > only option I seem to have is to use Ctrl-C and Ctrl-V, but this places
    > only plain, unformatted text into the Writer document.
    >
    > Using 'File, Save As' on the message produces an mbox file type - so
    > that's not the way to do it.


    Yes, it is.
    The mbox file will have all of the data in the email, including any formatting.
    You will just be left with the task of retrieving the HTML parts from this file.
    With the usual Unix text tools that shouldn't be hard, otherwise Perl or Python
    have libraries to cope with mbox, multi-parts and HTML.

    Theo

  3. #3
    Join Date
    Jun 2008
    Location
    UK; deep south, far below Watford.
    Posts
    275

    Default Re: How to retain formatting when copying HTML msg in KMAIL?

    Quote Originally Posted by LittleRedRooster View Post
    XEyedBear wrote:
    > I'm trying to copy parts of emails I receive (using Kmail as my client)
    > into an Open Office Writer document. The emails are encoded as HTML. The
    > only option I seem to have is to use Ctrl-C and Ctrl-V, but this places
    > only plain, unformatted text into the Writer document.
    >
    > Using 'File, Save As' on the message produces an mbox file type - so
    > that's not the way to do it.


    Yes, it is.
    The mbox file will have all of the data in the email, including any formatting.
    You will just be left with the task of retrieving the HTML parts from this file.
    With the usual Unix text tools that shouldn't be hard, otherwise Perl or Python
    have libraries to cope with mbox, multi-parts and HTML.

    Theo

    Oh I wish I had seen this earlier - I've just had a very depressing few days helping to 'enhance' some dissertations and I could have done with the really great joke you have described here. It's a bit dangerous of course - I nearly spilled my cup of tea when I read this.

    But I can think of a much better way than writing Perl or Python code to do what is essentially a copy and paste action: why don't I take a digital photo of the emails I want to copy with their formatting, capture the image with digiKam, print it with CUPS, scan it with SANE, polish it up a bit with GIMP, pass the image to an OCR application (sorry, not familiar with any Linux products that do OCR), tweak the OCR app. to produce the same fonts and layout as the original, then dump that into Open-Office Writer?

    That's got to be a lot quicker than writing some code in Perl, surely?

    Or better still, why don't I dump Kmail, use Thunderbird plus a couple of additional key stokes - namely Ctrl-C and Ctrl-V to accomplish what I would like to do?

    Surely that would work, wouldn't it? (I know it does under Windows)
    They said I wasn't fit to live with a pig; my brother stood up for me and said I was.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •