rsstail.py
rsstail.py copied to clipboard
Could you provide some api for a tool to notify a new feed/rss received?
Could you provide some api for a tool to notify a new feed/rss received?
Hello and sorry for the delay. What is it exactly that you are trying to do with rsstail? This tool isn't more than a silly wrapper around feedparser.
I just want to monitor some fee/rss, when something happened, I want to show a notification on my ubuntu desktop. Maybe you can add a hook , or method field , if it is not null, then call it.
Wouldn't it be easier to handle this externally? Something along the lines of:
rsstail $url | while read line; do
echo $line
notify-send title body
done
works very well, thank you @gvalkov.
@hfeeki you may want to check out my fork
It lets you pass a custom function that get's called with the new feed entries during each loop.
from rsstail import tail
tail(urls, write_handler=lambda entries: <do stuff>)
Hello @reubano. I had a look at your fork and while there are many things I like, I think we'll have too many disagreements if we were to ever try and merge our two projects. At this point, it may be better if you called your fork something other than rsstail and published it on pypi.
I appreciate the bug fixes and some of the new features, but the rest just doesn't seem necessary to me. However, I wanted rsstail.py to be minimal and in the spirit of the original rsstail. I understand that you may not share the same goal, so I absolutely don't mean to discourage you from working on your fork. With that said, here are a few of the changes I disagree with:
- Dropping Python 2.7 support for no reason, when all the compatibility work was already done. When Python 2.7 is discontinued in 2020 I will be the first to release Python 3 only versions of my packages.
- Your
pkutils
library adds confusion and cruft to the project. Vanilla python packaging and a makefile or task file (i.e. the invoke tool) work well enough, imho. If I were to use a setuptools helper, I would go with pbr. -
Pygogo
just seems like an unnecessary dependency. - The refactorings seem to be more about replacing the idiosyncrasies of my way of doing things with yours.
Best of luck with your fork :+1:
Thanks for the comments @gvalkov. Re Py2, my thoughts are anyone who wants support for it can continue to use your original version. My fork is meant to be a Py3 reinterpretation. You are correct in that many of the changes, e.g., the extra deps and removing the zip script, are just me doing things my way.
I'm specifically addressing the need to send email notifications to my mailing list whenever I write a new blog post. So that's the motivation behind many of the additions like cache and (soon to be pushed) redis support.
There's already a feedtail
on pypi, so as soon as I can come up with a suitable name, I rename my fork and publish. Thanks for starting this project though! It's the only thing I found that came close to doing what I needed.