[Nmh-workers] Incorporating RSS and Atom feeds

2017-05-19 Thread Thomas Levine
I have incorporated RSS and Atom feeds as MH messages so that I may read the
feeds with nmh.
https://pypi.python.org/pypi/fh
https://thomaslevine.com/scm/fh/artifact/4f0dd5f8873a8d17

Has someone else already written a better version of this? My implementation
so far has only some of the features that I want.

___
Nmh-workers mailing list
Nmh-workers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/nmh-workers


Re: [Nmh-workers] Incorporating RSS and Atom feeds

2017-05-19 Thread Leonardo Taccari
Hello Thomas!

Thomas Levine writes:
> I have incorporated RSS and Atom feeds as MH messages so that I may read the
> feeds with nmh.
> https://pypi.python.org/pypi/fh
> https://thomaslevine.com/scm/fh/artifact/4f0dd5f8873a8d17
> 
> Has someone else already written a better version of this? My implementation
> so far has only some of the features that I want.

I'm pretty happy with rss2email. Apart some (pkgsrc) LOCALPATCHES[0]
all the works is done by an AWK script (and `rsssm' calls it in order to
ignore all possible - and irrelevant - sendmail flags passed by
rss2email):

% cat rsssm   
#!/bin/sh 

rsssm-plumber 
% cat rsssm-plumber   
#!/usr/bin/awk -f 

/^To:/ {  
if (!folder) {
to = $2   
sub(/@.*/, "", to)  
folder = to   
storer = "MH=~/.mh_rss_profile /usr/pkg/libexec/nmh/rcvstore +" 
folder  
} 
} 
  
{ 
if (!storer) {
lines = (lines) ?  lines "\n" $0 : $0   
} else {  
if (lines) {  
print lines "\n" $0 | storer
lines = ""  
} else {  
print $0 | storer   
} 
} 
} 

END { 
close(storer) 
} 

...then I just set in ~/.config/rss2email.cfg

 email-protocol = sendmail
 sendmail = /home/leot/bin/rsssm

...and adjust every feed entry as follows:

 [feed.example]
 url = http://www.example.org/feed.rss
 to = example@rss2email.invalid

In that way `rsssm-plumber' will just process the `To:' header and
then store the feed^Wmails accordingly in the `+example' folder.


[0]: https://www.NetBSD.org/~leot/pkgsrc-localpatches/mail/rss2email/

___
Nmh-workers mailing list
Nmh-workers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/nmh-workers


Re: [Nmh-workers] Incorporating RSS and Atom feeds

2017-05-19 Thread Ken Hornstein
>I have incorporated RSS and Atom feeds as MH messages so that I may read the
>feeds with nmh.
>https://pypi.python.org/pypi/fh
>https://thomaslevine.com/scm/fh/artifact/4f0dd5f8873a8d17
>
>Has someone else already written a better version of this? My implementation
>so far has only some of the features that I want.

I get torn about the idea of writing an external tool to interface with
things like that, or just making the backend talk to different stores.
I see the advantages and disadvantges of each.  In terms of technical
challenges, I think they are roughly equivalent; you need to keep track
of the same things.  nmh needs some serious rototilling to create an API
that can handle different backend stores ... sigh. Someday.

--Ken

___
Nmh-workers mailing list
Nmh-workers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/nmh-workers


Re: [Nmh-workers] Incorporating RSS and Atom feeds

2017-05-20 Thread Ralph Corderoy
Hi Thomas,

Like Leonardo, I'm happy with rss2email(1).  With the death of Aaron
Swartz, its maintainership has bounced around a little and last I looked
it had atrophied after someone converted its data store to shiny JSON
format from Python's nippy pickle, with a tedious slowdown in
performance.  But it does.  Given you seem to like Python, you might
want to take it on.  :-)   https://github.com/wking/rss2email/issues/93

-- 
Cheers, Ralph.
https://plus.google.com/+RalphCorderoy

___
Nmh-workers mailing list
Nmh-workers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/nmh-workers


Re: [nmh-workers] [Nmh-workers] Incorporating RSS and Atom feeds

2018-05-09 Thread Thomas Levine
Ralph Corderoy writes:
> Hi Thomas,
>
> Like Leonardo, I'm happy with rss2email(1).  With the death of Aaron
> Swartz, its maintainership has bounced around a little and last I looked
> it had atrophied after someone converted its data store to shiny JSON
> format from Python's nippy pickle, with a tedious slowdown in
> performance.  But it does.  Given you seem to like Python, you might
> want to take it on.  :-)   https://github.com/wking/rss2email/issues/93
>
> -- 
> Cheers, Ralph.
> https://plus.google.com/+RalphCorderoy

In the last year the many improvements rss2email have been merged and
packaged widely.

However, I still sought additional features. I just wrote something very
similar to rss2email, and I fortunately managed to come up with
a different name. I didn't manage to subscribe to the rss2email mailing
list, so I'll announce it here instead.
https://thomaslevine.com/scm/opml2email/dir?ci=tip

The main new features:

* The Reply-To header is set to the address of the author of the feed.
* Everything is stored in one OPML file.

Aside from these, I didn't implemented only the basic features.

-- 
nmh-workers
https://lists.nongnu.org/mailman/listinfo/nmh-workers