Skip to content

Commit f81355a

Browse files
committed
update readme
1 parent 61188a2 commit f81355a

File tree

2 files changed

+48
-46
lines changed

2 files changed

+48
-46
lines changed

README.md

+26-25
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
# EverydayTechNews
22
Automatically sending tech news to your email every morning.
33

4+
[![technews][action-image]][action-url]
5+
[![forks][forks-image]][forks-url]
6+
7+
[action-url]:https://github.com/NowScott/EverydayTechNews/actions/workflows/technews.yml "Action State"
8+
[action-image]:https://img.shields.io/github/actions/workflow/status/NowScott/EverydayTechNews/technews.yml?label=Action
9+
[forks-url]:https://github.com/NowScott/EverydayTechNews/forks
10+
[forks-image]:https://img.shields.io/github/forks/NowScott/EverydayTechNews?label=Forks
11+
412
## Switch to Chinese
513

614
[![readme-cn][readme-cn-image]][readme-cn-url]
@@ -27,43 +35,36 @@ This small tool for automatically sending news to email is developed based on Py
2735

2836
## Tool Deployment
2937

30-
Deploying this small tool is very simple. If you, like me, only need to read 30 pieces of tech news every day, all you need to do is modify the configuration file.
38+
After the update on July 19, 2023, deployment will become much simpler!
3139

32-
Since the forked repository cannot be set to private, you need to create a new private repository (to prevent your email from being exposed, it's mainly the sender's email used for sending, with the account and password in the configuration file).
40+
Since I have placed all the sensitive information into the repository's secret variables, now deployment can be done through forking.
3341

34-
Then, download all the code from my repository and upload it to your newly created repository.
42+
First, fork this repository: https://github.com/NowScott/EverydayTechNews
3543

36-
The config.json file is as follows:
37-
38-
```json
39-
{
40-
"sender": "[email protected]",
41-
"password": "smtp_password",
42-
"server": "smtp.163.com",
43-
"receivers": [
44-
45-
]
46-
}
47-
```
44+
Next, go to "Settings" and find "Secrets and variables". Click on "Actions" below, and on the right side, you will see a blue button that says "New repository secret". Click on this button to create four secrets:
4845

49-
Make the following changes to the config.json file:
5046

47+
```
48+
SENDING_ACCOUNT: [email protected]
49+
SENDING_PASSWORD: smtp_password
50+
SERVER: smtp.163.com
51+
52+
```
53+
1. The first two are the email address to be used and the secret key for SMTP.
5154

52-
1. Open the smtp option and enter the email address after sender, and put the password obtained from SMTP in the password field.
53-
54-
2. Regarding the server, it depends on the email address you are using. Here, I provide the example of using the NetEase 163 email address. The server addresses for other commonly used email providers are listed at the end.
55+
2. Regarding the server, it depends on the email address you are using. Here, I provide an example using a Netease 163 email address. The server addresses for other commonly used email providers are listed at the end.
5556

56-
3. I have set the receivers as a list, which means you can not only include your own email address but also your friends' email addresses. This allows you to share and discuss contents of mutual interest.
57+
3. The receivers should be separated by ",". You can add not only your own email address but also your friends' email addresses. This allows you to share and discuss content of mutual interest.
5758

58-
After making these changes, find the technews.yml file under .github/workflows/.
59+
After modifying the configuration information, locate the file .github/workflows/technews.yml.
5960

