db-stations-cli

Find and filter DB stations from the command line.

Usage no npm install needed!

<script type="module">
  import dbStationsCli from 'https://cdn.skypack.dev/db-stations-cli';
</script>

README

db-stations-cli

Find and filter Deutsche Bahn stations from the command line. The data is from db-stations.

asciicast

npm version ISC-licensed minimum Node.js version support me via GitHub Sponsors chat with me on Twitter

Installing

npm install -g db-stations-cli

Or use npx. ✨

Usage

Usage:
    db-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     <csv|ndjson|pretty>  Default is pretty.
    --columns    <value>,<value>,…    Default is id,coords,weight,name.

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

Examples:
    db-stations
    db-stations --name 'elfershausen trimberg'
    db-stations --id 8005229 --columns id,name,weight
    db-stations 'return s.weight > 2000'

Contributing

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