podfeeds

command module
v0.0.0-...-370b6e8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 27, 2023 License: MIT Imports: 16 Imported by: 0

README

podfeeds

demo

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

On some systems, you will need to build Lynx yourself to achieve this setup. After applying any patches from the previous link, the following configuration will give you a user-level installation with everything you need:

./configure --prefix=$HOME/.local --enable-externs --with-zlib --with-bzlib --with-ssl --with-screen=ncursesw --enable-locale-charset --enable-default-colors

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
Downloading Podcasts

Install HTTPie and put the following in the EXTERNAL section of lynx.cfg:

EXTERNAL:https:http -d %s:TRUE

Building Podfeeds

go build

That will produce an executable named "podfeeds".

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 named podcasts.yaml, in one of the following locations:

  • in the same directory as the podfeeds executable
  • in /etc/podfeeds/

Separate each line with a hyphen and a space, and use # for comments. For example:

- https://www.cbc.ca/podcasting/includes/wr.xml # CBC World Report
- https://www.cbc.ca/podcasting/includes/frontburner.xml
- https://www.cbc.ca/podcasting/includes/current.xml
# CBC AS It Happens
- https://www.cbc.ca/podcasting/includes/asithappens.xml
- https://www.cbc.ca/podcasting/includes/cbcpowerandpolitics.xml

Running Podfeeds

./podfeeds

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

Using Podfeeds

Podfeeds is structured as an old-fashioned, Lynx-friendly website. There's a landing page at "/" with a link for each subscription. Each of those links goes to a page. That page is an HTML rendering of the podcast's XML file, with a table of contents at the top. Each entry in the table of contents is an episode.

You start on the list of podcasts you're subscribed to.

Subscriptions

Following each link gets you the page for that podcast. The page starts with anchor links to specific episodes.

As It Happens

Use the table of contents to jump to episodes. Press Ctrl+A to jump back to the beginning of the page, where the table of contents is.

As It Happens

Follow "Enclosure" links to play them.

Playing

Or press "." to download them with HTTPie.

Docker

In the repository directory, write your podcasts.yaml file.

Build the podfeeds image. Pull the nginx image.

docker build -t podfeeds .
docker pull nginx

Create a volume for the persistent nginx cache:

docker volume create podfeeds_cache

And then bring the whole thing up:

docker compose up -d

Browse your podcasts at http://localhost:8081.

And then tear it down;

docker compose down

Why nginx? Lynx and w3m don't have browser caches, so we put nginx in front of podfeeds to fill that role.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL