Metadata-Version: 2.3
Name: archivepodcast
Version: 1.5.0
Summary: Flask webapp that will archive a podcast from a RSS feed. It will download the episodes and re-host them.
Author: Kieran Gee
Author-email: Kieran Gee <kieran.lost.the.game@gmail.com>
Requires-Dist: flask[async]>=3.1,<4
Requires-Dist: aiobotocore>=2.25.2
Requires-Dist: aiohttp>=3.13.2
Requires-Dist: jinja2>=3.1,<4
Requires-Dist: lxml>=5,<5.4
Requires-Dist: markdown>=3.10
Requires-Dist: psutil>=7.1.3
Requires-Dist: pydantic>=2.12
Requires-Dist: pydantic-settings>=2.12
Requires-Dist: python-magic>=0.4
Requires-Dist: rich>=14.2.0
Requires-Dist: typed-ffmpeg>=3.7
Requires-Dist: waitress>=3.0
Requires-Dist: sphinx ; extra == 'docs'
Requires-Dist: myst-parser ; extra == 'docs'
Requires-Dist: sphinx-rtd-theme ; extra == 'docs'
Requires-Dist: ruff ; extra == 'lint'
Requires-Dist: aiomonitor ; extra == 'profile'
Requires-Dist: pytest>=9.0 ; extra == 'test'
Requires-Dist: pytest-cov ; extra == 'test'
Requires-Dist: pytest-mock ; extra == 'test'
Requires-Dist: pytest-random-order ; extra == 'test'
Requires-Dist: detect-test-pollution ; extra == 'test'
Requires-Dist: types-aiobotocore-s3 ; extra == 'test'
Requires-Dist: pytest-asyncio ; extra == 'test'
Requires-Dist: tomlkit>=0.13 ; extra == 'test'
Requires-Dist: pytest-socket>=0.7.0 ; extra == 'test'
Requires-Dist: mypy ; extra == 'type'
Requires-Dist: ty ; extra == 'type'
Requires-Dist: types-lxml ; extra == 'type'
Requires-Dist: types-psutil ; extra == 'type'
Requires-Dist: types-markdown ; extra == 'type'
Requires-Dist: botocore-stubs ; extra == 'type'
Requires-Dist: types-aiobotocore ; extra == 'type'
Requires-Dist: types-aiobotocore-s3 ; extra == 'type'
Requires-Python: >=3.12, <3.14
Project-URL: repository, https://github.com/kism/archivepodcast
Provides-Extra: docs
Provides-Extra: lint
Provides-Extra: profile
Provides-Extra: test
Provides-Extra: type
Description-Content-Type: text/markdown

# Archive Podcast

[![Check](https://github.com/kism/archivepodcast/actions/workflows/check.yml/badge.svg)](https://github.com/kism/archivepodcast/actions/workflows/check.yml)
[![CheckType](https://github.com/kism/archivepodcast/actions/workflows/check_types.yml/badge.svg)](https://github.com/kism/archivepodcast/actions/workflows/check_types.yml)
[![Test](https://github.com/kism/archivepodcast/actions/workflows/test.yml/badge.svg)](https://github.com/kism/archivepodcast/actions/workflows/test.yml)
[![codecov](https://codecov.io/gh/kism/archivepodcast/graph/badge.svg?token=FPGDA0ODT7)](https://codecov.io/gh/kism/archivepodcast)
[![Docker](https://github.com/kism/archivepodcast/actions/workflows/docker.yml/badge.svg)](https://github.com/kism/archivepodcast/actions/workflows/docker.yml)
[![SpellCheck](https://github.com/kism/archivepodcast/actions/workflows/spell_check.yml/badge.svg)](https://github.com/kism/archivepodcast/actions/workflows/spell_check.yml)

Flask webapp that will archive a podcast from a RSS feed. It will download the episodes and re-host them.

Features:

- Webapp
  - List of feeds hosted
  - File listing for unlisted episodes
  - Web player
  - Health check page
- Looks for new episodes to fetch every hour
- Rename feeds to indicate that they are an archive
- Local or S3 storage backend

In theory this works in windows however I haven't tested it, it ~should be able to handle windows file paths fine.

Docs are at <https://archivepodcast.readthedocs.io/en/latest/>

## Setup

### Install dependencies

You will need to install ffmpeg for your platform. Should be on your package manager or download the binary to /usr/local/bin.

You will need to install git-lfs for your platform to fetch the .woff font files.

If you cloned the repo without git-lfs installed, run the following commands to fetch the files:

```bash
git lfs install
git lfs fetch --all
git lfs pull
```

### Pre Commit Hooks

To set up pre-commit hooks run:

```bash
uv tool add pre-commit --upgrade
pre-commit install
```

### Setup Python Environment

#### Development

```bash
uv venv
source .venv/bin/activate
uv sync
```

#### Production

```bash
uv venv
source .venv/bin/activate
uv sync --no-default-groups
```

## Running archivepodcast webapp

This will run a webapp on <http://localhost:5100> (configurable) that will:

- Run persistently
- Host RSS feeds of the podcasts
- If `"live" : true` in config toml is set it will look for and download new episodes every hour
- If you send it a SIGHUP command it will reload the configuration, be sure to check the logs to see if it was successful.

Development: `flask --app archivepodcast run --port 5100`

Production: `waitress-serve --threads=4 --listen 0.0.0.0:5100 --call archivepodcast:create_app`

An example guide on setting it up start to finish, with all features and saving episodes do disk can be found in the docs. There are others for if you want to use s3 to host assets, or even host the whole thing on s3.

## Todo

- ~~path_helper lazy load~~
- ~~warnings when s3 put, or rss download takes too long~~
- ~~generic response logger for aiohttp~~
- ~~change log format to start with podcast name~~
- Container Registry
- header as a table, or divs
- Fix font selection for frontend, done?
- Cloudflare worker cron (CF still in beta)
  - Terraform example
- pydantic xml

Prod time to beat running adhoc, 56 seconds.
