๐Ÿ“ฆ hyoban / rss-to-bot

send your rss feed to telegram bot

โ˜… 16 stars โ‘‚ 1 forks ๐Ÿ‘ 16 watching
opmlrsstelegram-bot
๐Ÿ“ฅ Clone https://github.com/hyoban/rss-to-bot.git
HTTPS git clone https://github.com/hyoban/rss-to-bot.git
SSH git clone git@github.com:hyoban/rss-to-bot.git
CLI gh repo clone hyoban/rss-to-bot
hyoban hyoban chore: add env vault 0df02f1 2 years ago ๐Ÿ“ History
๐Ÿ“‚ main View all commits โ†’
๐Ÿ“ .github
๐Ÿ“ .vscode
๐Ÿ“ src
๐Ÿ“„ .eslintrc
๐Ÿ“„ .gitattributes
๐Ÿ“„ .gitignore
๐Ÿ“„ package.json
๐Ÿ“„ pnpm-lock.yaml
๐Ÿ“„ readme.md
๐Ÿ“„ tsconfig.json
๐Ÿ“„ README.md

rss to bot

send feeds to bot

Use Github Action to send your RSS feeds to Telegram bots.

USE

  • Click Use this template to generate your own repository
  • Creat a new gist which should includes feeds.txt and sent.json
  • Here is a gist example.
  • Settings->Secrets->Actions->New repository secrets to create:
  • Telegram's robot token TG_TOKEN
  • The id TG_CHAT_ID of your conversation with the bot
  • The time zone you are in TIMEZONE. For example Asia/Shanghai
  • GIST_ID used to store your feeds.txt and sent.json files
  • GIST_TOKEN is used to update the gist, Generate

FAQ

How to get TG_CHAT_ID

You can run the following code locally, then send /start to the robot.

const TelegramBot = require('node-telegram-bot-api')

const token = 'xxxxx'
const bot = new TelegramBot(token, { polling: true })
let chatId = null

bot.onText(/\/start/, (msg) => {
  chatId = msg.chat.id
  console.log('chatId:', chatId)
  bot.sendMessage(chatId, chatId)
})

How to modify the frequency of sending subscriptions

Edit the content of - cron: '0 7,12,17,22 * * *' in the .github/workflows/main.yml file, the default meaning is that it will be executed at 7,12,17,22 o'clock every day.