Skip to content

Commit

Permalink
docs: Spruce up readme (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
janw authored Jan 11, 2024
1 parent 77fb435 commit 27a0968
Show file tree
Hide file tree
Showing 8 changed files with 818 additions and 66 deletions.
File renamed without changes
221 changes: 221 additions & 0 deletions .assets/podcast-archiver-help.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 30 additions & 6 deletions .github/workflows/linters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ name: Linters

on:
pull_request:
push:
branches: [main]

jobs:
commitizen:
Expand All @@ -22,8 +20,34 @@ jobs:

- run: cz check --rev-range origin/main..HEAD
shell: bash
if: github.event_name == 'pull_request' || github.ref != 'refs/heads/main'

- run: cz check --rev-range HEAD~..
shell: bash
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
pre-commit-extras:
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v3

- name: Install commitizen
run: pipx install poetry

- name: Set up python
uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: 'poetry'

- run: poetry install --with=dev

- uses: pre-commit/[email protected]
with:
extra_args: >
rich-codex
--all-files
- uses: actions/upload-artifact@v4
with:
name: assets
path: |
.assets/*
retention-days: 3
if: always()
20 changes: 20 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ ci:
autofix_prs: false
autoupdate_schedule: quarterly
autoupdate_commit_msg: 'chore: [pre-commit.ci] pre-commit autoupdate'
skip: # see linters.yaml -> pre-commit-extras job
- "rich-codex"

repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
Expand All @@ -25,6 +27,7 @@ repos:
rev: "v4.4.0"
hooks:
- id: trailing-whitespace
exclude_types: [svg]
- id: end-of-file-fixer
- id: check-yaml
- id: debug-statements
Expand All @@ -39,3 +42,20 @@ repos:
rev: '1.7.1'
hooks:
- id: poetry-check

- repo: local
hooks:
- id: rich-codex
name: rich-codex
language: system
entry: >
env
FORCE_COLOR=1
TERMINAL_WIDTH=140
poetry run rich-codex
--skip-git-checks
--no-confirm
--terminal-theme MONOKAI
--created-files .assets/created.txt
pass_filenames: false
types: [markdown]
36 changes: 10 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<!-- markdownlint-disable MD033 MD013 -->
<div align="center">

![Podcast Archiver Logo](assets/icon.png)
![Podcast Archiver Logo](.assets/icon.png)

[![version](https://img.shields.io/pypi/v/podcast-archiver.svg)](https://pypi.org/project/podcast-archiver/)
[![python](https://img.shields.io/pypi/pyversions/podcast-archiver.svg)](https://pypi.org/project/podcast-archiver/)
Expand All @@ -19,45 +19,29 @@

</div>

Archive all episodes from your favorite podcasts.
A fast and simple command line client to archive all episodes from your favorite podcasts.

The archiver takes the feed URLs of your favorite podcasts and downloads all available episodes for you. Even those files "hidden" in a paged feed will be tapped, so you'll have an entire backup of the series. The archiver also supports updating an existing archive, so that it lends itself to be set up as a cronjob.

## Outline

In my experience, very few full-fledged podcast clients are able to access a paged feed (following IETF RFC5005), so only the last few episodes of a podcast will be available to download. When you discover a podcast that has been around for quite a while, you'll have a hard time to follow the "gentle listener's duty" and listen to the whole archive. The script in this repository is supposed to help you acquiring every last episode of your new listening pleasure.

Before downloading any episode the function first fetches all available pages of the feed and prepares a list. That way, you will never miss any episode.
Podcast Archiver takes the feed URLs of your favorite podcasts and downloads all available episodes for you—even those "hidden" in [paged feeds](https://podlove.org/paged-feeds/). You'll end up with a complete archive of your shows. The archiver also supports updating an existing archive, so that it lends itself to be set up as a cronjob.

## Setup

### Python package

`podcast-archiver` is Python 3.9+ compatible.
Install via [pipx](https://pipx.pypa.io/stable/):

```bash
# Latest tagged/published version on PyPI:
pip install podcast-archiver

# Latest development version from main branch:
pip install git+https://github.com/janw/podcast-archiver.git
pipx install podcast-archiver
```

### Docker image

Alternatively `podcast-archiver` is available as a docker image as well:
Or use it via Docker:

```bash
# Latest tagged/published version, same as on PyPI:
docker run --rm ghcr.io/janw/podcast-archiver:latest

# Latest development version from main branch:
docker run --rm ghcr.io/janw/podcast-archiver:edge
docker run --tty --rm ghcr.io/janw/podcast-archiver --help
```

## Usage

Run `podcast-archiver --help` for details on how to use it.
Run `podcast-archiver --help` for details on how to use it:

![`poetry run podcast-archiver --help`](.assets/podcast-archiver-help.svg)

### Full-fledged example

Expand Down
2 changes: 1 addition & 1 deletion podcast_archiver/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ def generate_default_config(ctx: click.Context, param: click.Parameter, value: b
type=ConfigPath(),
expose_value=False,
default=pathlib.Path(click.get_app_dir(PROG_NAME)) / "config.yaml",
show_default=True,
show_default=False,
is_eager=True,
show_envvar=True,
help="Path to a config file. Command line arguments will take precedence.",
Expand Down
Loading

0 comments on commit 27a0968

Please sign in to comment.