66 个版本

0.20.0 2022 年 11 月 1 日
0.19.4 2022 年 6 月 18 日
0.19.0 2022 年 2 月 21 日
0.17.6 2020 年 8 月 1 日
0.3.0 2017 年 7 月 27 日

#1777命令行工具

Download history 4/week @ 2024-03-12 1/week @ 2024-03-26 62/week @ 2024-04-02

200 每月下载次数

GPL-3.0 许可证

70KB
1.5K SLoC

podcast


podcast 是一个命令行播客管理器和播放器。

二进制文件可以在以下位置找到: https://github.com/njaremko/podcast/releases

否则,使用您发行版的包管理器安装 libiconvmpvvlcsox。然后安装 rustup,并运行 cargo install podcast

注意:播放需要安装 mpv 或 vlc

目前支持

  • 订阅 RSS 源
  • 搜索播客
  • 取消订阅 RSS 源
  • 流式传输播客
  • 并行下载多个播客
  • 播放播客
  • 自动下载新剧集
  • 自动检查更新
  • Shell 完成功能
    • zsh
    • bash
    • fish
    • powershell
    • elvish

默认情况下,播客会下载到 $HOME/Podcasts,但可以通过 $PODCAST 环境变量设置此文件夹。

在首次订阅新播客时下载的最新剧集数量可以在 $PODCAST/.subscriptions.json 文件中设置

auto_download_limit 设置为 0 以跳过首次订阅时的下载。

可以通过多种方式下载

单独: podcast download $podcast_name 4

多个: podcast download $podcast_name 1,5,9-12,14

全部: podcast download $podcast_name

您也可以使用名称的一部分。播客将选择第一个包含给定单词的播客(不区分大小写)。

示例用法

$ podcast search my brother my brother and me
Using PODCAST dir: "/Users/jaremn/Podcasts"
(0) My Brother, My Brother And Me [https://feeds.simplecast.com/wjQvYtdl]
(1) My Brother, My Brother And Me [https://anchor.fm/s/2b7f0c44/podcast/rss]
(2) My Brother's Funnier Than Me [https://anchor.fm/s/106a0d0/podcast/rss]
(3) My Brother's Wife and Me and Him [https://anchor.fm/s/e9402ec/podcast/rss]
(4) My Brother & Me [https://anchor.fm/s/d6a4e6c/podcast/rss]
(5) Me & My Brother [https://anchor.fm/s/37aa1f4/podcast/rss]
Would you like to subscribe to any of these? (y/n): y
Which one? (#): 0
Downloading RSS feed...
Subscribe auto-download limit set to: 1
Downloading episode(s)...
[00:03:06] MBMBaM 518: Pepperoni and Vicki.mp3 [294.32KB/s] [3.08MB/56.54MB]
$ podcast ls
My Brother, My Brother And Me
$ podcast ls bro # List all the episodes of My Brother, My Brother, and Me
(447) MBMBaM 440: The Naming of 2019
(446) MBMBaM 439: Face 2 Face: Candlenights 2018
...
(2) My Brother, My Brother and Me: Episode 02
(1) My Brother, My Brother and Me: Episode 01
$ podcast play bro # Play the latest episode of mbmbam
$ podcast play "my brother" 446 # Play "MBMBaM 439: Face 2 Face: Candlenights 2018"
$ podcast download bro # Download all episodes of mbmbam
$ podcast download brother -e "The Naming" # Download the latest episode containing "The Naming"
Downloading: /home/njaremko/Podcasts/My Brother, My Brother And Me/MBMBaM 440: The Naming of 2019.mp3
$ podcast download bro 44 -e -a # Download all episodes containing "44"
Using PODCAST dir: "/Users/jaremn/Podcasts"
[00:07:36] MBMBaM 449: The Cable Pie.mp3 [114.59KB/s] [527.34KB/51.50MB]
[00:00:12] MBMBaM 448: Bird Words.mp3 [3.63MB/s] [16.19MB/58.05MB]
[00:08:03] MBMBaM 447: Valentine’s Escape Room.mp3 [105.69KB/s] [494.59KB/50.28MB]
[00:00:05] MBMBaM 446: Face 2 Face: The Cupture.mp3 [5.85MB/s] [26.19MB/55.63MB]
[00:09:46] MBMBaM 445: Pizzalicious Turbo-Moths.mp3 [93.65KB/s] [443.57KB/54.01MB]
[00:08:07] MBMBaM 444: The 100 Wishes of the Pandemonium Cube.mp3 [109.15KB/s] [495.49KB/52.40MB]
[00:09:08] MBMBaM 443: Face 2 Face: Apple Time!.mp3 [106.42KB/s] [495.15KB/57.38MB]
[00:10:56] MBMBaM 442: Justin’s Special Shower Sauce.mp3 [93.04KB/s] [451.47KB/59.98MB]
[00:08:44] MBMBaM 441: In a New York Whoopsie.mp3 [113.30KB/s] [521.91KB/58.44MB]
[00:00:13] MBMBaM 440: The Naming of 2019.mp3 [3.24MB/s] [14.45MB/55.49MB]
[00:00:29] MBMBaM 344: The Cream Beams to the Tower of Flavortown.mp3 [1.73MB/s] [7.72MB/56.55MB]
[00:12:13] MBMBaM 244: Slimefoot.mp3 [97.95KB/s] [454.36KB/70.58MB]
[00:10:25] MBMBaM 144: Kick it Forward.mp3 [105.41KB/s] [492.53KB/64.79MB]
[00:08:17] My Brother, My Brother and Me 44: Chunk Pump.mp3 [95.76KB/s] [441.53KB/46.85MB]

生成补全

# Generating completion for current shell:
$ podcast completion
... outputs stuff that needs to be loaded by your shell on startup ...

# Fish Shell Example
$ podcast completion fish > podcast.fish
$ sudo mv podcast.fish /usr/share/fish/completions

构建

Git

构建需要每晚的Rust

git clone [email protected]:njaremko/podcast.git
cd podcast
cargo install --path=. --force

Pijul

pijul clone https://nest.pijul.com/njaremko/podcast
cd podcast
cargo install --path=. --force

依赖项

~19–36MB
~594K SLoC