How to scroll the list of articles and automatically mark the scrolled articles as read?

214 views
Skip to first unread message

Roman Vasin

unread,
Mar 14, 2018, 11:32:01 AM3/14/18
to newsboat
Hello,

I use Feedly and newsbeuter at the same time. I use Feedly for feeds with frequent articles. So I use Feedly daily.

But I also have many feeds which I read rarely. Feedly keeps the list of articles only for 30 days.

So I use cron and newsbeuter to automatically these the articles.
Note: Feedly and newsbeuter/newsboat are used separately for different feeds.

The idea is that I may have many articles in each feed.
So I need to scroll the list of articles and the scrolled articles must be automatically marked as read. Because right now I have only option to press A to mark all articles as read. But I don't need it. This is one of the most important features.  
Because for example, I have 2000 unread articles in a feed. I scrolled out 100 articles. And I want to mark the articles I read. I don't want to mark all 2000 articles as read. 
Because I am planning to scroll the rest of 1900 articles later. (Maybe one week or even month later).

Kind regards,
Roman Vasin

Alexander Batischev

unread,
Mar 14, 2018, 1:47:59 PM3/14/18
to Roman Vasin, newsboat
Hi Roman,

On Wed, Mar 14, 2018 at 08:32:01AM -0700, Roman Vasin wrote:
>So I need to scroll the list of articles and the scrolled articles must
>be automatically marked as read.

I think mark-as-read-on-hover will work perfectly here, give it a try!
Docs:
https://newsboat.org/releases/2.10.2/docs/newsboat.html#mark-as-read-on-hover

--
Regards,
Alexander Batischev

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

signature.asc

Roman Vasin

unread,
Mar 14, 2018, 3:26:49 PM3/14/18
to newsboat
Well. It does not work the way I need it.
In fact when:
mark-as-read-on-hover yes
then I may use up and down keys to scroll the list of articles and this works as I need. 
But the problem is that I use pagedown command (and pageup) to scroll the list.
So this mark-as-read-on-hover  does not work when using pagedown command. The articles are not marked as read when using pagedown with enabled mark-as-read-on-hover option.

Kind regards,
Roman Vasin

Roman Vasin

unread,
Mar 14, 2018, 3:34:55 PM3/14/18
to newsboat
I think new option must be implemented: 
mark-as-read-on-pagedown

so it's not on hover event it is on pagedown command/event.

--
You received this message because you are subscribed to a topic in the Google Groups "newsboat" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/newsboat/QsHqsplX6Pc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to newsboat+unsubscribe@googlegroups.com.
To post to this group, send email to news...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/newsboat/cf65b3e8-7890-43cf-b938-49eda7d53a16%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Alexander Batischev

unread,
Mar 14, 2018, 3:50:26 PM3/14/18
to Roman Vasin, newsboat
On Wed, Mar 14, 2018 at 12:26:49PM -0700, Roman Vasin wrote:
>The articles are not marked as read when using pagedown with enabled
>mark-as-read-on-hover option.

So, to paraphrase your request: when a user presses Page Up or Page
Down, Newsboat should mark all items that are currently on screen as
read, and then proceed to previous/next page of the list. Is that what
you mean?
signature.asc

Roman Vasin

unread,
Mar 14, 2018, 3:59:55 PM3/14/18
to newsboat
Yes. That is exactly what I need. 

Because I have huge list of articles 2000 - 4000 unread articles in the list. It's hard to scroll it by up and down keys. The way I do is using Page Up andd Page Down. And I want to mark it as read.

Roman Vasin

unread,
Mar 14, 2018, 4:15:23 PM3/14/18
to newsboat
Again to make it more clear. My "workflow" is the following:

I open newsboat. 
I jump to a feed.
In feed I have 4000 articles.
Then I press Page Down about 4 - 8 times until I find an intersting article.
Then I jump to article and press o to open it in browser (w3m).
Then I read the article in the browser and press q in browser to quit.
Then again in the list of articles I press Page Down several times
and so on until I "can" read. 
That's way I make scroll maybe 2000 articles. 
Then I press q to quick newsboat.

