| Crates.io | localhost-podcast |
| lib.rs | localhost-podcast |
| version | 1.0.0 |
| created_at | 2025-09-07 12:09:02.170123+00 |
| updated_at | 2025-10-16 08:13:44.355932+00 |
| description | Host local media as if it were a podcast to easily download it to a phone or other player |
| homepage | |
| repository | https://git.sr.ht/~j_wernick/localhost-podcast |
| max_upload_size | |
| id | 1828078 |
| size | 147,406 |
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
Run localhost-podcast --help to see the built in CLI documentation.
Usage: localhost-podcast [OPTIONS] [COMMAND]
Commands:
run Reads localhost-podcast.toml as a config to build RSS feeds, and then host them. This is the default if no command is provided
init Create a new localhost-podcast.toml config file with default values
build Do a once-off build without a config file, and then host it
help Print this message or the help of the given subcommand(s)
Options:
-b, --build-only Do not start a webserver to host the built contents. Only build the RSS feeds
-h, --help Print help
-V, --version Print version
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 section (the headings in square brackets) is 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
You can create an RSS feed without having a config file using the build subcommand:
Usage: localhost-podcast build [OPTIONS] [DIR]
Arguments:
[DIR] The directory to scan for media. Defaults to the current working directory [default: .]
Options:
-t, --title <TITLE> The title of the podcast
-d, --description <DESCRIPTION> A description of the podcast
-i, --image <IMAGE> The path to a thumbnail image for the podcast
-e, --extensions <EXTENSIONS> Which file extensions to include in the feed. Can be passed multiple times [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: localhost]
-p, --port <PORT> What port will these files be hosted on? This is included in URLs, and is also used by webserver [default: 8080]
-h, --help Print help
Example: This one liner below 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. Its thumbnail will be books/thumb.jpg. The command will then
start a webserver, which will serve the files in my current working
directory. You can then open the podcast player on your phone and subscribe to
http://192.168.0.12:9090/books/rss.xml.
localhost-podcast build books -e mp3 -e ogg -t "Localhost Books" -d "Audiobooks from Justin's collection" -i books/thumb.jpg -H 192.168.0.12 -p 9090 -o books/rss.xml
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.