NEWSBOAT(1) | NEWSBOAT(1) |
NAME¶
newsboat - an RSS/Atom feed reader for text terminals
SYNOPSIS¶
newsboat [-r] [-e] [-i opmlfile] [-u urlfile] [-c cachefile] [-C configfile] [-X] [-o] [-x <command> ...] [-h]
DESCRIPTION¶
newsboat is an RSS/Atom feed reader for text terminals. RSS and Atom are a number of widely-used XML formats to transmit, publish and syndicate articles, for example news or blog articles. Newsboat is designed to be used on text terminals on Unix or Unix-like systems such as GNU/Linux, BSD or Mac OS X.
OPTIONS¶
-h, --help
-r, --refresh-on-start
-e, --export-to-opml
-X, --vacuum
-v, -V, --version
-i opmlfile, --import-from-opml=opmlfile
-u urlfile, --url-file=urlfile
-c cachefile, --cache-file=cachefile
-C configfile, --config-file=configfile
-x command ..., --execute=command...
-l loglevel, --log-level=loglevel
-d logfile, --log-file=logfile
-E file, --export-to-file=file
-I file, --import-from-file=file
FIRST STEPS¶
After you’ve installed newsboat, you can run it for the first time by typing newsboat on your command prompt. This will bring you the following message:
Error: no URLs configured. Please fill the file /home/ak/.newsboat/urls with RSS feed URLs or import an OPML file. newsboat 2.10 usage: ./newsboat [-i <file>|-e] [-u <urlfile>] [-c <cachefile>] [-x <command> ...] [-h]
-e, --export-to-opml export OPML feed to stdout
-r, --refresh-on-start refresh feeds on start
-i, --import-from-opml=<file> import OPML file
-u, --url-file=<urlfile> read RSS feed URLs from <urlfile>
-c, --cache-file=<cachefile> use <cachefile> as cache file
-C, --config-file=<configfile> read configuration from <configfile>
-X, --vacuum compact the cache
-x, --execute=<command>... execute list of commands
-q, --quiet quiet startup
-v, --version get version information
-l, --log-level=<loglevel> write a log with a certain loglevel (valid values: 1 to 6)
-d, --log-file=<logfile> use <logfile> as output log file
-E, --export-to-file=<file> export list of read articles to <file>
-I, --import-from-file=<file> import list of read articles from <file>
-h, --help this help
This means that newsboat can’t start without any configured feeds. To add feeds to newsboat, you can either add URLs to the configuration file $HOME/.newsboat/urls or you can import an OPML file by running newsboat -i blogroll.opml. To manually add URLs, open the file with your favorite text editor and add the URLs, one per line:
http://rss.cnn.com/rss/cnn_topstories.rss http://newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml
If you need to add URLs that have restricted access via username/password, simply provide the username/password in the following way:
In order to protect username and password, make sure that $HOME/.newsboat/urls is only readable by you and, optionally, your group:
$ chmod u=rw,g=r,o= ~/.newsboat/urls
Newsboat also makes sure that usernames and passwords within URLs aren’t displayed in its user interface. In case there is a @ in the username, you need to write it as %40 instead so that it can be distinguished from the @ that separates the username/password part from the hostname part.
You can also configure local files as feeds, by prefixing the local path with file:// and adding it to the urls file:
Now you can run newsboat again, and it will present you with a controllable list of the URLs that you configured previously. You can now start downloading the feeds, either by pressing "R" to download all feeds, or by pressing "r" to download the currently selected feed. You can then select a feed you want to read, and by pressing "Enter", you can go to the article list for this feed. This works even while the downloading is still in progress.
You can now see the list of available articles by their title. A "N" on the left indicates that an article wasn’t read yet. Pressing "Enter" brings you to the content of the article. You can scroll through this text, and also run a browser (default: lynx) to view the complete article if the content is empty or just an abstract or a short description. Each URL in the article has a number next to it; to open it, type # and then the number, then press "Enter". For single-digit links, like 3, you can just press that number on the keyboard.
Pressing "q" brings you back to the article list, and pressing "q" again brings you back to the feed list. Pressing "q" a third time then closes newsboat.
Newsboat caches the article that it downloads. This means that when you start newsboat again and reload a feed, the old articles can still be read even if they aren’t in the current RSS feeds anymore. Optionally you can configure how many articles shall be preserved by feed so that the article backlog doesn’t grow endlessly (see max-items below).
Newsboat also uses a number of measures to preserve the users' and feed providers' bandwidth, by trying to avoid unnecessary feed downloads through the use of conditional HTTP downloading. It saves every feed’s "Last-Modified" and "ETag" response header values (if present) and advises the feed’s HTTP server to only send data if the feed has been updated by modification date/time or "ETag" header. This doesn’t only make feed downloads for RSS feeds with no new updates faster, it also reduces the amount of transferred data per request. Conditional HTTP downloading can be optionally disabled per feed by using the always-download configuration command.
Several aspects of newsboat’s behaviour can be configured via a configuration file config, which is stored next to the urls file. This configuration file contains lines in the form <config-command> <arg1> .... The configuration file can also contain comments, which start with the # character and go as far as the end of line. If you need to enter a configuration argument that contains spaces, use quotes (") around the whole argument. It’s even possible to integrate the output of external commands into the configuration. The text between two backticks (`) is evaluated as shell command, and its output is put on its place instead. This works like backtick evaluation in Bourne-compatible shells and allows users to use external information from the system within the configuration. Backticks and # characters can be escaped with a backslash (e.g. \` and \#); in that case, they’ll be replaced with literal ` or # in the configuration.
Searching for articles is possible in newsboat, too. Just press the "/" key, enter your search phrase, and the title and content of all articles are searched for it. When you do a search from the list of feeds, all articles of all feeds will be searched. When you do a search from the article list of a feed, only the articles of the currently viewed feed are searched. When opening an article from a search result dialog, the search phrase is highlighted.
The history of all your searches is saved to the filesystem, to the history.search file (stored next to the cache.db file). By default, the last 100 search phrases are stored, but this limited can be influenced through the history-limit configuration variable. To disable search history saving, simply set the history-limit to 0.
CONFIGURATION COMMANDS¶
always-display-description (parameters: [yes/no]; default value: no)
always-download (parameters: <url> [<url>...]; default value: n/a)
article-sort-order (parameters: <sortfield>[-<direction>]; default value: date)
articlelist-format (parameters: <format>; default value: "%4i %f %D %6L %?T?|%-17T| ?%t")
articlelist-title-format (parameters: <format>; default value: "%N %V - Articles in feed '%T' (%u unread, %t total)%?F? matching filter `%F'&? - %U")
auto-reload (parameters: [yes/no]; default value: no)
bind-key (parameters: <key> <operation> [<dialog>]; default value: n/a)
bookmark-autopilot (parameters: [yes/no]; default value: no)
bookmark-cmd (parameters: <command>; default value: "")
bookmark-interactive (parameters: [yes/no]; default value: no)
browser (parameters: <command>; default value: %BROWSER, otherwise lynx)
cache-file (parameters: <path>; default value: "~/.newsboat/cache.db" or "~/.local/share/cache.db" (see "Files" section))
cleanup-on-quit (parameters: [yes/no]; default value: yes)
color (parameters: <element> <fgcolor> <bgcolor> [<attribute> ...]; default value: n/a)
confirm-exit (parameters: [yes/no]; default value: no)
cookie-cache (parameters: <path>; default value: "")
datetime-format (parameters: <date/time format>; default value: %b %d)
define-filter (parameters: <name> <filterexpr>; default value: n/a)
delete-read-articles-on-quit (parameters: [yes/no]; default value: no)
dialogs-title-format (parameters: <format>; default value: "%N %V - Dialogs")
dirbrowser-title-format (parameters: <format>; default value: "%N %V - %?O?Open Directory&Save File? - %f")
display-article-progress (parameters: [yes/no]; default value: yes)
download-full-page (parameters: [yes/no]; default value: no)
download-retries (parameters: <number>; default value: 1)
download-timeout (parameters: <number>; default value: 30)
error-log (parameters: <path>; default value: "")
external-url-viewer (parameters: <command>; default value: "")
feed-sort-order (parameters: <sortfield>[-<direction>]; default value: none)
feedhq-flag-share (parameters: <flag>; default value: "")
feedhq-flag-star (parameters: <flag>; default value: "")
feedhq-login (parameters: <login>; default value: "")
feedhq-min-items (parameters: <number>; default value: 20)
feedhq-password (parameters: <password>; default value: "")
feedhq-passwordfile (parameters: <path>; default value: "")
feedhq-passwordeval (parameters: <command>; default value: "")
feedhq-show-special-feeds (parameters: [yes/no]; default value: yes)
feedhq-url (parameters: <url>; default value: "https://feedhq.org/")
feedlist-format (parameters: <format>; default value: "%4i %n %11u %t")
feedlist-title-format (parameters: <format>; default value: "%N %V - %?F?Feeds&Your feeds? (%u unread, %t total)%?F? matching filter `%F'&?%?T? - tag `%T'&?")
filebrowser-title-format (parameters: <format>; default value: "%N %V - %?O?Open File&Save File? - %f")
goto-first-unread (parameters: [yes/no]; default value: yes)
goto-next-feed (parameters: [yes/no]; default value: yes)
help-title-format (parameters: <format>; default value: "%N %V - Help")
highlight (parameters: <target> <regex> <fgcolor> [<bgcolor> [<attribute> ...]]; default value: n/a)
highlight-article (parameters: <filterexpr> <fgcolor> <bgcolor> [<attribute> ...]; default value: n/a)
history-limit (parameters: <number>; default value: 100)
html-renderer (parameters: <command>; default value: internal)
http-auth-method (parameters: <method>; default value: any)
ignore-article (parameters: <feed> <filterexpr>; default value: n/a)
ignore-mode (parameters: [download/display]; default value: download)
include (parameters: <path>; default value: n/a)
itemview-title-format (parameters: <format>; default value: "%N %V - Article '%T' (%u unread, %t total)")
inoreader-app-id (parameters: <string>; default value: "")
inoreader-app-key (parameters: <string>; default value: "")
inoreader-flag-share (parameters: <flag>; default value: "")
inoreader-flag-star (parameters: <flag>; default value: "")
inoreader-login (parameters: <login>; default value: "")
inoreader-min-items (parameters: <number>; default value: 20)
inoreader-password (parameters: <password>; default value: "")
inoreader-passwordfile (parameters: <path>; default value: "")
inoreader-passwordeval (parameters: <command>; default value: "")
inoreader-show-special-feeds (parameters: [yes/no]; default value: yes)
keep-articles-days (parameters: <number>; default value: 0)
macro (parameters: <macro key> <command list>; default value: n/a)
mark-as-read-on-hover (parameters: [yes/no]; default value: no)
max-download-speed (parameters: <number>; default value: 0)
max-browser-tabs (parameters: <number>; default value: 10)
max-items (parameters: <number>; default value: 0)
miniflux-login (parameters: <username>; default value: "")
miniflux-password (parameters: <password>; default value: "")
miniflux-passwordfile (parameters: <path>; default value: "")
miniflux-passwordeval (parameters: <command>; default value: "")
miniflux-url (parameters: <url>; default value: "")
newsblur-login (parameters: <login>; default value: "")
newsblur-min-items (parameters: <number>; default value: 20)
newsblur-password (parameters: <password>; default value: "")
newsblur-passwordfile (parameters: <path>; default value: "")
newsblur-passwordeval (parameters: <command>; default value: "")
newsblur-url (parameters: <url>; default value: "https://newsblur.com")
notify-always (parameters: [yes/no]; default value: no)
notify-beep (parameters: [yes/no]; default value: no)
notify-format (parameters: <string>; default value: "newsboat: finished reload, %f unread feeds (%n unread articles total)")
notify-program (parameters: <command>; default value: "")
notify-screen (parameters: [yes/no]; default value: no)
notify-xterm (parameters: [yes/no]; default value: no)
ocnews-flag-star (parameters: <character>; default value: "")
ocnews-login (parameters: <username>; default value: "")
ocnews-password (parameters: <password>; default value: "")
ocnews-passwordfile (parameters: <path>; default value: "")
ocnews-passwordeval (parameters: <command>; default value: "")
ocnews-url (parameters: <url>; default value: "")
oldreader-flag-share (parameters: <flag>; default value: "")
oldreader-flag-star (parameters: <flag>; default value: "")
oldreader-login (parameters: <login>; default value: "")
oldreader-min-items (parameters: <number>; default value: 20)
oldreader-password (parameters: <password>; default value: "")
oldreader-passwordfile (parameters: <path>; default value: "")
oldreader-passwordeval (parameters: <command>; default value: "")
oldreader-show-special-feeds (parameters: [yes/no]; default value: yes)
openbrowser-and-mark-jumps-to-next-unread (parameters: [yes/no]; default value: no)
opml-url (parameters: <url> ...; default value: "")
pager (parameters: [<command>/internal]; default value: internal)
podcast-auto-enqueue (parameters: [yes/no]; default value: no)
prepopulate-query-feeds (parameters: [yes/no]; default value: no)
ssl-verifyhost (parameters: [yes/no]; default value: yes)
ssl-verifypeer (parameters: [yes/no]; default value: yes)
proxy-auth-method (parameters: <method>; default value: any)
proxy-auth (parameters: <auth>; default value: n/a)
proxy-type (parameters: <type>; default value: http)
proxy (parameters: <server:port>; default value: n/a)
refresh-on-startup (parameters: [yes/no]; default value: no)
reload-only-visible-feeds (parameters: [yes/no]; default value: no)
reload-threads (parameters: <number>; default value: 1)
reload-time (parameters: <number>; default value: 60)
reset-unread-on-update (parameters: <url> [<url>...]; default value: n/a)
run-on-startup (parameters: <list of operations>; default value: n/a)
save-path (parameters: <path-to-directory>; default value: ~/)
scrolloff (parameters: <number>; default value: 0)
search-highlight-colors (parameters: <fgcolor> <bgcolor> [<attribute> ...]; default value: black yellow bold)
searchresult-title-format (parameters: <format>; default value: "%N %V - Search results (%u unread, %t total)%?F? matching filter `%F'&?")
selectfilter-title-format (parameters: <format>; default value: "%N %V - Select Filter")
selecttag-format (parameters: <format>; default value: "%4i %T (%u)")
selecttag-title-format (parameters: <format>; default value: "%N %V - Select Tag")
show-keymap-hint (parameters: [yes/no]; default value: yes)
show-title-bar (parameters: [yes/no]; default value: yes)
show-read-articles (parameters: [yes/no]; default value: yes)
show-read-feeds (parameters: [yes/no]; default value: yes)
suppress-first-reload (parameters: [yes/no]; default value: no)
swap-title-and-hints (parameters: [yes/no]; default value: no)
text-width (parameters: <number>; default value: 0)
toggleitemread-jumps-to-next-unread (parameters: [yes/no]; default value: no)
ttrss-flag-publish (parameters: <character>; default value: "")
ttrss-flag-star (parameters: <character>; default value: "")
ttrss-login (parameters: <username>; default value: "")
ttrss-mode (parameters: [multi/single]; default value: multi)
ttrss-password (parameters: <password>; default value: "")
ttrss-passwordfile (parameters: <path>; default value: "")
ttrss-passwordeval (parameters: <command>; default value: "")
ttrss-url (parameters: <url>; default value: "")
unbind-key (parameters: <key> [<dialog>]; default value: n/a)
urls-source (parameters: <source>; default value: "local")
urlview-title-format (parameters: <format>; default value: "%N %V - URLs")
use-proxy (parameters: [yes/no]; default value: no)
user-agent (parameters: <string>; default value: "")
wrap-scroll (parameters: [yes/no]; default value: no)
AVAILABLE OPERATIONS¶
open (default key: ENTER)
quit (default key: q)
hard-quit (default key: Q)
reload (default key: r)
reload-all (default key: R)
mark-feed-read (default key: A)
mark-all-feeds-read (default key: C)
mark-all-above-as-read (default key: n/a)
save (default key: s)
save-all (default key: n/a)
next-unread (default key: n)
prev-unread (default key: p)
next (default key: J)
prev (default key: K)
random-unread (default key: ^K)
open-in-browser (default key: o)
open-in-browser-and-mark-read (default key: O)
open-all-unread-in-browser (default key: n/a)
open-all-unread-in-browser-and-mark-read (default key: n/a)
help (default key: ?)
toggle-source-view (default key: ^U)
toggle-article-read (default key: N)
toggle-show-read-feeds (default key: l)
show-urls (default key: u)
clear-tag (default key: ^T)
set-tag (default key: t)
open-search (default key: /)
goto-url (default key: #)
one (default key: 1)
two (default key: 2)
three (default key: 3)
four (default key: 4)
five (default key: 5)
six (default key: 6)
seven (default key: 7)
eight (default key: 8)
nine (default key: 9)
zero (default key: 0)
enqueue (default key: e)
edit-urls (default key: E)
reload-urls (default key: ^R)
redraw (default key: ^L)
cmdline (default key: :)
set-filter (default key: F)
select-filter (default key: f)
clear-filter (default key: ^F)
bookmark (default key: ^B)
edit-flags (default key: ^E)
next-unread-feed (default key: ^N)
prev-unread-feed (default key: ^P)
next-feed (default key: j)
prev-feed (default key: k)
delete-article (default key: D)
delete-all-articles (default key: ^D)
purge-deleted (default key: $)
view-dialogs (default key: v)
close-dialog (default key: ^X)
next-dialog (default key: ^V)
prev-dialog (default key: ^G)
pipe-to (default key: _| _)
sort (default key: g)
rev-sort (default key: G)
up (default key: UP)
down (default key: DOWN)
pageup (default key: PPAGE)
pagedown (default key: NPAGE)
home (default key: HOME)
end (default key: END)
macro-prefix (default key: ,)
switch-focus (default key: TAB)
TAGGING¶
Newsboat comes with the possibility to categorize or "tag", as we call it, RSS feeds. Every RSS feed can be assigned 0 or more tags. Within newsboat, you can then select to only show RSS feeds that match a certain tag. That makes it easy to categorize your feeds in a flexible and powerful way.
Usually, the urls file contains one RSS feed URL per line. To assign a tag to an RSS feed, simply attach it as a single word, separated by blanks such as space or tab. If the tag needs to contain spaces, you must use quotes (") around the tag (see example below). An example urls file may look like this:
https://blog.fefe.de/rss.xml?html interesting conspiracy news "cool stuff" https://rss.orf.at/news.xml news orf https://www.heise.de/newsticker/heise.rdf news interesting
When you now start newsboat with this configuration, you can press "t" to select a tag. When you select the tag "news", you will see all three RSS feeds. Pressing "t" again and e.g. selecting the "conspiracy" tag, you will only see the <https://blog.fefe.de/rss.xml?html> RSS feed. Pressing "^T" clears the current tag, and again shows all RSS feeds, regardless of their assigned tags.
A special type of tag are tags that start with the tilde character (~). When such a tag is found, the feed title is set to the tag name (excluding the ~ character). These type of tags are ignored when any kind of "first tag" property is used. With this feature, you can give feeds any title you want in your feed list:
https://rss.orf.at/news.xml "~ORF News"
Another special type of tag are tags that start with the exclamation mark (!). When such a tag is found, the feed is hidden from the regular list of feeds and its content can only be found through a query feed.
https://rss.orf.at/news.xml "!ORF News (hidden)"
SCRIPTS AND FILTERS¶
Newsboat contains support for Snownews extensions. The RSS feed readers Snownews and Liferea share a common way of extending the readers with custom scripts. Two mechanisms, namely "execurl" and "filter" type scripts, are available and supported by newsboat.
An "execurl" script can be any program that gets executed and whose output is interpreted as RSS feed, while "filter" scripts are fed with the content of a configured URL and whose output is interpreted as RSS feed.
The configuration is simple and straight-forward. Just add to your urls file configuration lines like the following ones:
exec:~/bin/execurl-script filter:~/bin/filter-script:https://some.test/url
The first line shows how to add an execurl script to your configuration: start the line with exec: and then immediately append the path of the script that shall be executed. If this script requires additional parameters, simply use quotes (see [_using_double_quotes] for details):
"exec:~/bin/execurl-script param1 param2"
The second line shows how to add a filter script to your configuration: start the line with filter:, then immediately append the path of the script, then append a colon (:), and then append the URL of the file that shall be fed to the script. Again, if the script requires any parameters, simply quote the whole thing:
"filter:~/bin/filter-script param1 param2:https://url/foobar"
In both cases, the tagging feature as described above is still available:
exec:~/bin/execurl-script tag1 tag2 "quoted tag" filter:~/bin/filter-script:https://some.test/url tag3 tag4 tag5
If you need to write your own extension, see this <https://web.archive.org/web/20090724045314/http://kiza.kcore.de/software/snownews/snowscripts/writing> short guide" for an introduction. A collection <https://github.com/kouya/snownews/tree/master/contrib> of existing scripts" might also help.
Newsboat comes with an example exec script which shows one way to generate an RSS channel. It also includes a way to see which exact arguments are passed to the script by Newsboat. This example can be found in the doc/examples subdirectory.
COMMAND LINE¶
Like other text-oriented software, Newsboat contains an internal commandline to modify configuration variables ad hoc and to run own commands. It provides a flexible access to the functionality of Newsboat which is especially useful for advanced users.
To start the commandline, type ":". You will see a ":" prompt at the bottom of the screen, similar to tools like vi(m) or mutt. You can now enter commands. Pressing the "Enter" key executes the command (possibly giving feedback to the user) and closes the commandline. You can cancel entering commands by pressing the "Esc" key. The history of all the commands that you enter will be saved to the history.cmdline file, stored next to the cache.db file. The backlog is limited to 100 entries by default, but can be influenced by setting the history-limit configuration variable. To disable history saving, set the history-limit to 0.
The commandline provides you with some help if you can’t remember the full names of commandline commands. By pressing the "Tab" key, newsboat will try to automatically complete your command. If there is more than one possible completion, you can subsequently press the "Tab" key to cycle through all results. If no match is found, no suggestion will be inserted into the commandline. For the set command, the completion also works for configuration variable names.
In addition, some common key combination such as "Ctrl-G" (to cancel input), "Ctrl-K" (to delete text from the cursor position to the end of line), "Ctrl-U" (to clear the whole line) and "Ctrl-W" (to delete the word before the current cursor position) were added.
Please be aware that the input history of both the command line and the search functions are saved to the filesystems, to the files history.cmdline resp. history.search (stored next to the cache.db file). By default, the last 100 entries are saved, but this can be configured (configuration variable history-limit) and also totally disabled (by setting said variable to 0).
Currently, the following command line commands are available:
quit
q
save <filename>
set <variable>[=<value>|&|!]
tag <tagname>
goto <case-insensitive substring>
source <filename> [...]
dumpconfig <filename>
<number>
FILES¶
By default, Newsboat stores all the files in a traditional Unix fashion, i.e. in the "dotdir" located at ~/.newsboat. However, it also supports a modern way, XDG Base Directory Specification <https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html>, which splits the files between the following locations:
If these directories exist or the environment variables $XDG_CONFIG_HOME and $XDG_DATA_HOME are set, newsboat will use these directories, otherwise it will default to ~/.newsboat as its configuration directory.
If you’re currently using ~/.newsboat/ but wish to migrate to XDG directories, you should move the files as follows:
config, urls
cache.db, history.search, history.cmdline, queue
dotfiles
$HOME/.newsboat/urls
XDG
$HOME/.config/newsboat/urls
ENVIRONMENT¶
BROWSER
CURL_CA_BUNDLE
This option is useful if your libcurl is built without useful certificate information, and you can’t rebuild the library yourself.
EDITOR
PAGER
TMPDIR
VISUAL
XDG_CONFIG_HOME
XDG_DATA_HOME
SEE ALSO¶
AUTHOR¶
Alexander Batischev
2023-02-03 |