This repository has been archived by the owner on Apr 20, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
718 changed files
with
43,651 additions
and
124,246 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,11 +9,13 @@ | |
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>configs</strong></big></big></font></td | ||
><td align=right valign=bottom | ||
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:f%3A%5Ccode%5Cpython%5Cschool_notice%5Csrc%5Cconfigs.py">f:\code\python\school_notice\src\configs.py</a></font></td></tr></table> | ||
<p><tt>Created on Sep 19, 2018<br> | ||
<br> | ||
@author: QiZhao<br> | ||
<p><tt>@author: QiZhao<br> | ||
@contact: [email protected]<br> | ||
@since: 2018-09-19<br> | ||
@license: GNU GPLv3<br> | ||
@version: 0.2.0</tt></p> | ||
@version: 0.3.0<br> | ||
@LastModifiedBy: QiZhao<br> | ||
@LastModifiedDate: 2018-12-24</tt></p> | ||
<p> | ||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> | ||
<tr bgcolor="#55aa55"> | ||
|
@@ -22,16 +24,25 @@ | |
|
||
<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td> | ||
<td width="100%"><strong>ACCOUNT_ID</strong> = ''<br> | ||
<strong>APPID</strong> = ' '<br> | ||
<strong>AUTHOR_EMAIL</strong> = ''<br> | ||
<strong>AUTHOR_NAME</strong> = ''<br> | ||
<strong>AUTH_TOKEN</strong> = ''<br> | ||
<strong>DATABASE_NAME</strong> = ''<br> | ||
<strong>EMAIL_PORT</strong> = 0<br> | ||
<strong>EMAIL_SERVER</strong> = ''<br> | ||
<strong>FROM_ADDR</strong> = ''<br> | ||
<strong>GRANT_TYPE</strong> = 'client_credential'<br> | ||
<strong>LOG_ENABLED</strong> = True<br> | ||
<strong>PASSWORD</strong> = ''<br> | ||
<strong>SAVE_TYPE</strong> = 'MYSQL'<br> | ||
<strong>SCHOOL_NAME</strong> = ''<br> | ||
<strong>SPIDER_CONFIG</strong> = [{'coding': '', 'rule': '', 'subject_CN': '', 'subject_EN': '', 'url': '', 'url_main': ''}, {'coding': '', 'rule': '', 'subject_CN': '', 'subject_EN': '', 'url': '', 'url_main': ''}]<br> | ||
<strong>SECRET</strong> = ' '<br> | ||
<strong>SHOW_RIGHT</strong> = False<br> | ||
<strong>SPIDER_CONFIG</strong> = []<br> | ||
<strong>SQL_PASSWORD</strong> = ''<br> | ||
<strong>SQL_USERNAME</strong> = ''<br> | ||
<strong>TARGET_IP</strong> = ''<br> | ||
<strong>TWILIO_NUMBER</strong> = ''<br> | ||
<strong>VERSION</strong> = ''</td></tr></table> | ||
</body></html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,13 @@ | |
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>main</strong></big></big></font></td | ||
><td align=right valign=bottom | ||
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:f%3A%5Ccode%5Cpython%5Cschool_notice%5Csrc%5Cmain.py">f:\code\python\school_notice\src\main.py</a></font></td></tr></table> | ||
<p><tt># encoding='utf-8'</tt></p> | ||
<p><tt>@author: QiZhao<br> | ||
@contact: [email protected]<br> | ||
@since: 2018-05-08<br> | ||
@license: GNU GPLv3<br> | ||
@version: 0.3.0<br> | ||
@LastModifiedBy: QiZhao<br> | ||
@LastModifiedDate: 2018-10-27</tt></p> | ||
<p> | ||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> | ||
<tr bgcolor="#aa55cc"> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,13 @@ | |
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>send</strong></big></big></font></td | ||
><td align=right valign=bottom | ||
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:f%3A%5Ccode%5Cpython%5Cschool_notice%5Csrc%5Csend.py">f:\code\python\school_notice\src\send.py</a></font></td></tr></table> | ||
<p></p> | ||
<p><tt>@author: QiZhao<br> | ||
@contact: [email protected]<br> | ||
@since: 2018-05-07<br> | ||
@license: GNU GPLv3<br> | ||
@version: 0.3.0<br> | ||
@LastModifiedBy: QiZhao<br> | ||
@LastModifiedDate: 2018-10-24</tt></p> | ||
<p> | ||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> | ||
<tr bgcolor="#aa55cc"> | ||
|
@@ -18,19 +24,22 @@ | |
|
||
<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td> | ||
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="configs.html">configs</a><br> | ||
</td><td width="25%" valign=top><a href="smtplib.html">smtplib</a><br> | ||
</td><td width="25%" valign=top><a href="twilio.html">twilio</a><br> | ||
<a href="json.html">json</a><br> | ||
</td><td width="25%" valign=top><a href="requests.html">requests</a><br> | ||
<a href="smtplib.html">smtplib</a><br> | ||
</td><td width="25%" valign=top><a href="time.html">time</a><br> | ||
<a href="twilio.html">twilio</a><br> | ||
</td><td width="25%" valign=top></td></tr></table></td></tr></table><p> | ||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> | ||
<tr bgcolor="#eeaa77"> | ||
<td colspan=3 valign=bottom> <br> | ||
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr> | ||
|
||
<tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td> | ||
<td width="100%"><dl><dt><a name="-Send"><strong>Send</strong></a>(msgs, subject, send_number, to_addr_str, flag=True)</dt><dd><tt>向手机号码为send_number的人发送通知信息<br> | ||
<td width="100%"><dl><dt><a name="-Send"><strong>Send</strong></a>(msgs, subject, send_number, to_addr_str, message_type, flag=True)</dt><dd><tt>向手机号码为send_number的人发送通知信息<br> | ||
向to_addr_str中的邮箱地址发送主题为subject的通知信息<br> | ||
支持是否写入日志记录的选择 <br> | ||
<br> | ||
<br> | ||
Args:<br> | ||
msgs: 存储要发送的内容的列表,且该列表的每个元素为字典,<br> | ||
列表元素中的字典必须包含三个键值对,且key必须为'title','link','date',<br> | ||
|
@@ -40,6 +49,7 @@ | |
send_number: 短信接收者的手机号码<br> | ||
to_addr_str: 收件人的邮箱地址,多个邮箱地址之间应以','分割,类型为字符串<br> | ||
例如:'[email protected]','[email protected],[email protected]'<br> | ||
message_type: 类型(通知/新闻)<br> | ||
flag: 一个可选变量,用来决定是否在发送日志中记录此次发送信息,默认为True(记录)</tt></dd></dl> | ||
<dl><dt><a name="-Send_email"><strong>Send_email</strong></a>(txt, to_addr_str, subject)</dt><dd><tt>向to_addr_str中的邮箱地址发送主题为subject,正文部分为txt的邮件<br> | ||
支持多人同时发送<br> | ||
|
@@ -48,25 +58,28 @@ | |
to_add_str: 收件人的邮箱地址,多个邮箱地址之间应以','分割,类型为字符串<br> | ||
例如:'[email protected]','[email protected],[email protected]'<br> | ||
subject: 邮件主题<br> | ||
<br> | ||
<br> | ||
Returns:<br> | ||
log_send_email: 经过处理的含收件人邮箱地址以及发送结果的日志信息,类型为字符串<br> | ||
例如:'[email protected] 邮件发送成功!'<br> | ||
'[email protected] 邮件发送失败,请检查你的账号是否有效或网络是否良好!'<br> | ||
'[email protected],[email protected] 邮件发送成功!'</tt></dd></dl> | ||
<dl><dt><a name="-Send_sms"><strong>Send_sms</strong></a>(send_number, msg)</dt><dd><tt>向手机号码为send_number的人发送内容为msg的短信<br> | ||
<dl><dt><a name="-Send_sms"><strong>Send_sms</strong></a>(send_number, msg)</dt><dd><tt>向手机号码为send_number的人发送内容为msg的短信 <br> | ||
支持多个手机号码的发送<br> | ||
Args:<br> | ||
send_number: 短信接收者的手机号码<br> | ||
msg: 要发送的文本内容,类型为字符串<br> | ||
<br> | ||
<br> | ||
Returns:<br> | ||
经过处理的含短信接收者手机号码以及发送结果的日志信息,类型为字符串<br> | ||
例如:<br> | ||
'+8615012345678 短信已经发送'<br> | ||
'+8615012345678 短信发送失败,请检查你的账号是否有效或网络是否良好!'<br> | ||
<br> | ||
<br> | ||
send_number应已经在twilio上验证过<br> | ||
msg中不能包含敏感词,否则短信会被运营商拦截</tt></dd></dl> | ||
<dl><dt><a name="-get_token"><strong>get_token</strong></a>()</dt><dd><tt># 获取微信access_token<br> | ||
# TODO 每两小时token会过期,一天大概只能获取2000次</tt></dd></dl> | ||
<dl><dt><a name="-send_to_wechat"><strong>send_to_wechat</strong></a>(str='default_words!')</dt><dd><tt># 发送消息给订阅号(订阅号由get_token决定</tt></dd></dl> | ||
</td></tr></table> | ||
</body></html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.