4

GitHub - duganchen/podfeeds: HTTP Server-Based Podcast Aggregator For Text Brows...

 1 year ago
source link: https://github.com/duganchen/podfeeds
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

podfeeds

This is an HTTP server-based podcast aggregator. Just as other aggregators use Chrome to present a GUI, this one uses Lynx to present a TUI.

Setting Up Lynx

Set Lynx up to open media files in your favorite media player. For example, I have the following ~/.mailcap to get Lynx to open them in mpv:

audio/*; mpv %s
video/*; mpv %s
application/vnd.rn-realmedia; mpv %s

Setting Lynx to always accept cookies will also save a few manual steps. Set the following (make sure they're not commented out) in lynx.cfg:

FORCE_SSL_COOKIES_SECURE:TRUE
SET_COOKIES:TRUE
ACCEPT_ALL_COOKIES:TRUE

I like to set Lynx to use BASH-like keybindings (in the options menu you get with "o"). If a download URL has GET parameters, it makes it easier to delete them from the filename (press Ctrl-A to go to the beginning of the line, cursor to the question mark, Ctrl+K to delete to the end of the line).

Remember that Lynx caches everything. If you want to check for updates, you need to refresh manually (Ctrl+R, or by following links with "x").

Gathering Feed URLs

Gather your podcast feed URLs. One way to find them is to use the "podfeed" script I posted here:

CLI app to get podcast feed URLs

Paste them into a file in the root directory (the one with files like go.mod), named "podcasts.yaml". Separate each line with a hyphen and a space. For example:

- https://www.cbc.ca/podcasting/includes/wr.xml
- https://www.cbc.ca/podcasting/includes/frontburner.xml
- https://www.cbc.ca/podcasting/includes/current.xml
- https://www.cbc.ca/podcasting/includes/asithappens.xml

Running Podfeeds

Start the server:

go run .

By default, the server will listen on port 8080. Set the PORT environment variable to override it. Set it to port 0 to let it pick the port.

Load the server's index page in Lynx:

lynx http://localhost:8080

That will get your subscriptions:

Subscriptions

Following each link gets you the page for that podcast:

As It Happens

Follow "Enclosure" links to play them.

Playing

Or press "d" to download them or whatever; Lynx is very powerful.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK