生成并返回消息的正文部分,同时生成摘要文件 :param file_path: 周刊文件路径 :param weekly_no: 期号 :param pub_date: 发布日期 :return: 格式化的正文内容
(file_path, weekly_no, pub_date)
| 393 | return tag + title |
| 394 | |
| 395 | def set_content_body(file_path, weekly_no, pub_date): |
| 396 | """ |
| 397 | 生成并返回消息的正文部分,同时生成摘要文件 |
| 398 | :param file_path: 周刊文件路径 |
| 399 | :param weekly_no: 期号 |
| 400 | :param pub_date: 发布日期 |
| 401 | :return: 格式化的正文内容 |
| 402 | """ |
| 403 | content_meta = get_front_matter(file_path) |
| 404 | content_body = content_to_string(read_md(file_path)) |
| 405 | # 在非在线环境下生成摘要文件 |
| 406 | online_action = os.getenv('ONLINE_ACTION') |
| 407 | if not online_action: |
| 408 | write_to_md_file(weekly_no, content_meta, content_body, pub_date, file_path) |
| 409 | return content_body |
| 410 | |
| 411 | def set_footer(): |
| 412 | """ |
nothing calls this directly
no test coverage detected