entur-travel

TotalClaw 作者 totalclaw

使用 Entur API 规划挪威的公共交通行程。涵盖所有运营商(Vy、Ruter、Kolumbus 等)、所有模式(巴士、铁路、有轨电车、地铁、轮渡、长途汽车)。在以下情况下使用:(1) 规划挪威各地之间的旅程,(2) 检查出发板/下次出发,(3) 查找停靠点 ID 或地名,(4) 查找实时交通信息。触发有关挪威火车、公共汽车、渡轮、有轨电车、前往机场(加勒穆恩、托普、弗莱斯兰)或如何前往 X 的问题。

安装 / 下载方式

TotalClaw CLI推荐
totalclaw install totalclaw:totalclaw~mmichelli-entur-travel
cURL直接下载,无需登录
curl -fsSL https://skills.taituai.com/api/skills/totalclaw%3Atotalclaw~mmichelli-entur-travel/file -o mmichelli-entur-travel.md
## 概述(中文)

使用 Entur API 规划挪威的公共交通行程。涵盖所有运营商(Vy、Ruter、Kolumbus 等)、所有模式(巴士、铁路、有轨电车、地铁、轮渡、长途汽车)。在以下情况下使用:(1) 规划挪威各地之间的旅程,(2) 检查出发板/下次出发,(3) 查找停靠点 ID 或地名,(4) 查找实时交通信息。触发有关挪威火车、公共汽车、渡轮、有轨电车、前往机场(加勒穆恩、托普、弗莱斯兰)或如何前往 X 的问题。

## 原文

# Entur Travel

Plan public transit journeys across Norway via the Entur Journey Planner API. Covers every operator and mode — bus, rail, tram, metro, ferry, coach, air — with real-time data.

**No API key required.** Free, open API under NLOD licence.

## Script

`scripts/entur.py` — standalone Python 3 CLI, no dependencies beyond stdlib.

### Commands

```bash
# Search for stops/places
python3 scripts/entur.py search "Oslo S"

# Plan a trip (place names auto-resolve via geocoder)
python3 scripts/entur.py trip "Porsgrunn" "Oslo lufthavn"

# Plan with specific departure time
python3 scripts/entur.py trip "Bergen" "Stavanger" --time "2025-03-01T08:00:00"

# Arrive by a specific time
python3 scripts/entur.py trip "Drammen" "Oslo S" --time "2025-03-01T09:00:00" --arrive

# Filter by mode
python3 scripts/entur.py trip "Tromsø" "Harstad" --modes water

# Departure board for a stop
python3 scripts/entur.py departures "NSR:StopPlace:58966" --limit 5

# Stop details (quays, platforms)
python3 scripts/entur.py stop "NSR:StopPlace:58966"
```

All output is JSON.

### Modes

Valid transport modes for `--modes`: `bus`, `rail`, `tram`, `metro`, `water`, `air`, `coach`

### Common Stop IDs

Use `search` to find IDs. Some common ones:
- Oslo S: `NSR:StopPlace:59872`
- Oslo lufthavn (Gardermoen): `NSR:StopPlace:269`
- Bergen stasjon: `NSR:StopPlace:585`
- Trondheim S: `NSR:StopPlace:41742`

## Presenting Results

When presenting trip results to users:
- Show times in local format (HH:MM), not ISO
- Summarize legs concisely: "🚆 RE11 Porsgrunn → Torp (10:17–10:50, platform 1)"
- Flag real-time delays: if aimed ≠ expected, mention the delay
- For departure boards, use a compact list format
- Include walk distances when significant (>200m)

## Limitations

- Norway only (Entur covers all Norwegian public transport)
- No ticket purchasing — planning and real-time info only
- Geocoder works best with Norwegian place names
- For international trips, only the Norwegian leg is covered