Skip to content

Instantly share code, notes, and snippets.

@vipzhicheng
Last active March 3, 2024 15:28
Show Gist options
  • Save vipzhicheng/610cdb7a3a2adaeac3e53bd128c2de47 to your computer and use it in GitHub Desktop.
Save vipzhicheng/610cdb7a3a2adaeac3e53bd128c2de47 to your computer and use it in GitHub Desktop.
Mac 使用 Newsboat 订阅 RSS 看视频

需要依赖的几个工具命令

brew install newsboat # 同时也会自动安装 youtube-dl
brew install you-get
brew install mpv
npm i -g vercel

mpv 的配置

编辑 .config/mpv/mpv.conf

ytdl-format=bestvideo[height<=?480][fps<=?30][vcodec!=?vp9]+bestaudio/best[height<=?480][fps<=?30]
autofit-larger=1280x800
geometry=100%:100%
no-border
ontop=yes
keep-open=yes
hwdec=videotoolbox

newsboat 的配置

编辑 .newsboat/config

# Official doc:
# https://newsboat.org/releases/2.10/docs/newsboat.html


# general settings
max-items 0
auto-reload yes
reload-time 120
reload-threads 4
download-retries 4
download-timeout 10
prepopulate-query-feeds yes

show-keymap-hint yes
show-read-articles yes
show-read-feeds yes
swap-title-and-hints yes  # Like Mutt.

ignore-mode "display"

feedlist-title-format "Newsboat use-proxy=no"
articlelist-title-format "%T (%u unread, %t total)"
searchresult-title-format "Search result (%u unread, %t total)"
filebrowser-title-format "%?O?Open File&Save File? - %f"
help-title-format "Help"
selecttag-title-format "Select Tag"
selectfilter-title-format "Select Filter"
itemview-title-format "%T"
urlview-title-format "URLs"
dialogs-title-format "Dialogs"

# externel browser
#browser "/usr/local/bin/w3m %u"
browser "open -g -a 'Google Chrome' %u"
macro V set browser "/usr/local/bin/proxychains4 -q /Applications/mpv.app/Contents/MacOS/mpv-bundle %u --input-media-keys=no > /dev/null &"; open-in-browser ; set browser "open"
macro v set browser "/usr/local/bin/you-get -p '/Applications/mpv.app/Contents/MacOS/mpv-bundle --no-ytdl --referrer=https://www.bilibili.com' %u > /dev/null &"; open-in-browser ; set browser "open"
macro p set use-proxy yes; set use-proxy; set feedlist-title-format "Newsboat use-proxy=no"
macro P set use-proxy no; set use-proxy; set feedlist-title-format "Newsboat use-proxy=yes"
# macro l set browser "/Applications/Firefox.app/Contents/MacOS/firefox %u"; open-in-browser ; set browser "/usr/local/bin/w3m %u"
macro o set browser "open -g -a 'Google Chrome' 'http://127.0.0.1:3000/url/%u"; open-in-browser ; set browser "open -g -a 'Google Chrome' %u"

# unbind keys
unbind-key j
unbind-key k
unbind-key J
unbind-key K
unbind-key C
unbind-key ,

bind-key SPACE macro-prefix
bind-key j down
bind-key k up
bind-key l open
bind-key ^N next-unread
bind-key ^P prev-unread
bind-key ^N next-unread-feed articlelist
bind-key ^P prev-unread-feed articlelist
bind-key u pageup
bind-key d pagedown


# Open the latest article of a feed in Firefox and mark it as read with o.  This is pretty
# neat.  Hitting o again opens the next one, and so on.
max-browser-tabs 1

# solarized
color background         default   default
color listnormal         default   default
color listnormal_unread  default   default
color listfocus          black     cyan
color listfocus_unread   black     cyan
color info               default   black
color article            default   default

#show-read-feeds yes

# highlights
highlight article "^(Title):.*$" blue default
highlight article "https?://[^ ]+" red default
highlight article "\\[image\\ [0-9]+\\]" green default


# proxy
use-proxy yes
proxy-type socks5
proxy 127.0.0.1:1080

我用 newsboat 订阅的几个B站和 Youtube 频道

--Youtube--------------------------------------------------------
https://www.youtube.com/feeds/videos.xml?channel_id=UCgLUl1WDoDXUtxPaZeSZHsw  创业 "~|- 李自然说"
https://www.youtube.com/feeds/videos.xml?channel_id=UCLROLAN8kmU7tGQDs6KH-bQ  科普 "~|- 妈咪说"
--B站-个人-------------------------------------------------------
https://rsshub-flax.vercel.app/bilibili/user/video/28273002 英语 "~|- 口语控"
https://rsshub-flax.vercel.app/bilibili/user/video/573735582 面试 "~|- ShowMeBug"
https://rsshub-flax.vercel.app/bilibili/user/video/288339968 开发者 "~|- PegasusWang"
https://rsshub-flax.vercel.app/bilibili/user/video/13081489 开发者 "~|- TheCW"
https://rsshub-flax.vercel.app/bilibili/user/video/119801456 自媒体 "~|- 老蒋巨靠谱"
--B站-教程-------------------------------------------------------
https://rsshub-flax.vercel.app/bilibili/video/page/BV1bQ4y1A77L Node.js "~|- Nest.js实战"
--B站-分区-------------------------------------------------------
https://rsshub-flax.vercel.app/bilibili/partion/ranking/189/3 B站分区 "~|- 装机"
https://rsshub-flax.vercel.app/bilibili/partion/ranking/209/3 B站分区 "~|- 职业职场"
https://rsshub-flax.vercel.app/bilibili/partion/ranking/122/3 B站分区 "~|- 野生技术协会"
-----------------------------------------------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment