GithubHelp home page GithubHelp logo

techweekly's Introduction

Techweekly

高可配的技术周报邮件推送工具。

快速入门

第一步,下载代码,安装依赖:

$ git clone https://github.com/xiongwilee/Techweekly.git
$ cd Techweekly && npm install --registry=https://registry.npm.taobao.org

第二步,修改邮件配置config/config.mail.js

module.exports = {
  "sender": {
    "host": "邮箱服务器host",
    "port": "邮箱服务器端口号",
    "auth": {
      "user": "邮箱地址",
      "pass": "邮箱密码"
    }
  },
  "subject": "邮件主题",
  "from": "你的名字 <邮箱地址>",
  "to": ["收件人邮箱地址"]
}

或者,你也可以直接使用默认的邮箱配置config.mail.sample.js,修改config.mail.sample.jsconfig.mail.js

第三步,发送周报邮件:

$ node index.js

FYI:

如果你需要定时发送邮件,推荐使用crontab:

* 10 * * 5 cd /your/project/path/ && node index.js

贡献

Techweekly默认支持fex75team两个默认周报源,你可以根据自己的需求配置周报来源:

"源ID(可以配置任意字符)": {
    /**
     * 页面连接,可以是一个string, 也可以是function,如果是function则:
     * @return {String} 页面URL
     */
    url: function() {},

    /**
     * 通过url获取文章内容URL的方法
     * @param  {string} html 通过页面连接爬取到的页面html
     * @return {String}      从html中解析到的文章内容的链接
     */
    getLink: function(html) {},

    /**
     * 通过文章内容的链接爬取到文章主体
     * @param  {String} html 通过文章内容的链接爬取到文章的html
     * @return {String}      文章主体部分的html
     */
    getContent: function(html) {}
}

FYI:

getLinkgetContent方法里,你可以直接使用cheerio来解析DOM。

作者

techweekly's People

Contributors

xiongwilee avatar

Stargazers

Roman avatar  avatar Akasha avatar  avatar BinoYip avatar  avatar Haitao Lee avatar Baofeng avatar zhuo.li avatar bz avatar dokyun avatar Cuity avatar Howard avatar 凉凉 avatar bugfucker avatar toby avatar Oolong Tea avatar  avatar Dawei Ma avatar Alexa Smith avatar FSECD avatar 孙海阳 avatar  avatar Ruibin avatar

Watchers

 avatar Canon avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.