And I open it several days later to repeat the "workflow".
So I don't need to press many keys like marking the article as read or making preview of article (I open it directly in browser).
But I don't want to loose unread articles. So I am trying to review all articles headers by such Page Down scrolling.

Roman Vasin

unread,
Mar 15, 2018, 3:02:54 AM3/15/18
to newsboat
Hello,

I am trying to view the source code. In function
itemlist_formaction::process_operation
or 
list_formaction::process_operation
I don't see the processing of OP_SK_PGDOWN
Where is it?


Alexander Batischev

unread,
Mar 15, 2018, 1:50:19 PM3/15/18
to Roman Vasin, newsboat
On Wed, Mar 14, 2018 at 12:59:55PM -0700, Roman Vasin wrote:
>Yes. That is exactly what I need.

Okay. I filed an issue about this,
https://github.com/newsboat/newsboat/issues/143 As usual, I don't have
a timeline for how it'll be implemented—it'll happen when someone
decides to write the code and docs for it. Thanks for reaching out and
describing the use-case!
Page Up and Page Down aren't handled by Newsboat—they're processed by
STFL, a library we're using for the user interface. So there's no place
in our code where you can add code that'll be executed when user presses
Page Up or Page Down.
signature.asc

Roman Vasin

unread,
Mar 15, 2018, 2:47:14 PM3/15/18
to newsboat
What I did today: 
I implemented another command: mark all articles from the beginning until current article as read. I assigned it "a" key.
So it may do the job for me. 
I will create a pull request maybe tomorrow. 

What is not clear for me:
For example I have 2000 read articles.
I want to delete and purge all these read articles in feed.
How can I do that?
It seem like I need to implement new command: delete all read articles in feed.

then it will be possible to press $ and purge these deleted articles.

>Page Up and Page Down aren't handled by Newsboat—they're processed by 
STFL, a library we're using for the user interface. So there's no place 
in our code where you can add code that'll be executed when user presses 
Page Up or Page Down. 

It still not clear for me now the articles are scrolled. Which code in newsboat displays the current page articles.

Alexander Batischev

unread,
Mar 15, 2018, 3:01:23 PM3/15/18
to Roman Vasin, newsboat
On Thu, Mar 15, 2018 at 11:47:14AM -0700, Roman Vasin wrote:
>What I did today:
>I implemented another command: mark all articles from the beginning until
>current article as read. I assigned it "a" key.
>So it may do the job for me.
>I will create a pull request maybe tomorrow.

Looking forward to it!

>What is not clear for me:
>For example I have 2000 read articles.
>I want to delete and purge all these read articles in feed.
>How can I do that?
>It seem like I need to implement new command: delete all read articles in
>feed.

Please, please read the documentation before coming up with new commands
and options. We have delete-read-articles-on-quit already, which is
pretty close to what you want:
https://newsboat.org/releases/2.10.2/docs/newsboat.html#delete-read-articles-on-quit

>>Page Up and Page Down aren't handled by Newsboat—they're processed by
>STFL, a library we're using for the user interface. So there's no place
>in our code where you can add code that'll be executed when user presses
>Page Up or Page Down.
>
>It still not clear for me now the articles are scrolled. Which code in
>newsboat displays the current page articles.

There's no such code in Newsboat itself—the scrolling is taken care of
by STFL. We create the whole list at once in
itemlist_formaction::do_update_visible_items(), give it to STFL in
itemlist_formaction::prepare() (itemlist_formaction.cpp:719), and STFL
does the "pagination" for us. Does that answer your question?
signature.asc

Roman Vasin

unread,
Mar 15, 2018, 3:03:15 PM3/15/18
to Alexander Batischev, newsboat
> delete-read-articles-on-quit
I think it's OK for me. I did not know about this command. There is not reason to implement new command in this case. 

Roman Vasin

unread,
Mar 15, 2018, 3:24:05 PM3/15/18
to newsboat
Reply all
Reply to author
Forward
0 new messages