I'm looking for a script that can append text files - specifically Yahoo! Groups mbox (example below).

I'd like to append them so that a link to the original Yahoo! Group message (found towards the bottom of the header - for example, X-Yahoo-Message-Num: 15306) is printed above the text in the body of the email. For example:

Yahoo-Message-Num: <A HREF="yahoogroup">15306</a>

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam etc....

===== sample mbox ====

From user_email@... Thu Dec 04 11:28:47 2003 Return-Path: <user_email@...> X-Sender: user_email@... X-Apparently-To: GroupName@yahoogroups.com Received: (qmail 5935 invoked from network); 4 Dec 2003 19:28:46 -0000 Received: from unknown (xx.xxx.xx.xxx) by m19.grp.scd.yahoo.com with QMQP; 4 Dec 2003 19:28:46 -0000 Received: from unknown (HELO mail2.accpac.com) (xx.xxx.xx.xxx) by mta2.grp.scd.yahoo.com with SMTP; 4 Dec 2003 19:28:46 -0000 Received: by mail2.accpac.com with Internet Mail Service (x.x.xxxx.xx) id <YB41MB87>; Thu, 4 Dec 2003 11:28:45 -0800 Message-ID: <F90AE1685A4C684796A39180FE3B20EB028B479F@...> To: GroupName@yahoogroups.com Subject: Message Subject Here Date: Thu, 4 Dec 2003 11:28:43 -0800 MIME-Version: 1.0 X-Mailer: Internet Mail Service (x.x.xxxx.xx) Content-Type: text/plain X-eGroups-Remote-IP: xx.xxx.xx.xxx X-eGroups-From: "User, Name" <user_email@...> From: "User, Name" <user_email@...> X-Yahoo-Group-Post: member; u=xxxxxxx X-Yahoo-Profile: user_email X-Yahoo-Message-Num: 15306 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonu +my eirmod tempor invidunt ut labore et dolore magna aliquyam erat, se +d diam voluptua. At vero eos et accusam et justo duo dolores et ea re +bum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ips +um dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing +elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore mag +na aliquyam erat, sed diam voluptua. At vero eos et accusam et justo +duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata s +anctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, co +nsetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut +labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos +et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergre +n, no sea takimata sanctus est Lorem ipsum dolor sit amet.

Anybody have a script that can do this, or can point me in a direction to go about making one?

Many thanks in advance,


In reply to Appending mbox text files? by bobafifi

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.