{"id":15429177,"url":"https://github.com/xiongwilee/techweekly","last_synced_at":"2025-04-19T16:05:37.806Z","repository":{"id":147515888,"uuid":"78426700","full_name":"xiongwilee/Techweekly","owner":"xiongwilee","description":"高可配的技术周报邮件推送工具","archived":false,"fork":false,"pushed_at":"2017-12-22T04:02:02.000Z","size":12,"stargazers_count":23,"open_issues_count":0,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-29T09:51:14.359Z","etag":null,"topics":["crawler","nodejs","techweekly"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xiongwilee.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-01-09T12:27:30.000Z","updated_at":"2024-04-24T05:08:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"3235dfcb-23ca-46db-b893-a638a46ddf8e","html_url":"https://github.com/xiongwilee/Techweekly","commit_stats":{"total_commits":19,"total_committers":1,"mean_commits":19.0,"dds":0.0,"last_synced_commit":"5f80c744ff7658ac9697b5b25ba025a93da4e28b"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiongwilee%2FTechweekly","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiongwilee%2FTechweekly/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiongwilee%2FTechweekly/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiongwilee%2FTechweekly/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xiongwilee","download_url":"https://codeload.github.com/xiongwilee/Techweekly/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249220841,"owners_count":21232421,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["crawler","nodejs","techweekly"],"created_at":"2024-10-01T18:09:12.497Z","updated_at":"2025-04-16T08:33:31.850Z","avatar_url":"https://github.com/xiongwilee.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Techweekly\n\n高可配的技术周报邮件推送工具。\n\n![](http://img002.qufenqi.com/products/7c/ba/7cbac61933c8e8d21fe2e3915d4618e4.jpeg)\n\n## 快速入门\n\n第一步，下载代码，安装依赖：\n```shell\n$ git clone https://github.com/xiongwilee/Techweekly.git\n$ cd Techweekly \u0026\u0026 npm install --registry=https://registry.npm.taobao.org\n```\n\n第二步，修改邮件配置`config/config.mail.js`：\n```javascript\nmodule.exports = {\n  \"sender\": {\n    \"host\": \"邮箱服务器host\",\n    \"port\": \"邮箱服务器端口号\",\n    \"auth\": {\n      \"user\": \"邮箱地址\",\n      \"pass\": \"邮箱密码\"\n    }\n  },\n  \"subject\": \"邮件主题\",\n  \"from\": \"你的名字 \u003c邮箱地址\u003e\",\n  \"to\": [\"收件人邮箱地址\"]\n}\n```\n\n或者，你也可以直接使用默认的邮箱配置`config.mail.sample.js`，修改`config.mail.sample.js`为`config.mail.js`\n\n第三步，发送周报邮件：\n```shell\n$ node index.js\n```\n\n\n**FYI:** \n\n如果你需要定时发送邮件，推荐使用`crontab`:\n```shell\n* 10 * * 5 cd /your/project/path/ \u0026\u0026 node index.js\n```\n\n\n## 贡献\n\nTechweekly默认支持[fex](https://github.com/zenany/weekly/tree/master/software/)和[75team](https://weekly.75team.com/)两个默认周报源，你可以根据自己的需求配置周报来源：\n```javascript\n\"源ID（可以配置任意字符）\": {\n    /**\n     * 页面连接，可以是一个string, 也可以是function，如果是function则：\n     * @return {String} 页面URL\n     */\n    url: function() {},\n\n    /**\n     * 通过url获取文章内容URL的方法\n     * @param  {string} html 通过页面连接爬取到的页面html\n     * @return {String}      从html中解析到的文章内容的链接\n     */\n    getLink: function(html) {},\n\n    /**\n     * 通过文章内容的链接爬取到文章主体\n     * @param  {String} html 通过文章内容的链接爬取到文章的html\n     * @return {String}      文章主体部分的html\n     */\n    getContent: function(html) {}\n}\n```\n\n**FYI:** \n\n在`getLink`和`getContent`方法里，你可以直接使用[cheerio](https://github.com/cheeriojs/cheerio#cheerio)来解析DOM。\n\n## 作者\n\n* [xiongwilee](https://github.com/xiongwilee)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxiongwilee%2Ftechweekly","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxiongwilee%2Ftechweekly","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxiongwilee%2Ftechweekly/lists"}