Giter Club home page Giter Club logo

vbb-cli's Introduction

vbb-cli

A command line client for Berlin & Brandenburg public transport (VBB). Built on top of vbb-hafas.

asciicast

npm version build status ISC-licensed support me via GitHub Sponsors chat with me on Twitter

Installing

npm install -g vbb-cli

Or just run it using npx.

Usage

vbb-dep [station] [options]

Arguments:
    station         Station number (like 900000023201) or search string (like "Zoo").

Options:
    --location  -l  Use current location. macOS only.
    --duration  -d  Show departures for the next n minutes. Default: 15
    --when      -w  A date & time string like "tomorrow 2 pm". Default: now
    --products  -p  Allowed transportation types.
                    Default: suburban,subway,tram,bus,ferry,express,regional
    --show-ids      Show station & journey leg IDs. Default: false
vbb-journey [origin] [destination] [options]

Arguments:
    origin          Station number (e.g. 900000023201) or query (e.g. "Zoo").
    destination     Station number (e.g. 900000023201) or query (e.g. "Zoo").

Options:
    --results   -r  The number of journeys to show. Default: 4
    --products  -p  Allowed transportation types. Default: "all"
                    "all" = "suburban,subway,tram,bus,ferry,express,regional"
    --when      -w  A date & time string like "tomorrow 2 pm". Default: now
    --show-ids      Show station & journey leg IDs. Default: false

Contributing

If you have a question or have difficulties using vbb-cli, please double-check your code and setup first. If you think you have found a bug or want to propose a feature, refer to the issues page.

vbb-cli's People

Contributors

derhuerst avatar eyalzek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

vbb-cli's Issues

Neither `from` nor `fromLatitude` & `fromLongitude` passed.

vbb route -r 10 -p all
? Where are you? Friedhof In den Kisseln (Berlin)
? Where do you want to go? Werder (Havel), Kesselgrundstr.
✔ When do you want to travel? Wed 16 Sep 2015 02:00
Neither `from` nor `fromLatitude` & `fromLongitude` passed. Error: Neither `from` nor `fromLatitude` & `fromLongitude` passed.

vbb-dep problem

First of all: awesome programm. Thanks for making it. The vbb-route command works very well for me, but whenever I try the vbb-dep command, I get this error:

module.js:491
    throw err;
    ^

Error: Cannot find module 'location'
    at Function.Module._resolveFilename (module.js:489:15)
    at Function.Module._load (module.js:439:25)
    at Module.require (module.js:517:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/vbb-cli/dep.js:8:19)
    at Module._compile (module.js:573:30)
    at Object.Module._extensions..js (module.js:584:10)
    at Module.load (module.js:507:32)
    at tryModuleLoad (module.js:470:12)
    at Function.Module._load (module.js:462:3)

lines is not defined

Hey,
Sometimes vbb-journey exits after selecting the journey, giving me the following error:
lines is not defined
error

Problem installing via npm

I just installed vbb-cli locally via npm and when I try to run it:

./.bin/vbb-dep

I get this:

~/node_modules/vbb-cli/lib/product-symbol.js:6
for (let p of hafas.profile.products) products[p.id] = p


TypeError: Cannot read property 'products' of undefined
at Object.<anonymous> (/home/z/node_modules/vbb-cli/lib/product-symbol.js:6:29)
at Module._compile (internal/modules/cjs/loader.js:688:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
at Module.load (internal/modules/cjs/loader.js:598:32)
at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
at Function.Module._load (internal/modules/cjs/loader.js:529:3)
at Module.require (internal/modules/cjs/loader.js:636:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Object.<anonymous> (/home/z/node_modules/vbb-cli/dep.js:11:23)
at Module._compile (internal/modules/cjs/loader.js:688:30)

Geo location not working

When calling vbb-dep with option -l i get the following error:
vbb-dep -l (node:61008) [DEP0128] DeprecationWarning: Invalid 'main' field in '/usr/local/lib/node_modules/vbb-cli/node_modules/vbb-util/package.json' of './src/index'. Please either fix that or report it to the module author (Use node --trace-deprecation ... to show where the warning was created) Geocoding service returned unexpected status code: 404

"Bad Gateway"

Since today I have a problem when using vbb-dep or vbb-route. The selection of stations works, but instead of the result I just get "Bad Gateway".

products filter not working

Greetings, first of all, great tool.
I was trying it out, and it seems like the products filter is not working for me.
As an example, this was the output for
vbb-dep Oranienburger Str --products="tram"
screenshot 2017-09-29 16 17 54
Looks like the SBahn is also coming out. I was not expecting that. Am I doing something wrong?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.