• Stars
    star
    116
  • Rank 303,894 (Top 6 %)
  • Language
    Go
  • License
    MIT License
  • Created almost 10 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Pulls multiple podcast feeds (RSS) and republishes as a common feed, properly sorted and podcast-client friendly.

Feed Master Build Status Coverage Status Docker Automated build

Feed-Master is a service that aggregates and publishes RSS feeds from multiple sources into a single feed. It normalizes the feeds to ensure that they are valid, compatible with podcast clients, and compliant with the RSS 2.0 specification. This allows users to access all of their desired content in a single, easy-to-use feed.

In addition to aggregating RSS feeds, Feed-Master can also publish updates to social media platforms such as Twitter and Telegram. For Telegram, the actual audio file is published, while for Twitter, a link to the original audio file is included in the tweet along with episode information like the title and description.

Feed-Master also supports extracting audio from YouTube channels and using it to create the final feed. The service uses tools like yt-dlp and ffmpeg to pull videos and extract the audio, respectively. In this mode, Feed-Master serves the audio files in addition to the generated RSS feed, providing users with even more options for accessing and consuming content.

Run in docker (short version)

  • Copy docker-compose.yml and adjust exposed port if needed
  • Create etc/fm.yml (samples provided in _example)
  • Start container with docker-compose up -d feed-master

example of docker-compose.yml available in _example

Main application parameters

Command line Environment Default Description
db FM_DB var/feed-master.bdb bolt db file
conf FM_CONF feed-master.yml config file (yml)
admin-passwd ADMIN_PASSWD none (disabled) admin password for protected endpoint
dbg DEBUG false debug mode

Configuration

Usually, feed-master configuration is stored in feed-master.yml file. It is a yaml file with the following structure:

