RADIOD scrapes content from RSS feeds from Blogs, Podcasts, Youtube Videos and also from Youtube & Twitch APIs from the Galician Content Creators registered in the Asociación Cultural Obradoiro Dixital Galego. This content is then used to promote it through the organization social networks (Twitter, Bluesky, Mastodon & Discord) and also store it in a database to later consume it from internal dashboards.
Note
💡 The name "RADIOD" is a retroacronym in galician of "Rede Automatizada de Difusión en Internet do Obradoiro Dixital", which would be translated as "Obradoiro Digital Internet Promotion Automated Network".
- 🌈 Features
- 🚀 Getting Started
- 🙋Support & Contributing
- 🏆 Credits & Acknowledgements 🙏
- ⚖️ License
- 🔗 Reference links and bibliography 📚
- 🌐 Custom promotion messages for each social network and each content creator type (blogs, youtube, podcast, twitch).
- 🤏 Loosely tied. Each task can be executed separatedly for easy debugging and disabling of unwanted functions.
- 🦟 Use of MQTT Queues to communicate between each task as needed.
- 🚀 Easy to setup with Docker, Kubernetes Helm Chart, or on bare metal.
- 🆓 100% free and open-source
- 🗞️
refreshBlogs
,refreshPodcasts
,refreshYoutube
: These tasks store the Blogs, Podcasts and Youtube channels in the database, as well as its latests entries. Then send the newest entries to an MQTT Queue. - 📊
refreshYoutubeStats
: Gathers stats like the channel views and subscribers from the Youtube API and stores them in the database for future analysis. - 📺
refreshTwitch
,refreshTwitchClips
,refreshTwitchGames
: These tasks store information related to Twitch Channels, its "games" and clips, and help towards having all the required information in therefreshStreams
. - 🚦
refreshStreams
: Intended to be used every minute, it checks the active streams of the monitored channels and handles new and offline streams. It sends all the information required to make content rich notifications. - 🌎
publishTwitter
,publishBluesky
,publishMastodon
,publishDiscord
: Subscribe the MQTT topic and publish status update on each social network for each new entry. Twitch Streams are also updated in Discord with a thumbnail of the stream while Live.
- So far, all fixed! 🥳
- Promote new Twitch Clips or Clips with more than a threshold number of views in the social networks.
- Use KNative/OpenFunction to only launch publishers when there are messages, instead of having them pernanently listening the MQTT topics.
In order to run RADIOD you will need to have a running MySQL Database to store the information (You can check the schema needed here) and a MQTT Broker, i.e. Mosquitto.
You will also need some credentials for the different APIs used by RADIOD:
In order to check Twitch API for channels, streams, clips, etc. you need to register an app in the Twitch Developer Console. From here you will extract the values needed for the ./src/config/twitch.config.ts
export default {
client_id: "TWITCH_CLIENT_ID",
client_secret: "TWITCH_CLIENT_SECRET",
};
In order to get Youtube stats (Views, subscriptions) you need an API KEY with access to the Youtube API. Follow the official documentation to obtain it and then configure it on ./src/config/google.config.ts:
export default {
appKey: "GOOGLE_APP_KEY",
};
Access the Twitter Developer Portal and create a new project with the account you want to publish on. You will need to enable auth and write permissions. Follow the documentation of the twitter-api-v2 library for more detailed instructions. Once done, configure the file ./src/config/twitter.config.ts following the example. You can also customize the message template there.
export default {
youtube: {
enable: true,
messageTemplate:
'🤖🎬 {channelName}{mentionUser} acaba de publicar o vídeo "{title}". Dálle unha ollada en\n{url} #GalegoTube #Youtubeiras #ObradoiroDixital',
appKey: "TWITTER_APP_KEY",
appSecret: "TWITTER_APP_SECRET",
accessToken: "TWITTER_ACCESS_TOKEN",
accessSecret: "TWITTER_ACCESS_SECRET",
},
podcast: [...],
blog: [...],
twitch: [...],
};
Follow the documentation on the masto library for information on how to setup your API credentials. Then, configure ./src/config/mastodon.config.ts following the example. You can also customize the message template there.
As of november 2024, Bluesky uses the user credentials to login and post status updates.
Follow the official discord documentation on how to create a webhook. Then configure ./src/config/discord.config.ts following the example. You can also customize the message template there.
The application is designed to be run in Kubernetes, and you can find a helm chart in here. By default the helm chart runs all the tasks in a predefined cron schedules and has the publishers (discord, twitter & mastodon) permanently listening for the mqtt topic. The only thing you need is to configure a secret with all the files in the config folder. The Helm chart will mount the secret as a folder with all the files in the required path for the application to run.
The helm chart uses the docker images built as part of the Github Actions of this repo and published in Docker Hub. You can run each of the action passing the argument of the task specified in the deno.json and passing the folder with the configuration. i.e:
docker run -v ./src/config:/opt/radio_dixital/src/config --entrypoint deno pvillaverde/radio_dixital task publishDiscord
You will need to have Deno installed in your machine, then you can run deno task
to check all the available tasks and for example deno task refreshBlogs
to get all the blogs information.
If you want to add any missing feature or report a bug, you can request ir or report it here. Also if you want and know how to do it, go ahead! That's what make the open source community shines, by allowing us to grow and learn from each other creating amazing tools! Any contribution you make is greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
- Asociación Cultural Obradoiro Dixital Galego
- Óscar Otero - For its support to evolve the old code into loosely tied tasks in its path to Serverless.
- Distributed under the GNU GPL-v3 License. See LICENSE on for more information.