help to subscribe the tech blog you want
Welcome watch my Yuque column and keep getting the latest knowledge.
- IM Robot push
- Translate English to Chinese automatically
server {
listen 80;
location /feedit-pro/ {
autoindex on;
autoindex_localtime on;
index index.htm index.html;
root /usr/share/nginx/html;
}
}
item | type | description |
---|---|---|
WEBHOOK_URL | string | robot url of the dingtalk group |
BASE_URL | string | base url of your website |
FEEDIT_ROOT_DIR | string | root directory of archive posts, default: $HOME |
YUQUE_PRIVATE_TOKEN | string | private token for Yuque |
$ git clone https://github.com/feedit/feedit-pro.git
$ npm i
# start feedit service
$ npm run start
rules is located in config/rules
// for example
module.exports = {
enable: true,
run: async function() {
const url = 'https://medium.com/feed/netflix-techblog';
const siteId = path.basename(__filename).replace('.js', '');
const res = await this.ctx.requestXML(url);
const first = res.rss.channel.item[0];
first.siteId = siteId;
first.title = first.title.$cd;
first.logoUrl = 'https://feedit.github.io/feedit-pro/app/public/images/netflix.jpg';
if (this.ctx.isExisted(first)) {
return;
}
const content = first.content$encoded.$cd;
let $ = cheerio.load(content);
$ = await this.ctx.translateNode($);
await this.ctx.archiveToDir($, first);
},
};
$ DEBUG_MODE=true node ./app/schedule/visitor.js
$ npm run start:local
xudafeng |
ltianqi |
---|
This project follows the git-contributor spec, auto upated at Sun Dec 23 2018 23:28:09 GMT+0800
.