Giter VIP home page Giter VIP logo

db-prices-cli's Introduction

db-prices-cli

Check prices for a DB route.

asciicast

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

Installing

npm install -g db-prices-cli

Usage

Usage: db-prices [from] [to] [options]

Arguments:
    from            Station number (e.g. 8011160).
    to              Station number (e.g. 8000261).

Options:
    --days      -d  The number of days to show. Default: 7

Contributing

If you have a question or need support using db-prices-cli, please double-check your code and setup first. If you think you have found a bug or want to propose a feature, use the issues page.

db-prices-cli's People

Contributors

derhuerst avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

0bmxa

db-prices-cli's Issues

Invalid JSON response. Bahn API change?

/usr/bin/node /path/prices.js
✔ From where? › Hamburg-Altona – score: 14.324 relevance: 1.824 stationcode: 8002553
✔ To where? › Berlin Hauptbahnhof – score: 14.284 relevance: 1.730 stationcode: 8011160
FetchError: invalid json response body at https://reiseauskunft.bahn.de/bin/query.exe/dn?tbpMode=1&date=%2B1&getstop=1 reason: Unexpected token '<', "<!DOCTYPE "... is not valid JSON
    at /path/node_modules/node-fetch/lib/index.js:273:32
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async /path/prices.js:62:25
    at async Promise.all (index 1)
    at async /path/prices.js:61:23 {
  type: 'invalid-json'
}

Is it still recommended to use this tool? I use it to regularly fetch prices for connections.

Thanks for this tool. This already helped me to gather very nice data with fahrpreisplotter <3

use hafas-cli

Specifically, db-prices@3 and db-stations@2.

hafas-cli reduces the amount of duplicated code between tools like db-prices-cli and vbb-cli. I'm not sure if it's fully compatible with db-prices, as it expects the hafas-client@3 interface. Do you know @juliuste?

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.