Skip to content

Commit

Permalink
0.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
fengkx committed Mar 7, 2021
1 parent 95ce860 commit 1b38cf9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "noderssbot",
"version": "0.8.4",
"version": "0.9.0",
"description": "Another Telegram RSSBot in Node.js",
"main": "dist/source",
"engines": {
Expand Down
11 changes: 8 additions & 3 deletions source/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,25 @@ export const config: Config = {
lang: process.env.RSSBOT_LANG || 'zh-cn',
item_num: parseInt(process.env.RSSBOT_ITEM_NUM) || 10,
fetch_gap: process.env.RSSBOT_FETCH_GAP || '5m',
strict_ttl: !!process.env.RSSBOT_STRICT_TTL || true,
strict_ttl:
process.env.RSSBOT_STRICT_TTL !== '0' &&
process.env.RSSBOT_STRICT_TTL !== 'false',
notify_error_count: parseInt(process.env.NOTIFY_ERR_COUNT) || 5,
view_all: !!process.env.RSSBOT_VIEW_ALL || false,
UA:
process.env.RSSBOT_UA ||
`Mozilla/5.0 NodeRSSBot v${version}(https://github.com/fengkx/NodeRSSBot)`,
not_send: !!process.env.NOT_SEND || false, // just for debug use
concurrency: parseInt(process.env.RSSBOT_CONCURRENCY) || 200,
delete_on_err_send: !!process.env.DELETE_ON_ERR_SEND || true, // block and chat not found
delete_on_err_send:
process.env.DELETE_ON_ERR_SEND !== '0' &&
process.env.DELETE_ON_ERR_SEND !== 'false', // block and chat not found
resp_timeout: parseInt(process.env.RSSBOT_RESP_TIMEOUT) || 40,
allow_list: process.env.RSSBOT_ALLOW_LIST
? process.env.RSSBOT_ALLOW_LIST.split(',').map((id) => Number(id))
: null,
auto_migrate: !!process.env.AUTO_MIGRATE || true
auto_migrate:
process.env.AUTO_MIGRATE !== '0' && process.env.AUTO_MIGRATE !== 'false'
};
Object.defineProperty(config, 'PKG_ROOT', {
enumerable: false,
Expand Down

0 comments on commit 1b38cf9

Please sign in to comment.