KMail pipe through? - Suse

This is a discussion on KMail pipe through? - Suse ; Hi, I would like to pipe emails thru a script to extract "RepNum: ####" (#### representing a number) and write it in a text file but I'm not really sure how I can do this. Can anyone provide some kind ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: KMail pipe through?

  1. KMail pipe through?

    Hi,

    I would like to pipe emails thru a script to extract "RepNum: ####" (####
    representing a number) and write it in a text file but I'm not really sure
    how I can do this. Can anyone provide some kind of support and help?
    This would be greatly appreciated.
    I belive this smells like python, doesn't it? I've never really used it so
    this would be my first try.

    Thanks for your help!!!!
    Ron

  2. Re: KMail pipe through?

    Ron Eggler wrote:

    > ...I would like to pipe emails thru a script to extract "RepNum: ####"

    (####
    > representing a number) and write it in a text file but I'm not really sure
    > how I can do this. ...


    Why not use AWK?

    Take a look at this link:

    http://www.oracle.com/technology/pub...laney_awk.html

  3. Re: KMail pipe through?

    Ron Eggler wrote:

    > Hi,
    >
    > I would like to pipe emails thru a script to extract "RepNum: ####" (####
    > representing a number) and write it in a text file but I'm not really sure
    > how I can do this. Can anyone provide some kind of support and help?
    > This would be greatly appreciated.
    > I belive this smells like python, doesn't it? I've never really used it so
    > this would be my first try.
    >
    > Thanks for your help!!!!
    > Ron


    Though I've never used it this seems to be easy enough. Just use kmail in
    conjunction with whatever works for you (Python ?). Go
    to 'Settings' -> 'Configure Filters'. Using the desired 'Filter Criteria'
    match the text you are looking for with the desired 'Filter Actions' to do
    what you want. This might include using the 'Pipe Through' action or
    maybe 'Execute Command' to run your script !

    P.S. Don't forget to look at the 'Advanced' tab to see if you want to apply
    more settings.

  4. Re: KMail pipe through?

    Jack Bunce wrote:

    > Ron Eggler wrote:
    >
    >> ...I would like to pipe emails thru a script to extract "RepNum: ####"

    > (####
    >> representing a number) and write it in a text file but I'm not really
    >> sure how I can do this. ...

    >
    > Why not use AWK?
    >
    > Take a look at this link:
    >
    > http://www.oracle.com/technology/pub...laney_awk.html


    Oh, That AWK seems to be very appropirate for what i would like to do. But
    to issue such a command I always (of course) need to pass the file name,
    e.g.:"awk '{print $2,$3}' filename" and how is the filename of the email
    coming in from KMail? How can I access the "parsed" content?

    Thanks!
    Ron


  5. Re: KMail pipe through?

    Ron Eggler wrote:

    > Jack Bunce wrote:
    >
    >> Ron Eggler wrote:
    >>
    >>> ...I would like to pipe emails thru a script to extract "RepNum: ####"

    >> (####
    >>> representing a number) and write it in a text file but I'm not really
    >>> sure how I can do this. ...

    >>
    >> Why not use AWK?
    >>
    >> Take a look at this link:
    >>
    >> http://www.oracle.com/technology/pub...laney_awk.html

    >
    > Oh, That AWK seems to be very appropirate for what i would like to do. But
    > to issue such a command I always (of course) need to pass the file name,
    > e.g.:"awk '{print $2,$3}' filename" and how is the filename of the email
    > coming in from KMail? How can I access the "parsed" content?
    >
    > Thanks!
    > Ron


    Ah I got it from the help file '%0' represents the text. Reading helps
    Thanks dudes for your help! AWK makes m,y life easier. Never heard of that
    before


+ Reply to Thread