localhost-podcast

Crates.iolocalhost-podcast
lib.rslocalhost-podcast
version0.2.0
created_at2025-09-07 12:09:02.170123+00
updated_at2025-09-24 11:33:10.45959+00
descriptionHost local media as if it were a podcast to easily download it to a phone or other player
homepage
repositoryhttps://git.sr.ht/~j_wernick/localhost-podcast
max_upload_size
id1828078
size81,078
Justin Wernick (JWorthe)

documentation

README

Localhost Podcast

builds.sr.ht status crates.io

Tool to make it easy to sync media from my computer to my phone's podcast player. As described here: https://www.worthe-it.co.za/blog/2020-05-27-localhost-podcast.html

Usage

NOTE: This is an early release and the interface will likely change in subsequent releases.

Using a config file

When run with no arguments, localhost-podcast will look for a config file named localhost-podcast.toml in the current working directory. This should describe all of the feeds you want to generate.

Each toml table (the headings in ["square brackets"]) are a separate podcast feed, and an RSS file will be generated for each of them.

host = "http://192.168.0.12:9090"

["Localhost Books"]
description = "Audiobooks from Justin's collection"
image = "books/thumb.jpg"
dir = "books"
extensions = ["mp3", "ogg"]
out = "books/rss.xml"

["Localhost Movies"]
description = "Movies and series"
image = "movies/thumb.jpg"
dir = "movies"
extensions = ["mp4, "avi", "mkv"]
out = "movies/rss.xml"

If you don't have a localhost-podcast.toml file, you can create an example template by running the init subcommand.

localhost-podcast init

Once off builds

You can create an RSS feed without having a config file using the build subcommand:

Usage: localhost-podcast build [OPTIONS]

Options:
  -d, --dir <DIR>                  The directory to scan for media. Defaults to the current working directory [default: .]
  -e, --extensions <EXTENSIONS>    Which file extensions to include in the feed [default: mp3 ogg]
  -o, --out <OUT>                  Where to write the resulting RSS feed [default: rss.xml]
  -H, --host <HOST>                Where will these files be hosted? This is included as a prefix to the URL of every file [default: http://localhost:8080]
  -t, --title <TITLE>              The title of the podcast
  -p, --description <DESCRIPTION>  A description of the podcast
  -i, --image <IMAGE>              The path to a thumbnail image for the podcast
  -h, --help                       Print help

Example: this will create books/rss.xml, which lists the .mp3 and .ogg files in the books directory. The podcast will be called Localhost Books, and its description will be Audiobooks from Justin's collection. It's thumbnail will be books/thumb.jpg. When I later start a webserver to download these files, it should be started in the same working directory that we're currently in, and it will be accessible my our phone as http://192.168.0.12:9090.

localhost-podcast build -d "books"/ -e mp3 -e ogg -t "Localhost Books" -p "Audiobooks from Justin's collection" -i "books/thumb.jpg" -H http://192.168.0.12:9090 -o books/rss.xml

License

Copyright 2025 Justin Wernick.

Licensed under either of Apache License, Version 2.0 or MIT license at your option.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Commit count: 0

cargo fmt