返回顶部
l

linz-public-transport林茨公交查询

Query Linz Linien raw EFA endpoints for stop lookup and live departures. Use when tasks involve Linz public transport stop search, resolving stop IDs from stop names, or fetching upcoming departures from a stop.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.1
安全检测
已通过
682
下载量
免费
免费
2
收藏
概述
安装方式
版本历史

linz-public-transport

林茨公共交通

使用此技能与林茨林茨线路EFA端点进行交互:

  • - GET /efa/XMLSTOPFINDERREQUEST
  • GET /efa/XMLDMREQUEST

在实现前,请阅读{baseDir}/references/endpoints.md中的端点详情。
使用{baseDir}/scripts/linz_transport.py作为默认执行路径。

工作流程

  1. 1. 解析API基础URL。
  2. 运行与任务匹配的脚本子命令。
  3. 返回简洁、面向用户的摘要。

主要工具

  • - 脚本路径:{baseDir}/scripts/linz_transport.py
  • 运行环境:Python 3,仅使用标准库。
  • 基础URL输入:
- --base-url 参数,或 - LINZTRANSPORTAPIBASEURL环境变量,或 - 默认值http://www.linzag.at/linz2

推荐命令:

  • - 搜索站点:

- python {baseDir}/scripts/linz_transport.py stops taubenmarkt
  • - 按站点ID获取发车信息:

- python {baseDir}/scripts/linz_transport.py departures --stop-id 60501160 --limit 10
  • - 一步完成站点解析和发车信息获取:

- python {baseDir}/scripts/linz_transport.py next taubenmarkt --limit 10 --pick-first

第一步:解析基础URL

  • - 优先使用用户提供的基础URL。
  • 否则使用LINZTRANSPORTAPIBASEURL(如果可用)。
  • 如果两者都不存在,则使用http://www.linzag.at/linz2。

第二步:呈现输出

  • - 如有需要,按countdownInMinutes升序排序。
  • 除非用户要求更多,否则显示接下来5-10班发车信息。
  • 同时包含相对时间(countdownInMinutes)和绝对时间(time)。
  • 返回JSON时保持字段名称稳定。

错误处理

  • - 如果站点搜索返回空列表,建议附近拼写并使用更短的查询词重试。
  • 如果返回多个匹配站点,使用明确的--stop-id重新运行,或仅在歧义可接受时使用next ... --pick-first。
  • 如果发车响应为空,说明当前没有即将发车的班次。
  • 如果HTTP请求失败,报告状态码、端点和重试指导。
  • 如果EFA响应包含message代码,在诊断中包含该代码。

最小示例

bash
python {baseDir}/scripts/linz_transport.py stops taubenmarkt
python {baseDir}/scripts/linz_transport.py departures --stop-id 60501160 --limit 10
python {baseDir}/scripts/linz_transport.py next taubenmarkt --limit 10 --pick-first

powershell
python {baseDir}/scripts/linz_transport.py stops taubenmarkt
python {baseDir}/scripts/linz_transport.py departures --stop-id 60501160 --limit 10
python {baseDir}/scripts/linz_transport.py next taubenmarkt --limit 10 --pick-first

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 linz-public-transport-1776420065 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 linz-public-transport-1776420065 技能

通过命令行安装

skillhub install linz-public-transport-1776420065

下载

⬇ 下载 linz-public-transport v1.0.1(免费)

文件大小: 6.72 KB | 发布时间: 2026-4-17 19:23

v1.0.1 最新 2026-4-17 19:23
- Added a detailed SKILL.md with usage, workflow, preferred commands, and error handling for Linz public transport EFA endpoint queries.
- Clarified step-by-step workflow for resolving the base API URL and output presentation.
- Provided minimal command-line usage examples for stop search and live departure queries.
- Outlined error handling strategies and response formatting expectations.
- Noted environment variable and argument options for customizing the base URL.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部