
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
rss-to-telegram
Advanced tools
This is the module that you need to send rss news to a telegram channel.
This is the module that you need to send rss news to a telegram channel.
support for:
npm i rss-to-telegram
const rssToTelegram = require("rss-to-telegram");
const { TELEGRAM_BOT, TELEGRAM_CHANNEL } = process.env;
rssToTelegram({
bot: TELEGRAM_BOT,
channel: TELEGRAM_CHANNEL,
cron: "*/15 * * * * *", // publish every 15 seconds, cron sintaxis
timezone: "America/Havana", // your defined timezone
// rss source
source: "https://feed.informer.com/digests/ZO8A5LZCGA/feeder.rss", // can be an async function or and array of objects
// source: async () => {
// return db.get({ limit: 10 }); // your custom db
// },
// source: [{colo:"red"}],
// add new fields to show in the message
preprocess: async (item) => {
item.color = "green";
return item;
},
// define you own message template
template:
'Color is {{color}}, <a href="{{image}}"> </a> <b><a href="{{link}}">{{title}}</a></b>\n @{{channel}}',
// filter news of the day, use this function to filter already published posts
filter: async ({ date }) => { // async functtion
// must be async
const d = new Date();
return (
date.getDate() === d.getDate() &&
date.getMonth() === d.getMonth() &&
date.getFullYear() === d.getFullYear()
);
},
// add extra common fields to all items,
extraFields: { colo: "red", line: "stroke" }, // add line field to all items and overwrite color field
});
# ┌────────────── second (optional)
# │ ┌──────────── minute
# │ │ ┌────────── hour
# │ │ │ ┌──────── day of month
# │ │ │ │ ┌────── month
# │ │ │ │ │ ┌──── day of week
# │ │ │ │ │ │
# │ │ │ │ │ │
# * * * * * *
0 */5 * * * *
0 */15 * * * *
0 30 * * * *
0 0,5,10 * * * *
0 */30 * * * *
More example https://crontab.guru/examples.html
https://github.com/moment/moment-timezone/blob/develop/data/packed/latest.json
use the preprocess function to add fields, then modify the template to show the new fields in the message
rssToTelegram({
...
preprocess: async (item) => {
item.color = "green";
return item;
},
template: 'Color is {{color}}, Link is {{link}}, Title is {{title}} \n @{{channel}}',
...
})
Donate Bitcoin:
bitcoin:3GqQcxFk5y7onUyoTKqZHwoWXvLusqJSVG
3GqQcxFk5y7onUyoTKqZHwoWXvLusqJSVG
Contact: fabiel.leon.oliva@gmail.com
FAQs
This is the module that you need to send rss news to a telegram channel.
The npm package rss-to-telegram receives a total of 2 weekly downloads. As such, rss-to-telegram popularity was classified as not popular.
We found that rss-to-telegram demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.