「Newsraft」の版間の差分

提供: ArchWiki
ナビゲーションに移動 検索に移動
(→‎Usage: 飜訳)
(add en page link.)
1行目: 1行目:
 
[[Category:ニュースアグリゲータ]]
 
[[Category:ニュースアグリゲータ]]
 
[[Category:コンソールアプリケーション]]
 
[[Category:コンソールアプリケーション]]
  +
[[en:Newsraft]]
 
[https://codeberg.org/grisha/newsraft Newsraft] は {{pkg|ncurses}} フィードリーダーであり、[[Newsboat]] に触発されつつ、その軽量な代替品を目指しています。RSS 2.0 以下、Atom 1.0、RSS Content Module、Media RSS、DublinCore 1.1 Elements、および JSON Feed をサポートしています。
 
[https://codeberg.org/grisha/newsraft Newsraft] は {{pkg|ncurses}} フィードリーダーであり、[[Newsboat]] に触発されつつ、その軽量な代替品を目指しています。RSS 2.0 以下、Atom 1.0、RSS Content Module、Media RSS、DublinCore 1.1 Elements、および JSON Feed をサポートしています。
   

2023年10月6日 (金) 10:45時点における版

Newsraftncurses フィードリーダーであり、Newsboat に触発されつつ、その軽量な代替品を目指しています。RSS 2.0 以下、Atom 1.0、RSS Content Module、Media RSS、DublinCore 1.1 Elements、および JSON Feed をサポートしています。

インストール

newsraftAUR パッケージをインストールします。

設定

Newsraft の設定はオプションであり、デフォルトの設定を変更するか機能を追加するだけです。これは ~/.config/newsraft/config にエントリを追加することで実現されます。これにはリーダーとカラーの設定、内蔵されたアクションのためのキーバインディング(bind key action)およびシェルコマンド(bind key exec command)が含まれ、指定したプログラムでリンクを開くオプションもあります。セミコロンで区切ることで、一つのバインディングに複数のコマンドを関連付けることができます:

~/.config/newsraft/config
bind f exec feh "%l"
bind key action1; exec command1; action2; exec command2

デフォルトのキーバインディングは、不要な場合や別の目的で再利用するために unbind key で無効にすることができます。最後に、フィードファイルと同様に、# 記号はコメント行を指定し、newsraft によって無視されます。

例の設定

~/.config/newsraft/config
# Colors
set color-list-item-fg red
set color-list-item-unread-fg white

# Settings
set send-user-agent-header false

# Key bindings
bind d mark-read
unbind D
bind m exec mpv "%l"

利用可能なアクション、設定、およびデフォルトの全リストは、newsraft(1) で参照できます。

使用方法

Newsraft を起動する前に、フィードファイルを作成する必要があります。デフォルトのフィードファイルの場所と名前は ~/.config/newsraft/feeds です。このファイルにフィードへのリンクを記入したら、以下のコマンドで Newsraft を起動します:

$ newsraft

フィードの管理

フィードファイルには3種類の行を含めることができます。最初はフィードの URL で、テキストエディタで1行に1つのフィードを追加できます:

~/.config/newsraft/feeds
https://example.org/feed.xml "Lorem Ipsum Blog"

URL のみが厳密に必要です。Newsraft はフィードから提供された情報に基づいてフィードの名前を設定しようとします。別の名前が望ましい場合、URL と少なくとも1つの空白で区切った後に二重引用符で囲んでタイトルを追加できます。

次に、セクションヘッダーと呼ばれる行があります。これは @ 記号で始まり、少なくとも1つの空白とセクション名が続きます:

~/.config/newsraft/feeds
@ Section Header

The final type of entry in the feeds file are comments, which start with the # symbol: 最後の種類のエントリはコメントであり、# 記号で始まります:

~/.config/newsraft/feeds
# this line is completely ignored by newsraft

フィードの URL とセクションヘッダーは、個々のフィードの頻度がセクションの頻度を上書きする形で、自動更新の頻度を設定できます。期間は中括弧で囲んだ分数で指定されます:

~/.config/newsraft/feeds
@ Section Header {120}
https://example.org/feed2.xml "Lorem Ipsum Blog" {60}
https://example.org/feed3.xml
https://example.org/feed4.xml {0}

{0} を指定すると自動更新が無効になり、全体のフィード更新は Global セクションヘッダーを使用して指定できます。上記の例では、Section Header の下のすべてのフィードは2時間ごとに自動的に更新されますが、feed2 は1時間ごと、feed4 は自動更新されません。

基本的なデフォルトのコマンド

これらのキーバインディングはすべて、Newsraft の 設定ファイル 経由で変更できますが、基本的なデフォルトのキーバインディングとそのコマンドは以下のとおりです:

Command Description
j - select-next move selection down to next menu item
k - select-prev move selection up to previous menu item
l - enter open selected menu item
h - quit close selected menu item, return to previous menu. If currently in top menu, quit newsraft
d - mark-read; jump-to-next mark selection read and move to next menu item
D - mark-unread; jump-to-next mark selection unread and move to next menu item
^D - mark-read-all mark all menu items read
o - open-in-browser open selection in browser. If no number precedes 'o', opens first selection
r - reload manually update selected feed
^R - reload-all manually update all feeds