Open all unread items in browser

46 views
Skip to first unread message

Tanguy Kerdoncuff

unread,
Oct 15, 2016, 8:29:49 AM10/15/16
to newsbeuter
Hello all !

I have been using newsbeuter for a while and am very happy with it, this post is regarding a feature suggestion.
I usually display feeds with images (galleries, webcomics...) in the browser, and would rather instruct newsbeuter to open all the unread posts of a feed in a single stroke.
The attached patch demonstrates the mentioned behavior by overriding the capital O's OP_OPENBROWSER_AND_MARK that was unused in the feed list screen.

If there is interest for such a feature, I would be very happy to implement it properly and submit a pull request.
What should be done is imho :
- Use a dedicated command for this behavior in order to also access it from a feed's item list (OP_OPENALLBROWSER_AND_MARK)
- Stay coherent by implement the twin command that opens all items without marking as read (OP_OPENALLBROWSER)
- Add an option to limit the numbers of items opened at once, to avoid opening hundreds of tabs by mistake. This value should be controllable from the config file

Thanks, and let me know what you think.

--
Tanguy Kerdoncuff
0001-Adding-Open-in-browser-and-mark-as-read-to-feedlist-.patch

Alexander Batischev

unread,
Oct 16, 2016, 3:54:34 AM10/16/16
to newsb...@googlegroups.com
On Sat, Oct 15, 2016 at 05:29:49AM -0700, Tanguy Kerdoncuff wrote:
>I usually display feeds with images (galleries, webcomics...) in the
>browser, and would rather instruct newsbeuter to open all the unread posts
>of a feed in a single stroke.

>If there is interest for such a feature, I would be very happy to implement
>it properly and submit a pull request.

I actually do the same, and now wonder how I didn't come up with the
same idea! Count me as interested, and +1 from me for a PR.

>What should be done is imho :
>- Use a dedicated command for this behavior in order to also access it from
>a feed's item list (OP_OPENALLBROWSER_AND_MARK)
>- Stay coherent by implement the twin command that opens all items without
>marking as read (OP_OPENALLBROWSER)
>- Add an option to limit the numbers of items opened at once, to avoid
>opening hundreds of tabs by mistake. This value should be controllable from
>the config file

All three points seem right to me, and I have nothing to add. Looking
forward for your PR!

--
Regards,
Alexander Batischev

PGP key 356961A20C8BFD03
Fingerprint: CE6C 4307 9348 58E3 FD94 A00F 3569 61A2 0C8B FD03

signature.asc

Tanguy Kerdoncuff

unread,
Oct 16, 2016, 9:03:57 AM10/16/16
to newsbeuter
Thanks ! I'll start working on my fork and post updates here.

--
Tanguy Kerdoncuff

Tanguy Kerdoncuff

unread,
Oct 18, 2016, 6:04:12 AM10/18/16
to newsbeuter
Finished implementing aforementioned features in the following fork :
https://github.com/tkerdonc/newsbeuter

For now, the open-all-in-browser and open-all-in-browser-and-mark-read commands are unbound by default to avoid someone unwillingly opening multiple tabs.
These commands also open a maximal number of articles at each call, controlled by the max-browser-tabs config option (default : 10 tabs).

Let me know if you need me to do some changes or if you feel this is ready for a PR.

--
Tanguy Kerdoncuff

Alexander Batischev

unread,
Oct 18, 2016, 7:45:39 AM10/18/16
to newsb...@googlegroups.com
On Tue, Oct 18, 2016 at 03:04:12AM -0700, Tanguy Kerdoncuff wrote:
>Let me know if you need me to do some changes or if you feel this is
>ready for a PR.

I'd rather you submit a PR and we use GitHub's code review tooling to
iterate on it. I will be able to easily comment on specific lines, for
example, and then view yet unreviewed updates that you've just pushed.

But before that, do two things:

1. Remove the last commit where you merge my master into your branch,
because when merged, it will just pollute history.

On a related note: it looks like you developed directly in master
branch. It's not a very good approach, for a number of reasons. Maybe
read a few sections from here to get the idea:
http://www-cs-students.stanford.edu/~blynn/gitmagic/ch04.html (check
http://www-cs-students.stanford.edu/~blynn/gitmagic/ for translations
if you need one.)

2. Format your commit messages properly. Here's a good write-up on the
matter: http://chris.beams.io/posts/git-commit/ (Scroll down to "The
seven rules of a great git commit message" if you're in a hurry.) You
can easily do that with `git rebase --interactive`.
signature.asc

Tanguy Kerdoncuff

unread,
Oct 18, 2016, 8:05:34 AM10/18/16
to newsbeuter
Thanks for the feedback and advice, I'll do that and submit a PR.

--
Tanguy Kerdoncuff
Reply all
Reply to author
Forward
0 new messages