Giter Site home page Giter Site logo

derhuerst / vbb-stations-cli Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 0.0 36 KB

Find and filter VBB stations from the command line.

Home Page: https://github.com/derhuerst/vbb-stations-cli

License: ISC License

JavaScript 100.00%
vbb bvg berlin transport cli transit

vbb-stations-cli's Introduction

vbb-stations-cli

Find and filter VBB stations from the command line. Computed from open GTFS data.

asciicast

npm version build status ISC-licensed gitter channel support me on Patreon

Installing

npm install -g vbb-stations-cli

Usage

Usage:
    vbb-stations [options] [filters]

Options:
    --id        <value>             Filter by id.
    --name      <value>             Filter by name.
    --latitude  <value>             Filter by latitude.
    --longitude <value>             Filter by longitude.
    --weight    <value>             Filter by weight.
    --format    <value>             One of csv,ndjson,pretty,json. Default: pretty
    --columns   <value>,<value>,…   Default is id,coords,weight,name,lines.

Filters:
    Each filter must be an `Array.prototype.filter`-compatible funtion.

Examples:
    vbb-stations
    vbb-stations --name "berliner strasse"
    vbb-stations --id 9003104 --columns id,name,lines
    vbb-stations "(s) => s.latitude > 52" "(s) => s.latitude > 12"

Contributing

If you have a question, found a bug or want to propose a feature, have a look at the issues page.

vbb-stations-cli's People

Contributors

derhuerst avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

vbb-stations-cli's Issues

v0.5.0: output lines in csv?

I just installed v0.5.0 and noticed that you've added the operating lines to the pretty output. Great!

Any plans to add these to the csv-format output as well? (Would like to include the operating lines in my VBBar script; otherwise it's ready for upload.)

v0.4.0: installation fails

Tried updating from v0.3.1 to v0.4.0, which didn't work; instead uninstalled & tried to reinstall. Didn't work either:

 ❯ npm install -g vbb-stations-cli                                                                                               [11:18:14]
npm ERR! Darwin 15.4.0
npm ERR! argv "/usr/local/Cellar/node/6.1.0/bin/node" "/usr/local/bin/npm" "install" "-g" "vbb-stations-cli"
npm ERR! node v6.1.0
npm ERR! npm  v3.8.6
npm ERR! path /usr/local/lib/node_modules/vbb-stations-cli/bin.js
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod

npm ERR! enoent ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/vbb-stations-cli/bin.js'
npm ERR! enoent ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/vbb-stations-cli/bin.js'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! Please include the following file with any support request:
npm ERR!     ~/npm-debug.log

Note: npm didn't save any npm-debug.log file.

Get stations closest to current location

Trying to use my location data to get a list of the closest stations, currently like this, but it doesn't work:

LOCATION_DATA=$(/usr/local/bin/LocateMe -l)
LAT=$(echo "$LOCATION_DATA" | /usr/bin/awk '/Latitude: / {print $2}')
LONG=$(echo "$LOCATION_DATA" | /usr/bin/awk '/Longitude: / {print $2}')
/usr/local/bin/vbb-stations --latitude "$LAT" --longitude "$LONG" --format csv | /usr/bin/awk -F"," '{print $2}'

Any hints? ty.

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.