xctf-data
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseXC/TF Data (TFRRS — NCAA Cross Country & Track and Field)
XC/TF 数据工具(TFRRS — NCAA越野跑与田径项目)
Before writing queries, consult for parameters, URL conventions, and return shapes.
references/api-reference.md在编写查询前,请查阅了解参数、URL规则及返回数据格式。
references/api-reference.mdSetup
安装配置
Before first use, check if the CLI is available:
bash
which sports-skills || pip install sports-skillsIf fails, install from GitHub:
pip installbash
pip install git+https://github.com/machina-sports/sports-skills.gitRequires Python 3.10+. No API keys required. All data comes from TFRRS public pages and The Stride Report RSS feed.
首次使用前,检查CLI是否可用:
bash
which sports-skills || pip install sports-skills如果失败,从GitHub安装:
pip installbash
pip install git+https://github.com/machina-sports/sports-skills.git要求Python 3.10及以上版本。无需API密钥,所有数据均来自TFRRS公开页面和The Stride Report的RSS订阅源。
Quick Start
快速开始
CLI (preferred):
bash
sports-skills xctf get_athlete_profile --athlete_id=8579610 --school=California_Baptist --name=Lamiae_Mamouni
sports-skills xctf get_news --limit=5Python SDK:
python
from sports_skills import xctf
profile = xctf.get_athlete_profile(
athlete_id="8579610",
school="California_Baptist",
name="Lamiae_Mamouni",
)CLI(推荐方式):
bash
sports-skills xctf get_athlete_profile --athlete_id=8579610 --school=California_Baptist --name=Lamiae_Mamouni
sports-skills xctf get_news --limit=5Python SDK:
python
from sports_skills import xctf
profile = xctf.get_athlete_profile(
athlete_id="8579610",
school="California_Baptist",
name="Lamiae_Mamouni",
)CRITICAL: Before Any Query
重要提示:查询前须知
All three parameters are required and must match the athlete's TFRRS URL exactly:
https://www.tfrrs.org/athletes/{athlete_id}/{school}/{name}.html- — numeric ID (e.g.
athlete_id)8579610 - — school slug with underscores, not spaces (e.g.
school)California_Baptist - — athlete name slug (e.g.
name)Lamiae_Mamouni
Do NOT guess slugs. Find them by navigating to the athlete on tfrrs.org and copying the URL.
以下三个参数为必填项,且必须与运动员的TFRRS URL完全匹配:
https://www.tfrrs.org/athletes/{athlete_id}/{school}/{name}.html- — 数字ID(例如
athlete_id)8579610 - — 院校别名,使用下划线代替空格(例如
school)California_Baptist - — 运动员姓名别名(例如
name)Lamiae_Mamouni
请勿猜测别名,需访问tfrrs.org找到运动员页面后复制URL中的对应内容。
Commands
命令列表
| Command | Description |
|---|---|
| Search the current team roster by name; returns |
| Athlete name, school, eligibility, all PRs, and full season-by-season meet results |
| Full XC and/or TF roster for a team |
| All event results and team scores from a TFRRS meet |
| Recent XC/TF articles from The Stride Report (thestridereport.com) |
See for full parameter details and return shapes.
references/api-reference.md| 命令 | 描述 |
|---|---|
| 按姓名搜索当前队伍名单;返回 |
| 获取运动员姓名、院校、参赛资格、所有个人最佳成绩(PRs)以及完整的赛季赛事成绩历史 |
| 获取队伍的完整XC和/或TF名单 |
| 获取TFRRS赛事的所有项目成绩和队伍得分 |
| 获取The Stride Report(thestridereport.com)发布的最新XC/TF相关文章 |
如需了解完整参数详情及返回数据格式,请查阅。
references/api-reference.mdExamples
使用示例
Example 1: Look up a current athlete's PRs
User says: "What are Lamiae Mamouni's PRs?"
Actions:
- Call Result:
search_athlete(name="Lamiae Mamouni", school="CA_college_f_California_Baptist")contains entries withdata.matches,athlete_id,schoolslugsname - Call Result:
get_athlete_profile(athlete_id="8579610", school="California_Baptist", name="Lamiae_Mamouni")contains all personal records by event (e.g.data.prs){"1500": "4:31.80", "5K (XC)": "18:25.5", ...}
Example 2: Get a runner's cross country season
User says: "Show me Lamiae Mamouni's 2025 XC season results"
Actions:
- Call
search_athlete(name="Lamiae Mamouni", school="CA_college_f_California_Baptist") - Call with the matched athlete params
get_athlete_profile - Filter for entries whose
data.meetsfalls in the fall of 2025 (Sep–Nov 2025) Result: List of meets with dates, events, marks, and placesdate
Example 3: Graduated or transferred athlete
User says: "What are Katelyn Vuong's PRs from UC Davis?"
Actions:
- Call Result:
search_athlete(name="Katelyn Vuong", school="CA_college_f_UC_Davis")is empty — athlete has graduateddata.matches - Tell the user: "Katelyn Vuong is not on UC Davis's current roster. Please find her profile URL on tfrrs.org (e.g. search 'Katelyn Vuong UC Davis tfrrs') and share it."
- User provides:
https://www.tfrrs.org/athletes/7899206/UC_Davis/Katelyn_Vuong.html - Extract params from the URL and call Note: TFRRS creates separate profiles for XC and TF. If both exist, fetch both IDs for complete PRs.
get_athlete_profile(athlete_id="7899206", school="UC_Davis", name="Katelyn_Vuong")
Example 4: Get a team's current roster
User says: "Show me the UC Davis women's XC roster"
Actions:
- Call Result: List of athletes with name, year, and profile slugs
get_team_roster(school="CA_college_f_UC_Davis", sport="xc")
Example 5: Get results from a meet
User says: "Show me the results from the Stanford Invitational"
Actions:
- Find the meet on tfrrs.org and copy the meet_id and slug from the URL (e.g. tfrrs.org/results/95890/Stanford_Invitational)
- Call Result: All event results and team scores from the meet
get_meet_results(meet_id="95890", slug="Stanford_Invitational")
Example 6: Get the latest XC/TF news
User says: "What's the latest college track news?"
Actions:
- Call Result: Recent articles from The Stride Report with title, date, summary, and link
get_news(limit=10)
示例1:查询现役运动员的个人最佳成绩
用户提问:“Lamiae Mamouni的个人最佳成绩有哪些?”
操作步骤:
- 调用返回结果:
search_athlete(name="Lamiae Mamouni", school="CA_college_f_California_Baptist")包含带有data.matches、athlete_id、school别名的条目name - 调用返回结果:
get_athlete_profile(athlete_id="8579610", school="California_Baptist", name="Lamiae_Mamouni")包含各项目的个人最佳成绩(例如data.prs){"1500": "4:31.80", "5K (XC)": "18:25.5", ...}
示例2:获取运动员的越野跑赛季成绩
用户提问:“展示Lamiae Mamouni 2025年XC赛季的成绩”
操作步骤:
- 调用
search_athlete(name="Lamiae Mamouni", school="CA_college_f_California_Baptist") - 使用匹配到的运动员参数调用
get_athlete_profile - 从中筛选出日期在2025年秋季(2025年9-11月)的条目 返回结果:包含赛事日期、项目、成绩和排名的列表
data.meets
示例3:已毕业或转学运动员查询
用户提问:“Katelyn Vuong在UC Davis时期的个人最佳成绩有哪些?”
操作步骤:
- 调用返回结果:
search_athlete(name="Katelyn Vuong", school="CA_college_f_UC_Davis")为空——该运动员已毕业data.matches - 告知用户:“Katelyn Vuong不在UC Davis当前的队伍名单中。请在tfrrs.org上找到她的档案链接(例如搜索'Katelyn Vuong UC Davis tfrrs')并提供给我。”
- 用户提供链接:
https://www.tfrrs.org/athletes/7899206/UC_Davis/Katelyn_Vuong.html - 从URL中提取参数并调用注意:TFRRS会为XC和TF分别创建档案。如果两者都存在,请获取两个ID以获取完整的个人最佳成绩。
get_athlete_profile(athlete_id="7899206", school="UC_Davis", name="Katelyn_Vuong")
示例4:获取队伍当前名单
用户提问:“展示UC Davis女子XC队伍的名单”
操作步骤:
- 调用返回结果:包含运动员姓名、年级和档案别名的列表
get_team_roster(school="CA_college_f_UC_Davis", sport="xc")
示例5:获取赛事成绩
用户提问:“展示Stanford Invitational的赛事成绩”
操作步骤:
- 在tfrrs.org上找到该赛事,从URL中复制和别名(例如 tfrrs.org/results/95890/Stanford_Invitational)
meet_id - 调用返回结果:该赛事的所有项目成绩和队伍得分
get_meet_results(meet_id="95890", slug="Stanford_Invitational")
示例6:获取最新XC/TF新闻
用户提问:“最新的大学田径新闻有哪些?”
操作步骤:
- 调用返回结果:来自The Stride Report的近期文章列表,包含标题、日期、摘要和链接
get_news(limit=10)
Commands that DO NOT exist — never call these
不存在的命令——请勿调用
— does not exist. Useget_team_rankingsfor individual data.get_athlete_profile— does not exist. The correct command issearch_athletes(no trailing 's').search_athlete— does not exist. The correct command isfetch_news.get_news
If a command is not listed in the Commands table above, it does not exist.
— 不存在。如需个人数据,请使用get_team_rankings。get_athlete_profile— 不存在。正确命令为search_athletes(末尾无's')。search_athlete— 不存在。正确命令为fetch_news。get_news
如果命令未在上述命令列表中列出,则表示该命令不存在。
Error Handling
错误处理
When a command fails, do not surface raw errors to the user. Instead:
- For : confirm
get_athlete_profile,athlete_id, andschoolmatch the TFRRS URL exactly (case-sensitive)name - For : verify the team slug is correct by checking the team's TFRRS page URL
search_athlete - For : verify the
get_meet_resultsandmeet_idmatch the meet's TFRRS URL exactlyslug - For : verify the school slug is correct
get_team_roster - For : if the feed fails, inform the user that The Stride Report may be temporarily unavailable
get_news - Report failure with a clean message only after exhausting alternatives
当命令执行失败时,请勿向用户显示原始错误信息。应按以下步骤处理:
- 对于:确认
get_athlete_profile、athlete_id和school与TFRRS URL完全匹配(区分大小写)name - 对于:通过查看队伍的TFRRS页面URL验证队伍别名是否正确
search_athlete - 对于:确认
get_meet_results和别名与赛事的TFRRS URL完全匹配meet_id - 对于:验证院校别名是否正确
get_team_roster - 对于:如果订阅源加载失败,告知用户The Stride Report可能暂时无法访问
get_news - 仅在尝试所有解决方法后,向用户显示简洁的失败提示信息
Troubleshooting
故障排除
sports-skillspip install sports-skillsHTTP 404 on athlete profile
The or slug does not match the TFRRS URL exactly. Slugs are case-sensitive and use underscores. Copy directly from tfrrs.org.
schoolnameprssearch_athleteget_meet_resultsmeet_idslugget_newsConnection errors or timeouts
TFRRS may be temporarily unavailable. Requests are throttled to 1 per second automatically — wait a moment and retry.
sports-skillspip install sports-skills运动员档案返回HTTP 404错误
或别名与TFRRS URL不完全匹配。别名区分大小写且使用下划线,请直接从tfrrs.org复制。
schoolnameprssearch_athleteget_meet_resultsmeet_idget_news连接错误或超时
TFRRS可能暂时无法访问。请求会自动限制为每秒1次,请稍等片刻后重试。