File tree Expand file tree Collapse file tree 6 files changed +410
-481
lines changed
Expand file tree Collapse file tree 6 files changed +410
-481
lines changed Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change 1- name : 更新每日论文workFlow
1+ name : 更新每月论文workFlow
22
33on :
44 schedule :
5- - cron : ' 0 16 * * 0 ' # 每周日 UTC 16:00 (+8即为北京时间 00:00)
5+ - cron : ' 0 16 1 * * ' # 每月1日 UTC 16:00 (+8即为北京时间 00:00)
66 workflow_dispatch : # 允许手动触发
77 push : # 在推送时触发
88 branches :
1616 BIN_PATH : target/release/my_auto_papers.exe
1717
1818jobs :
19- update_daily_papers :
19+ update_monthly_papers :
2020 runs-on : windows-latest
2121 steps :
2222 - name : 检出代码
7373 if : steps.cargo-cache.outputs.cache-hit != 'true' || steps.check-bin.outputs.exists_bin != 'true'
7474 run : cargo build --release
7575
76- - name : 运行每日更新
76+ - name : 运行每月更新
7777 run : just run "${{ env.BIN_PATH }}"
7878
7979 - name : 提交更改
Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ pub async fn request_paper_with_arxiv_api(
1515 "http://export.arxiv.org/api/query?search_query=ti:{keyword}+{link}+abs:{keyword}&max_results={per_keyword_max_results}&sortBy=lastUpdatedDate"
1616 ) ;
1717
18- println ! ( "正在从 arXiv 获取论文数据...,url:{}" , url ) ;
18+ println ! ( "正在从 arXiv 获取论文数据...,url:{url}" ) ;
1919
2020 let url = Url :: parse ( & url) ?;
2121 println ! ( "正在从 arXiv 获取论文数据..." ) ;
Original file line number Diff line number Diff line change @@ -148,10 +148,10 @@ async fn main() -> Result<()> {
148148 // 先写入 issue 模板的头部信息
149149 writeln ! (
150150 issue_template,
151- "---\n title: 最新论文 - {date}\n labels: documentation\n ---\n \
151+ "---\n title: 每月论文更新 - {date}\n labels: documentation\n ---\n \
152152 {params}\n \n \
153153 ## 论文汇总({papers_num}篇)\n \n \
154- **更好的阅读体验请访问 [Github页面](https://github.com/dbsxdbsx/MyDailyPaper )。**\n \n ",
154+ **更好的阅读体验请访问 [Github页面](https://github.com/dbsxdbsx/MyAutoPapers )。**\n \n ",
155155 date = get_daily_date( ) ,
156156 params = format_this_time_update_config_output( & config) ,
157157 papers_num = 0 // 初始为0,稍后更新
@@ -160,9 +160,9 @@ async fn main() -> Result<()> {
160160 // 先写入 README 的头部信息
161161 writeln ! (
162162 readme,
163- "# 自动论文推送\n \
164- 本项目自动从 arXiv 获取最新的论文,基于关键词进行筛选。\n \n \
165- 点击 'Watch' 按钮可以接收自动推送的邮件通知 。\n \n \
163+ "# 自动论文推送(每月更新) \n \
164+ 本项目每月自动从 arXiv 获取最新的论文,基于关键词进行筛选。\n \n \
165+ 点击 'Watch' 按钮可以接收每月自动推送的邮件通知 。\n \n \
166166 {update_info}\n \n ",
167167 update_info = format_this_time_update_config_output( & config)
168168 ) ?;
@@ -237,8 +237,8 @@ async fn main() -> Result<()> {
237237 let issue_content = std:: fs:: read_to_string ( ".github/ISSUE_TEMPLATE.md" ) ?;
238238 let updated_issue_content = issue_content
239239 . replace (
240- "最新论文0篇 " ,
241- & format ! ( "最新论文 {final_recorded_papers_num}篇" ) ,
240+ "每月论文更新0篇 " ,
241+ & format ! ( "每月论文更新 {final_recorded_papers_num}篇" ) ,
242242 )
243243 . replace (
244244 "论文汇总(0篇)" ,
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ pub fn remove_duplicated_spaces(text: &str) -> String {
1010 re. replace_all ( text. trim ( ) , " " ) . to_string ( )
1111}
1212
13+ // 获取当前日期,用于每月更新的标题
1314pub fn get_daily_date ( ) -> String {
1415 Utc :: now ( )
1516 . with_timezone ( & Shanghai )
You can’t perform that action at this time.
0 commit comments