跳转到主要内容

一个基于SBB/CFF/FFS命令行的时刻表客户端。

项目描述

Build status

目标:通过可读参数解析从命令行简单访问SBB/CFF/FFS时刻表服务。

依赖于opendata.ch的公共交通API: http://transport.opendata.ch/

Fahrplan支持Python 3.5及以上版本。

安装

要使用pip安装当前版本,请执行

$ sudo pip install fahrplan

要从此仓库安装,克隆它并使用

$ python setup.py fahrplan

用法

fahrplan --help:

usage: fahrplan [--full] [--info] [--debug] [--help] [--version]
                [--proxy PROXY]
                ...

A SBB/CFF/FFS commandline based timetable client.

positional arguments:
  request

optional arguments:
  --full, -f            Show full connection info, including changes
  --info, -i            Verbose output
  --debug, -d           Debug output
  --help, -h            Show this help
  --version, -v         Show version number
  --proxy PROXY, -p PROXY
                        Use proxy for network connections (host:port)

Arguments:
 You can use natural language arguments using the following
 keywords in your desired language:
 en -- from, to, via, departure, arrival
 de -- von, nach, via, ab, an
 fr -- de, à, via, départ, arrivée

 You can also use natural time and date specifications in your language, like
 - "now", "immediately", "at noon", "at midnight",
 - "tomorrow", "monday", "in 2 days", "22/11".

Examples:
 fahrplan from thun to burgdorf
 fahrplan via bern nach basel von zürich, helvetiaplatz ab 15:35
 fahrplan de lausanne à vevey arrivée minuit
 fahrplan from Bern to Zurich departure 13:00 monday
 fahrplan -p proxy.mydomain.ch:8080 de lausanne à vevey arrivée minuit
Screenshot

测试

测试使用tox和nosetests进行。

要在支持的Python版本上运行测试

$ ./test.sh

源代码

源代码可在Github上找到: https://github.com/dbrgn/fahrplan

许可证

代码许可为GPLv3。有关更多详细信息,请参阅LICENSE文件。

项目详情


下载文件

下载适合您平台的文件。如果您不确定选择哪个,请了解更多关于安装包的信息。

源代码发行版

fahrplan-1.1.2.tar.gz (21.3 kB 查看散列)

上传时间 源代码

构建发行版

fahrplan-1.1.2-py3-none-any.whl (23.2 kB 查看散列)

上传时间 Python 3

支持

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF 赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误记录 StatusPage StatusPage 状态页面