A Google Apps Script (GAS) to send translated RSS feeds to Slack.
If you want to get arXiv feeds, please use ArXiv-feeder.
-
Install and setup clasp and npm and Slack webhook.
-
Clone this.
git clone https://github.com/takubokudori/Feeder
- Create
config.ts
and write a configuration.
cd Feeder
yarn install --dev
vi src/config.ts
- An example to config.ts
import {GlobalFeedConfig} from "./configuration";
const CONFIG = {
slack_urls: [
"https://hooks.slack.com/services/Y0ur/w5bHO0k/URL",
],
abort: "no",
target_lang: "ja",
translate_title: true,
feeds: [
{feed_url: "http://example.com/rss", source_lang: "ja", target_lang: "en"},
"http://example.com/atom.xml",
"http://example.com/index.rdf",
],
};
Edit parameters
.
- slack_urls : Slack webhook URLs.
- abort: Abort timing.
"no"
by default.- "immediately": Abort immediately when an error occurs.
- "yes": Accumulate a log when an error occurs and finally abort.
- "no": Accumulate a log when an error occurs and finally do not abort.
- source_lang : Source language.
"en"
by default. - target_lang : Target language. No translation by default.
- translate_title : If this is true, titles will be translated.
false
by default. - feeds : RSS feed URLs.
- feeds can specify a URL string, or a config object.
- Each feed can have its own configurations, which can override the global configurations.
- Upload to GAS.
clasp create Feeder
# Create "sheets" script.
clasp push
-
Grant the app. (First, execute
dryRun
to initialize the acquired ID list.) -
Set a trigger.
See ./LICENSE