60-
Uncomment the 4th and 5th lines (since this repository is just an example repository and cannot be scheduled). This part sets the execution time at midnight UTC time. To convert it to Beijing time, add 8 hours, which means it will run around 8 AM (though it's not precise and usually finishes around 8:45 AM). For specific rules regarding cron, please refer to this website: https://tool.lu/crontab/.
61+
The meaning of this portion of code is to execute at 22:30 UTC (Greenwich Mean Time) every day. To convert it to Beijing time, you need to add 8 hours, which means it will start executing at around 6:30 AM. However, it may not be entirely accurate. You can modify this part of the time according to your needs. For detailed rules about cron, please refer to this website: https://tool.lu/crontab/
6162

62-
Next, find the "Actions" tab, click on "technews" on the left-hand side, and on the right-hand side, find "Run workflow" to try running it. If there are no errors and the emails are sent successfully, then it is a success.
63+
After that, locate "Actions" above, click on "technews" on the left side, and find "Run workflow" on the right side. If there are no errors in the "Workflow runs" section below and the emails are being sent correctly, then it is successful.
6364

64-
However, if you need news from other categories and not just tech, it may be a bit more complicated.
65+
However, if you need news from other sections, it may be a bit more complicated.
6566

66-
Since the layout of other categories may differ from tech news, changing the category means rewriting the code for page parsing to find news articles that match your taste. I won't go into further detail here.
67+
Since the layout of other sections may be different from the technology section, replacing sections means rewriting the code for page parsing to find news that suits your taste. I won't go into too much detail here.
6768

6869
## Common Email Server Addresses
6970

README_CN.md

+22-21
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
11
# 每日科技新闻
22
每天早晨自动发送科技新闻到你的邮箱。
33

4-
## 切换为英语
4+
[![technews][action-image]][action-url]
5+
[![forks][forks-image]][forks-url]
6+
7+
[action-url]:https://github.com/NowScott/EverydayTechNews/actions/workflows/technews.yml "Action State"
8+
[action-image]:https://img.shields.io/github/actions/workflow/status/NowScott/EverydayTechNews/technews.yml?label=Action
9+
[forks-url]:https://github.com/NowScott/EverydayTechNews/forks
10+
[forks-image]:https://img.shields.io/github/forks/NowScott/EverydayTechNews?label=Forks
11+
12+
# 切换为英语
513

614
[![readme][readme-image]][readme-url]
715

@@ -26,40 +34,33 @@
2634

2735
## 工具部署
2836

29-
这个小工具重新部署起来非常简单,如果你也和我一样,只需要每天看30条科技新闻的话,那么只需要更改配置文件就好。
30-
31-
由于Fork的库不能设为私有,所以你需要新建一个私有库(防止你的邮箱公开,收信的邮箱还好,主要是发信的那个邮箱,账号密码都在配置文件中)
37+
在2023年7月19日的更新后,部署将变的更加简单!
3238

33-
然后把我这个库中的代码都下载下来上传到你新建的库中
39+
由于我将私密性的信息全部放到了仓库的秘密变量中,所以现在可以通过Fork的形式来进行部署
3440

35-
config.json文件如下所示
41+
首先Fork本仓库:https://github.com/NowScott/EverydayTechNews
3642

37-
```json
38-
{
39-
"sender": "[email protected]",
40-
"password": "smtp_password",
41-
"server": "smtp.163.com",
42-
"receivers": [
43-
44-
]
45-
}
43+
接下来在设置(Settings)中找到Secrets and variables,点击下方的Actions,在右侧你可以看到一个蓝色的按钮写着New repositorys secret,点击这个按钮,新建4个secret,分别是:
44+
```
45+
SENDING_ACCOUNT: [email protected]
46+
SENDING_PASSWORD: smtp_password
47+
SERVER: smtp.163.com
48+
4649
```
4750

48-
对config.json做如下更改:
49-
50-
1. 打开smtp选项,在sender后面输入邮箱地址,并将从SMTP获取的密码放入password字段中。
51+
1. 前两个分别是要使用的邮箱和SMTP的密钥
5152

5253
2. 关于服务器(server),它取决于您使用的电子邮件地址。这里我提供了使用网易163邮箱地址的示例。其他常用电子邮件提供商的服务器地址列在最后。
5354

54-
3. 我将接收者(receivers)设置为一个列表,这意味着您不仅可以包括自己的邮箱地址,还可以包括朋友的邮箱地址。这样可以共享和讨论相互感兴趣的内容。
55+
3. 接收者(receivers)用“,”间隔开,不仅可以添加自己的邮箱地址,也可以添加朋友的邮箱地址。这样可以共享和讨论相互感兴趣的内容。
5556

5657
更改完配置信息之后找到.github/workflows/technews.yml这个文件
5758

58-
将第四行和第五行取消注释(因为这个仓库是一个示例仓库,所以无法进行定时运行)。这部分代码的含义是在格林尼治时间(UTC)的每天零点(midnight)执行,换算成北京时间需要加8个小时,即早上8点左右开始执行。然而并非完全准确,一般会在8点45左右结束。有关 cron 的详细规则,请参考这个网站:https://tool.lu/crontab/
59+
这部分代码的含义是在格林尼治时间(UTC)的每天22:30执行,换算成北京时间需要加8个小时,即早上6:30左右开始执行,然而并非完全准确。你可以根据自己的需求对这部分时间进行更改,有关 cron 的详细规则,请参考这个网站:https://tool.lu/crontab/
5960

6061
接着在上方找到Action,左侧点击technews,右侧找到run workflow尝试运行,如果在下方的运行中没有报错而且邮件能正常发送,那么就成功了。
6162

62-
但是如果你和我不同,需要其他版块的新闻,可能要麻烦一些。
63+
但是如果你需要其他版块的新闻,可能要麻烦一些。
6364

6465
由于其他版块的排版和科技的不尽相同,所以更换版块意味着要重新写页面解析部分的代码,去找到符合你口味的新闻,我这里就不过多赘述了。
6566

0 commit comments

Comments
 (0)