Specifying more than one 'urls-source'

122 views
Skip to first unread message

Adrian Larumbe

unread,
Jul 6, 2022, 1:38:27 PM7/6/22
to news...@googlegroups.com
Hi everyone,

Recently I installed the News RSS App on my personal Nextcloud instance and
wanted to test interoperability with Newsboat. I decided to follow this tutorial
site:

https://gideonwolfe.com/posts/workflow/newsboat/

One directive it sets is 'urls-source "ocnews"'. A look at
https://newsboat.org/releases/2.10/docs/newsboat.html reveals the meaning of
this directive:

'This configuration command sets the source where URLs shall be retrieved
from. By default, this is ~/.newsboat/urls. Alternatively, you can set it to
"opml", which enables newsboat’s OPML online subscription mode, to "ttrss" which
enables newsboat’s Tiny Tiny RSS support, to "oldreader", which enables
newsboat’s The Old Reader support, to "newsblur", which enables NewsBlur
support, or "feedhq" for FeedHQ support, or "ocnews" for ownCloud News
support. Query feed specifications will be read from the local urls file
regardless of this setting.'

Now this makes me wonder, I've been using the ~/.newsboat/urls file for quite
some time and have a fairly long collection of feeds there. Does that mean that
setting urls-source "ocnews" would prevent loading the old RSS feeds in the new
configuration?

In other words, is there any way I can specify more than one urls-source so that
both my Newscloud sync rss's and the ones in the urls file are used?

Kind Regards,
Adrian Larumbe

Alexander Batischev

unread,
Jul 6, 2022, 2:09:21 PM7/6/22
to Adrian Larumbe, news...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Hi,

I noticed your question on IRC before I noticed this email :) So you
already got the answer, but for the sake of those who may stumble upon
this post later, I'll write a summary below.

On Wed, Jul 06, 2022 at 06:38:24PM +0100, Adrian Larumbe wrote:
>Does that mean that setting urls-source "ocnews" would prevent loading
>the old RSS feeds in the new configuration?

Yes, it will. Furthermore, if you have cleanup-on-quit enabled (which is
the default), then upon starting Newsboat with urls-source "ocnews" and
quitting it your cache file will be cleaned of feeds that are no longer
known to Newsboat. In other words:

You will lose your entire archive!

To prevent this, copy the cache.db file *before* your change the urls
source. If you already launched Newsboat with new configuration, but
haven't quit it yet, you can try waiting for it to finish reloading
feeds and then kill it with `pkill newsboat`. This might leave you with
a corrupted database though. We also intend to change the default for
clanup-on-quit in the next major release, to make situations like this
less likely to happen.

>In other words, is there any way I can specify more than one
>urls-source so that both my Newscloud sync rss's and the ones in the
>urls file are used?

There isn't. When using a remote service like Nextcloud News, the only
thing you can put into Newsboat's urls file is query feeds.

So my suggestion is:

1. make a copy of your existing cache.db and urls files;

2. export your URLs to an OPML file with:

newsboat --export-to-opml > feeds.opml

3. import that file into Nextcloud News. I don't know for sure if they
support that, but OPML is the standard format for this, so they
probably do;

4. reconfigure Newsboat to use ocnews as a source, and use that from now
on;

5. when you need to consult your old articles, run Newsboat like so:

newsboat --cache-file=backup_cache.db --url-file=backup_urls

- --
Regards,
Alexander Batischev

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

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEzmxDB5NIWOP9lKAPNWlhogyL/QMFAmLFz8UACgkQNWlhogyL
/QOWRBAAz+DD+OLLFGDjwHyRRpMPn2On9QsdDxOuPgjpfVpQ3Udfd73tXkD8bWAG
Q0oJfq3woDzJDzCBmHsLzW1p8CbXIXfHTGfKGtNGJt+F/7oRpXvU08OUYCjBNyia
3ReeP5gRooRXmmZqZ9OjaXLtuCt+U07MMTjNQe5HpXtA39R8DH4OTLisgHtQHhxK
MncWUtxC/wzzWVVVbjIFnUsV5HfW/3pSl7Zh/kuYyBeFD6mQxS/XuL4RAtvsG7sD
BL20hTXOjUQ2VOANFJH3G5awOBe8zg79l+2iPVJyep+T8biSCP2FxI7yMZDXYUKe
qkc2Xh2E3tYwFsK81lE69edL1A1xs8HQ2YX0Cu/VBbvqcX9T3VbkaKDxkRTmRWma
bvJl01RKBgm9NrIr5hvJWnbNdQXduqkHPn3zpOniXSxM/bvBqaZj5XhdeplBd/Lo
nHE9SDFioXWx3k2lNfPInI5NERVQ9hO/IbFdtY/jwPeEFU7nxDU+qSffqzjNByAt
iOb3l+BMCyqXtL6lfMFXQbK4clVADSd+7qO+XFJX+azLEGrQyWKTXqrRhDSjxghY
sb9tUAD2IlblF6KaAB15ghzpVjZQeI6xi1TEzDV8cdbqGvQCuidQLZ9Rw7jtPMP2
wJUmOwWiZEEbu+RcBWEhlIatJDHjavisSyNslsHFb+rNMEY10mI=
=3Gr8
-----END PGP SIGNATURE-----
Reply all
Reply to author
Forward
0 new messages