Generate Daily Sports Update
This skill runs the daily_sports_update.py script to fetch the latest sports science research and wearable tech news. It automatically handles deduplication, so you can run it frequently without worrying about seeing the same content twice.
Prerequisites
- - Python 3: Requires
python3 to be installed. - Dependencies: The required Python packages defined in
requirements.txt must be installed (pip3 install -r requirements.txt). - Environment Variables:
-
NOTION_TOKEN: The integration token for Notion API.
-
NOTION_PAGE_ID: The ID of the Notion page to sync the daily update to.
- - Tools Needed: You must have access to the
run_command tool to execute the script in a bash terminal.
Instructions
- 1. Locate the Script:
The script
daily_sports_update.py is located in the user's sports-science-daily directory. You should first ensure you are in the correct working directory.
- 2. Run the update:
Use the
run_command tool to execute the python script.
CODEBLOCK0
- --days N: (Optional) Number of days to look back (default is 7). If you haven't run it in a while, increase this (e.g., --days 7 or --days 30).
- --no-history: (Optional) Use this ONLY if you want to force re-fetching of already seen items (e.g., for debugging).
- 3. Output & Sync:
- The script will generate a local Markdown file named:
YYYY-MM-DD_运动科学日报.md
- It will automatically sync the compiled blocks directly to the specified Notion page using the Notion APIs.
- It updates
processed_history.json locally to mark fetched URLs/PMIDs as seen.
- 4. Handling "No New Content":
- If the script's terminal output contains "🎉 没有发现新内容" (No new content found), it means all found items in the lookback period have already been processed and synced previously. You can try running with a larger
--days argument.
Security & Privacy Note
- - External Endpoints Called:
-
https://eutils.ncbi.nlm.nih.gov: Accessed to fetch PubMed paper statistics and abstracts.
-
https://api.notion.com: Accessed to create and populate the daily reports.
- Various RSS feed URLs (e.g., Garmin, MySportScience, YouTube RSS).
- - Files Checked: Opens and updates
processed_history.json and creates .md reporting files locally in the working directory. - This skill invokes web requests to fetch relevant sports science data but does not expose any user PII.
生成每日体育动态
此技能运行dailysportsupdate.py脚本,用于获取最新的体育科学研究与可穿戴技术新闻。它自动处理去重功能,因此您可以频繁运行而无需担心看到重复内容。
前提条件
- - Python 3:需要安装python3。
- 依赖项:必须安装requirements.txt中定义的Python包(pip3 install -r requirements.txt)。
- 环境变量:
- NOTION_TOKEN:Notion API的集成令牌。
- NOTION
PAGEID:用于同步每日更新的Notion页面ID。
- - 所需工具:您必须能够使用run_command工具在bash终端中执行脚本。
操作说明
- 1. 定位脚本:
daily
sportsupdate.py脚本位于用户的sports-science-daily目录中。您应首先确保处于正确的工作目录。
- 2. 运行更新:
使用run_command工具执行Python脚本。
bash
python3 dailysportsupdate.py --days 2
- --days N:(可选)回溯天数(默认为7天)。如果长时间未运行,可增加此值(例如--days 7或--days 30)。
- --no-history:(可选)仅在需要强制重新获取已处理项目时使用(例如用于调试)。
- 3. 输出与同步:
- 脚本将在本地生成一个Markdown文件,命名为:YYYY-MM-DD_运动科学日报.md
- 它将使用Notion API自动将编译好的内容块直接同步到指定的Notion页面。
- 它会在本地更新processed_history.json,将已获取的URL/PMID标记为已处理。
- 4. 处理无新内容情况:
- 如果脚本终端输出包含🎉 没有发现新内容,则表示回溯期内所有找到的项目均已处理并同步过。您可以尝试使用更大的--days参数运行。
安全与隐私说明
- https://eutils.ncbi.nlm.nih.gov:用于获取PubMed论文统计数据和摘要。
- https://api.notion.com:用于创建和填充每日报告。
- 各种RSS订阅源URL(例如Garmin、MySportScience、YouTube RSS)。
- - 检查的文件:打开并更新processed_history.json,并在工作目录本地创建.md报告文件。
- 此技能会发起网络请求以获取相关体育科学数据,但不会暴露任何用户个人身份信息。