nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] Thoughts: header/address parsing

2014-08-06 03:56:15
norm(_at_)dad(_dot_)org writes:

Ken Hornstein <kenh(_at_)pobox(_dot_)com> writes

One example: Get the effective content part of an 'X-Spam-Status" header.>
That program already exists today.

% scan -width 9999 -format '%{x-spam-status}' messages ....

should do what you want, I think.

If I replace "x-spam-status" by "to", and there are multiple "To:" fields,
I'm not sure what I want. I think I want each addressee on a separate line.
But whatever I want,

      % scan -width 9999 -format '%{to}' messages ...

does not give me what I want. Parsing its output, distinguishing commas
used as delimiters, and commas within quotes, is not quite trivial.

I’m with Norm on the general principle. Fans of GUI mail readers
are unlikely to switch to using [n]mh, but one of the places
where it could really get traction is as a suite of general
purpose mail handling programmes (my request for a “basename”
format for mhstore is another example). For this to work, output
from nmh programmes needs to be structured so as to minimise the
pain of subsequent processing.

-- 
Jón Fairbairn                                 
Jon(_dot_)Fairbairn(_at_)cl(_dot_)cam(_dot_)ac(_dot_)uk



_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>