Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
9b1f400c11 |
@ -1,7 +1,7 @@
|
|||||||
const loader = require('../libs/loader');
|
const loader = require('../libs/loader');
|
||||||
const lot = require('../libs/lot');
|
const lot = require('../libs/lot');
|
||||||
const lotv2 = require('../libs/lotV2');
|
const lotv2 = require('../libs/lotV2');
|
||||||
const pusher = require('../libs/pusher');
|
const gotify = require('../libs/gotify');
|
||||||
const log4js = require('log4js');
|
const log4js = require('log4js');
|
||||||
const logger = log4js.getLogger();
|
const logger = log4js.getLogger();
|
||||||
|
|
||||||
@ -16,7 +16,7 @@ V1: ${v1.mainline} stars: ${v1.mainstars}
|
|||||||
Other: ${v1.otherLine} stars: ${v1.otherStars}
|
Other: ${v1.otherLine} stars: ${v1.otherStars}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
pusher.push(msg);
|
gotify.push(msg);
|
||||||
logger.debug(msg);
|
logger.debug(msg);
|
||||||
// loader.save(data);
|
// loader.save(data);
|
||||||
}
|
}
|
||||||
|
20
libs/gotify.js
Normal file
20
libs/gotify.js
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
|
||||||
|
const gotify = require('jotify');
|
||||||
|
|
||||||
|
gotify.url = 'https://push.caliban.io';
|
||||||
|
gotify.token = 'A_OY8j2kRWJOJig';
|
||||||
|
gotify.priority = 7;
|
||||||
|
|
||||||
|
const prefix = process.env.NODE_ENV === 'production' ? 'Production' : 'Dev';
|
||||||
|
const title = `mdLot ${ prefix } Alert`;
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
|
||||||
|
'push' : function(contents) {
|
||||||
|
const now = new Date();
|
||||||
|
|
||||||
|
const msg = `Updated at ${new Date(now).toLocaleString()}\n\n${contents}`;
|
||||||
|
gotify.send(title, msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
3187
package-lock.json
generated
3187
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -24,6 +24,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"cheerio": "^1.0.0-rc.2",
|
"cheerio": "^1.0.0-rc.2",
|
||||||
"fecha": "^4.2.3",
|
"fecha": "^4.2.3",
|
||||||
|
"jotify": "^1.0.2",
|
||||||
"log4js": "^6.4.6",
|
"log4js": "^6.4.6",
|
||||||
"node-fetch": "^3.2.4",
|
"node-fetch": "^3.2.4",
|
||||||
"node-pushover": "^1.0.0",
|
"node-pushover": "^1.0.0",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user