Metadata-Version: 2.4
Name: feed2castanet
Version: 0.5.0
Summary: Utility for migrating a podcast feed to Markdown files compatible with the Hugo Castanet theme
Author-email: Christian Stankowic <info@cstan.io>
License-Expression: GPL-3.0-only
Project-URL: Homepage, https://codeberg.org/userspace-podcast/feed2castanet
Project-URL: Documentation, https://codeberg.org/userspace-podcast/feed2castanet#readme
Project-URL: Repository, https://codeberg.org/userspace-podcast/feed2castanet
Project-URL: Issues, https://codeberg.org/userspace-podcast/feed2castanet/issues
Project-URL: Changelog, https://codeberg.org/userspace-podcast/feed2castanet/src/branch/main/CHANGELOG.md
Keywords: podcast,jinja,markdown,document
Classifier: Development Status :: 5 - Production/Stable
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Internet :: WWW/HTTP
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: podcastparser
Dynamic: license-file

# feed2castanet

Utility for migrating a podcast feed to Markdown files compatible with the [Hugo](https://gohugo.io) [Castanet theme](https://github.com/mattstratton/castanet)

## Installation

### `pip`

Install locally:

```command
$ pip3 install -e .
```

Or install over PyPi:

```command
$ pip3 install feed2castanet
```

### Manual

Install Python requirements:

```command
$ pip3 install -u -r requirements.txt
```

## Usage

Create documents per episode in a podcast feed:

```command
$ feed2castanet -u https://<podcast-url>/feed/mp3 -t episode.md.j2
```

Override episode hosts:

```command
$ feed2castanet -u https://<podcast-url>/feed/mp3 -t episode.md.j2 --hosts paula --hosts max
```

## Templating

Episode documents are prepared using a Jinja2 template - see [`episode.md.j2`](episode.md.j2) for an example.

Several variables contain episode information:

| Key | Description |
| --- | ----------- |
| `description` | Episode description |
| `description_html` | Episode description in HTML, often used for shownotes |
| `alias` | Path of former episode URL (e.g. `/e123-my-episode` of `https://<podcast-url>/e123-my-episode`) |
| `itunes_author` | Episode author(s) |
| `published` | Date of publication |
| `number` | Episode number |
| `episode_art_url` | Episode artwork URL |
| `guid` | Episode globally unique ID |
| `hosts` | Episode hosts (optional) |
| `podcast_duration` | Total episode duration (e.g. 01:33:07) |
| `podcast_file` | Audio file URL |
| `podcast_bytes` | File size in bytes |
| `title` | Episode title |
