sfeed

simple feed reader - forked from git.codemadness.org/sfeed
git clone git://src.gearsix.net/sfeed
Log | Files | Refs | Atom | README | LICENSE

commit 660b5829b166af80696ac983fedc3a8257f1c9f8
parent 7c99000c207c120d4094277b6ede56a36b929b46
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Mon, 27 Apr 2020 12:52:09 +0200

sfeed_mbox: remove prefix in subject

The prefix in the subject can be too much/redundant if custom labels are used
in the mail client for example.  Filtering or custom labels can be made using
the X-Feedname header.

For mutt it can be useful to use the header X-Label and use the %y format
specified to indicate the label. The index_format is described in the muttrc
man page.

An example:

set index_format = "%4C %Z %[%a, %b %d %H:%M] %?y?%-15.15y ?%-15.15L (%?l?%4l&%4c?) %s"

Other programs have similar headers: Dovecat has "X-Keywords" and Thunderbird
"X-Mozilla-Keys".

Diffstat:
Msfeed_mbox.c | 5+----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/sfeed_mbox.c b/sfeed_mbox.c @@ -49,10 +49,7 @@ printfeed(FILE *fp, const char *feedname) printf("Date: %s\n", timebuf); printf("From: %s <sfeed@>\n", fields[FieldAuthor][0] ? fields[FieldAuthor] : "unknown"); printf("To: %s <%s@%s>\n", user, user, host); - if (feedname[0]) - printf("Subject: [%s] %s\n", feedname, fields[FieldTitle]); - else - printf("Subject: %s\n", fields[FieldTitle]); + printf("Subject: %s\n", fields[FieldTitle]); printf("Message-ID: <%s%s%lu@%s>\n", fields[FieldUnixTimestamp], fields[FieldUnixTimestamp][0] ? "." : "",