feeds:
  yt-example: # feed name, can be repeated for multiple source feeds
    title: Some cool channels # feed title
    description: an example of youtube-based podcas # feed description
    link: http://localhost:8080/feed/yt-example # link to the source site
    language: "ru-ru" # feed language
    author: "Someone" # feed author, default "Feed Master"
    owner_email: "[email protected]" # feed owner email, used in various services (i.e. spotify) to confirm RSS submission
    image: images/yt-example.png # feed image, used in generated RSS as podcast thumbnail
    filter: 
      - Title: "something" # filter from the feed, can be regexp or string
      - Invert: true # invert filter (acts as "only"), default false
    sources: # list of sources, each source is a name of and the source RSS feed
      - {name: "Точка", url: http://localhost:8080/yt/rss/PLZVQqcKxEn_6YaOniJmxATjODSVUbbMkd}
      - {name: "Живой Гвоздь", url: http://localhost:8080/yt/rss/UCWAIvx2yYLK_xTYD4F2mUNw}
      - {name: "Дилетант", url: http://localhost:8080/yt/rss/UCuIE7-5QzeAR6EdZXwDRwuQ}


youtube: # youtube configuration, optional
  base_url: http://localhost:8080/yt/media # base url for youtube media
  dl_template: yt-dlp --extract-audio --audio-format=mp3 --audio-quality=0 -f m4a/bestaudio "https://www.youtube.com/watch?v={{.ID}}" --no-progress -o {{.FileName}} # template for youtube-dl
  base_chan_url: "https://www.youtube.com/feeds/videos.xml?channel_id=" # base url for youtube channel
  base_playlist_url: "https://www.youtube.com/feeds/videos.xml?playlist_id=" # base url for youtube playlist
  update: 60s # update interval for youtube feeds
  skip_shorts: 120s # skip videos (and audios) shorter than this value, optional
  max_per_channel: 2 # max number of the latest videos per yt channel to download and process
  files_location: ./var/yt # location for downloaded youtube files
  rss_location: ./var/rss # location for generated youtube channel's RSS
  channels: # list of youtube channels to download and process
      # id: channel or playlist id, name: channel or playlist name, type: "channel" or "playlist", 
      # lang: language of the channel, keep: override default keep value
      # filter: criteria to include and exclude videos, can be regex
      - {id: UCWAIvx2yYLK_xTYD4F2mUNw, name: "Живой Гвоздь", lang: "ru-ru"}
      - {id: UCuIE7-5QzeAR6EdZXwDRwuQ, name: "Дилетант", type: "channel", lang: "ru-ru", "keep": 10}
      - {id: PLZVQqcKxEn_6YaOniJmxATjODSVUbbMkd, name: "Точка", type: "playlist", lang: "ru-ru", filter: {include: "ТОЧКА", exclude: "STAR'цы Live"}} 

system: # system configuration
  update: 1m # update interval for checking source feeds
  max_per_feed: 10 # max items per feed to be processed and inclueded in the final RSS
  max_total: 50 # max total items to be included in the final RSS
  max_keep: 1000 # max items to be kept in the internal database 
  base_url: http://localhost:8080 # base url for the generated RSS and media files

see examples for more details.

Single-feed configuration

For a very simple configuration, command-line only configuration is available. In this case only a single source feed is allowed and yt processing is disabled. The command-line configuration is the following:

Command line Environment Default Description
feed FM_FEED single feed, overrides config
update-interval UPDATE_INTERVAL 1m update interval, overrides config
telegram_chan TELEGRAM_CHAN single telegram channel, overrides config

Name of the channel or numeric ChatID could be used, here are the instructions on obtaining the ChatID. To be able to post messages to the channel, bot must be added as administrator with Post permission.

All this command-line mode is good for - process a single feed, send a telegram message and send a tweet on each new item.

Notifications

In both configuration modes, user can specify a list of telegram and twitter accounts to be notified.

Command line Environment Default Description
telegram_server TELEGRAM_SERVER https://api.telegram.org telegram bot api server
telegram_token TELEGRAM_TOKEN telegram token
telegram_timeout TELEGRAM_TIMEOUT 1m telegram timeout
consumer-key TWI_CONSUMER_KEY twitter consumer key
consumer-secret TWI_CONSUMER_SECRET twitter consumer secret
access-token TWI_ACCESS_TOKEN twitter access token
access-secret TWI_ACCESS_SECRET twitter access secret
template TEMPLATE {{.Title}} - {{.Link}} twitter message template

API

See requests.http

public endpoints

  • GET /rss/{name} - returns feed-set for given feed name
  • GET /list - returns list of feed-sets (json)
  • GET /image/{name} - returns image for given feed name
  • GET /feed/{name}/sources - returns list of sources for given feed name
  • GET /yt/rss/{channel} - return RSS feed for given youtube channel

admin endpoints

  • POST /yt/rss/generate - regenerate RSS feed for all youtube channels
  • DELETE /yt/entry/{channel}/{video} - delete youtube entry from internal database and remove it from RSS feed

Web UI

Web UI shows a list of items from generated RSS. It is available on /feeds or, for the particular output feed on /feed/{name}

Telegram notifications details

By default, (with only TELEGRAM_TOKEN provided) Telegram notifications will be sent using standard Bot API which has a limit of 50Mb for audio file upload.

You can provide TELEGRAM_API_ID and TELEGRAM_API_HASH (from here) to telegram-bot-api service in docker-compose.yml and uncomment TELEGRAM_SERVER for feed-master, then it would use the local bot api server to raise audio file upload limit from 50Mb to 2000Mb.

To use local telegram bot api server, use docker-compose up -d command instead of docker-compose up -d feed-master.

More Repositories

1

remark42

comment engine
Go
4,881
star
2

reproxy

Simple edge server / reverse proxy
Go
1,212
star
3

spot

A user-friendly and efficient tool for the effortless deployment and configuration of resources on remote machines.
Go
349
star
4

docker-logger

Logs collector for docker
Go
246
star
5

secrets

secrets kept safe
Go
143
star
6

tg-spam

Anti-Spam bot for Telegram
Go
140
star
7

baseimage

minimalistic docker base image to build and deploy apps
Shell
114
star
8

updater

Simple web-hook based receiver executing things via HTTP request
Go
108
star
9

cronn

cron service with extras
Go
85
star
10

dkll

Agent, server and client to collect and access logs in dockerized infrastructure
Go
66
star
11

rss2twitter

publish rss updates to twitter
Go
56
star
12

sys-agent

System agent. Reports server status via HTTP API
Go
50
star
13

github-backup-docker

Docker wrapper for github-backup
Shell
49
star
14

echo-http

Echo http service
Go
44
star
15

monit-docker

Dockerized monit
Python
43
star
16

rlb

Redirecting Load Balancer
Go
40
star
17

ghost-buster-docker

Ready to use ghost with buster and auto-generation in docker container
Shell
39
star
18

proxy-cron

A simple proxy with crontab scheduling
Go
14
star
19

pi-radio

Python
14
star
20

mongo-auth

mongo docker with auth
Shell
12
star
21

rlb-stats

Stats collector and reporter for RLB
Go
7
star
22

le-dns-updater

Update LE certs with DNS challenge
Shell
3
star
23

remark42-site

remark42.com site
HTML
2
star
24

umputun.dev

umputun.dev website
HTML
2
star
25

fm-config

FeedMaster configuration for podcasts
Dockerfile
1
star
26

esvn

GUI frontend to the Subversion revision system
HTML
1
star
27

homebrew-apps

Homebrew thing
Ruby
1
star