Skip to content

Commit

Permalink
Moved everything from Readme to website.
Browse files Browse the repository at this point in the history
  • Loading branch information
SamTV12345 committed Feb 1, 2024
1 parent 73e095a commit 023202c
Show file tree
Hide file tree
Showing 9 changed files with 89 additions and 201 deletions.
205 changes: 7 additions & 198 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,211 +1,20 @@
# Podfetch

[![dependency status](https://deps.rs/repo/github/SamTV12345/PodFetch/status.svg)](https://deps.rs/repo/github/SamTV12345/PodFetch)
![build status](https://github.com/SamTV12345/PodFetch/actions/workflows/rust.yml/badge.svg)

![Lint](https://github.com/SamTV12345/PodFetch/actions/workflows/lint.yml/badge.svg)

![Test](https://github.com/SamTV12345/PodFetch/actions/workflows/test.yml/badge.svg)

Podfetch is a self-hosted podcast manager.
It is a web app that lets you download podcasts and listen to them online.
It is written in Rust and uses React for the frontend.
It also contains a GPodder integration so you can continue using your current podcast app.
It also contains a GPodder integration, so you can continue using your current podcast app.

Every time a new commit is pushed to the main branch, a new docker image is built and pushed to docker hub. So it is best to use something like [watchtower](https://github.com/containrrr/watchtower) to automatically update the docker image.

# Contributing

## Building the project

### Prerequisites
- Rust
- Cargo
- Node
- npm/yarn/pnpm

### Building the app
```bash
# File just needs to be there
touch static/index.html
cargo.exe run --color=always --package podfetch --bin podfetch
cd ui
<npm/yarn/pnpm> install
<npm/yarn/pnpm> run dev
```

If you want to run other databases you need to install the corresponding diesel cli. For example for postgres you need to install `diesel_cli --no-default-features --features postgres` and run the same command for running it with cargo.

## UI Development

I would love to have a UX expert to help me with the UI. If you are interested in helping me out, please contact me via GitHub issue with designs/implemented React pages.

# Getting Started

## Docker

### Docker-Compose Examples

#### Docker-Compose

##### Advantages over Postgres
- Easier to setup
- Easier to use

=> No concurrency. So please don't try to download to podcasts at the same time.


### Sqlite

```yaml
version: '3'
services:
podfetch:
image: samuel19982/podfetch:latest
user: ${UID:-1000}:${GID:-1000}
ports:
- "80:8000"
volumes:
- podfetch-podcasts:/app/podcasts
- podfetch-db:/app/db
environment:
- POLLING_INTERVAL=60
- SERVER_URL=http://<your-ip>:<your-port>

volumes:
podfetch-podcasts:
podfetch-db:
```
### Postgres
#### Advantages over SQLite
- Better performance
- Better concurrency
- Better stability
- Better scalability
#### Docker Compose
```yaml
version: '3'
services:
podfetch:
image: samuel19982/podfetch:latest
user: ${UID:-1000}:${GID:-1000}
ports:
- "80:8000"
depends_on:
- postgres
volumes:
- ./podcasts:/app/podcasts
environment:
- POLLING_INTERVAL=300
- SERVER_URL=http://localhost:80 # Adjust to your server url
- DATABASE_URL=postgresql://postgres:changeme@postgres/podfetch
- DB_CONNECTIONS=10 # optional
postgres:
image: postgres
environment:
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-changeme}
PGDATA: /data/postgres
POSTGRES_DB: ${POSTGRES_DB:-podfetch}
volumes:
- postgres:/data/postgres
restart: unless-stopped

volumes:
postgres:
```
### Terraform
For terraform have a look at the setup directory.
There you will find everything needed to start with your infrastructure as code.
# Auth
Several Auth methods are described here: [AUTH.md](docs/AUTH.md)
# Hosting
Hosting options are described here: [HOSTING.md](docs/HOSTING.md)
# CLI Usage
The CLI usage is described here: [CLI.md](docs/CLI.md)
# User Creation
You can create an admin, user, or uploader either through [CLI](docs/CLI.md) or via invites.
To generate an invite, log into Podfetch → Top Right Icon → User Administration → Invites
# Environment Variables
| Variable | Description | Default |
|------------------|-----------------------------------------------|--------------------------|
| POLLING_INTERVAL | Interval in minutes to check for new episodes | 300 |
| SERVER_URL | URL of the server/the URL of the proxy | http://localhost:8000 |
| DATABASE_URL | URL of the database | sqlite://./db/podcast.db |
# UI
[UI Documentation](docs/UIWalkthrough.md)
## Internationalization
Podfetch is currently available in English and German. If you want to add a new language you can do so by adding a new file to the `i18n` folder and adding the translations to the file.

# RSS Feed

Podfetch offers an own feed to download podcast episodes. You can add the url <SERVER_URL>/rss to your favorite podcast app like gPodder to download and play episodes.

# Podcast Index

It is also possible to retrieve/add podcasts from [Podcast Index](https://podcastindex.org/).
To configure it you need to create an account on that website. After creating an account an email is sent to you with the required credentials.


| Variable | Description | Default |
|---------------------|---------------------------------------|---------|
| PODINDEX_API_KEY | the api key sent to you via mail | % |
| PODINDEX_API_SECRET | the api secret also found in the mail | % |

* % means an empty string is configured as default

After successful setup you should see on the settings page a green checkmark next to the Podindex config section.

# GPodder API

Podfetch supports the [GPodder API](https://gpoddernet.readthedocs.io/en/latest/api/index.html).

The following environment variable must be set to `true` to enable it:
| Variable | Description | Default |
|---------------------|---------------------------------------|---------|
| GPODDER_INTEGRATION_ENABLED | Activates the GPodder integration via your `SERVER_URL` | false|

You will also need to set up [`BASIC_AUTH` or `OIDC_AUTH`](docs/AUTH.md) and [create a user](#user-creation).

You can use your new user account to log into podcast apps that supports the GPodder API by using your `SERVER_URL` and login information.

See [wiki/GPodder-API](https://github.com/SamTV12345/PodFetch/wiki/GPodder-API) for more info.

# Roadmap
You can find the documentation with a UI preview [here](https://samtv12345.github.io/PodFetch/).

- [x] Add podcasts via Itunes api
- [x] Check for new episodes.
- [x] Download episodes.
- [x] Play episodes.
- [x] Force refresh download of podcast episodes.
- [x] Force refresh of podcast episodes.
- [x] Resume podcasts even if browser is closed.
- [x] Add websocket support for new podcasts.
- [x] Add detailed audio player.
- [x] Star podcasts.
- [x] Unsubscribe podcasts.
- [x] Add retrieving podcasts from Podcastindex.org.
- [x] Basic Auth.
- [x] Import from OPML file.
- [x] Telegram Bot api to get alerted when new episodes are downloaded.
- [ ] Like episodes.
- [ ] Delete podcasts.

8 changes: 7 additions & 1 deletion docs/src/AUTH.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,10 @@ following variables:
|----------------------------|-----------------------------------------------------|-------------------|
| REVERSE_PROXY | Flag if reverse proxy should be enabled | `true` |
| REVERSE_PROXY_HEADER | The url of the reverse proxy. | `X-FORWARDED-FOR` |
| REVERSE_PROXY_AUTO_SIGN_UP | Flag if PodFetch should automatically sign up users | `true` |
| REVERSE_PROXY_AUTO_SIGN_UP | Flag if PodFetch should automatically sign up users | `true` |

# User Creation

You can create an admin, user, or uploader either through [CLI](docs/CLI.md) or via invites.

To generate an invite, log into Podfetch → Top Right Icon → User Administration → Invites
2 changes: 1 addition & 1 deletion docs/src/CLI.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ podfetch podcasts --help
```bash
docker ps #This will help you obtain the container's id and name
docker exec -it <container id or name> /app/podfetch <your-command> # Will execute your desired command in the container
```
```
25 changes: 25 additions & 0 deletions docs/src/Contributing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Contributing

## Preamble

First of all, thank you for considering contributing to Podfetch. It is people like you that make Podfetch great.
I appreciate every contribution, no matter how small it is. If you have any questions, don't hesitate to ask them in
the discussions section.

## Building the project

### Prerequisites
- Rust
- Cargo
- Node
- npm/yarn/pnpm

### Building the app
```bash
# File just needs to be there
touch static/index.html
cargo.exe run --color=always --package podfetch --bin podfetch
cd ui
<npm/yarn/pnpm> install
<npm/yarn/pnpm> run dev
```
9 changes: 9 additions & 0 deletions docs/src/I18n.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
## Internationalization

Podfetch is available in multiple languages.
If you want to add a new language you can do so by adding a new file to the`i18n` folder and adding the translations
to the file. The file should be named after the [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes)
language code. For example `en.json` for English or `de.json` for German.

If you want to add a new language, please take a look at this [file](https://github.com/SamTV12345/PodFetch/blob/main/ui/src/language/json/en.json) to see which translations are required.
You only need to add the translations for the values.
15 changes: 14 additions & 1 deletion docs/src/Installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ volumes:
podfetch-db:
```
| Variable | Description | Default |
|------------------|-----------------------------------------------|--------------------------|
| POLLING_INTERVAL | Interval in minutes to check for new episodes | 300 |
| SERVER_URL | URL of the server/the URL of the proxy | http://localhost:8000 |
| DATABASE_URL | URL of the database | sqlite://./db/podcast.db |
It is important to change `UID` and `GID` to your user id and group id so that the files are owned by you and not by root.
Docker will create the volumes by default as root and podfetch will not be able to write to them.

Expand All @@ -43,4 +51,9 @@ To use postgres you need to set the following environment variables:
- Download the latest release from the [release page](https://github.com/SamTV12345/PodFetch/releases)
- Create a shell script that sets the above environment variables and starts the podfetch binary
- Make the shell script executable
- Run the shell script
- Run the shell script

### Terraform

For terraform have a look at the setup directory.
There you will find everything needed to start with your infrastructure as code.
5 changes: 5 additions & 0 deletions docs/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
- [Authorization](./AUTH.md)
- [UI Walkthrough](./UIWalkthrough.md)
- [Hosting](./HOSTING.md)
- [Translations](./I18n.md)
- [RSS Feed](./rss_feed.md)
- [Podindex Integration](./podindex.md)
- [CLI usage](./CLI.md)
- [Contributing](./Contributing.md)

# Tutorials

Expand Down
14 changes: 14 additions & 0 deletions docs/src/podindex.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Podcast Index

It is also possible to retrieve/add podcasts from [Podcast Index](https://podcastindex.org/).
To configure it you need to create an account on that website. After creating an account an email is sent to you with the required credentials.


| Variable | Description | Default |
|---------------------|---------------------------------------|---------|
| PODINDEX_API_KEY | the api key sent to you via mail | % |
| PODINDEX_API_SECRET | the api secret also found in the mail | % |

* % means an empty string is configured as default

After successful setup you should see on the settings page a green checkmark next to the Podindex config section.
7 changes: 7 additions & 0 deletions docs/src/tutorials/GPodder.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# GPodder API

## 📖 Activating the GPodder API

The following environment variable must be set to `true` to enable it:

| Variable | Description | Default |
|-----------------------------------|---------------------------------------------------------|---------------------|
| GPODDER_INTEGRATION_ENABLED | Activates the GPodder integration via your `SERVER_URL` | false |

## ⚙️ Using the GPodder API

Expand Down

0 comments on commit 023202c

Please sign in to comment.