podcast_helper.cli_argparse module

Podcast Helper — argparse-based command-line interface.

Thin wrapper around the pure functions in podcast_helper that exposes the whole toolkit as subcommands under a single podcast-helper entry point. Written with argparse from the standard library so the CLI works out of the box on any Python install that has the package installed — no extra dependency required.

Subcommands

  • feed — dump an RSS / Atom podcast feed as JSON (episode list)

  • latest — print the latest episode’s enclosure URL (or full JSON)

  • stream — decode any audio-bearing URL to raw PCM on stdout or a WAV

  • record — decode + archive to a compressed file (mp3/m4a/opus/…)

  • probe — resolve any URL and print how podcast-helper classified it

Usage Example

>>> #   podcast-helper feed    --url https://feeds.npr.org/510289/podcast.xml
>>> #   podcast-helper latest  --url https://feeds.npr.org/510289/podcast.xml
>>> #   podcast-helper stream  --url episode.mp3 --output episode.wav --sample-rate 16000
>>> #   podcast-helper record  --url https://feeds.npr.org/510289/podcast.xml --output ep.mp3
>>> #   podcast-helper probe   --url https://youtu.be/dQw4w9WgXcQ

Author

Warith Harchaoui, Ph.D. — https://linkedin.com/in/warith-harchaoui/

podcast_helper.cli_argparse.build_parser()[source]

Assemble the top-level podcast-helper argument parser.

Returns:

Fully wired parser with every subcommand attached.

Return type:

argparse.ArgumentParser

podcast_helper.cli_argparse.main(argv=None)[source]

Entry point invoked by podcast-helper (see [project.scripts]).

Parameters:

argv (sequence of str, optional) – Arguments to parse. Defaults to sys.argv[1:] when None.

Returns:

Process exit code (0 on success).

Return type:

int