Giter Site home page Giter Site logo

velibe's Introduction

VeLibe

Wrapper for Velib api, for no-fuss cycling.

Gem Version Build Status Coverage Status Code Climate Dependency Status

CLI tool included to help you see if there is bikes around.

So far velibe only support query of station. Handling of favorites, query by address, and some stat collection is planed and might be implemented soon.

Installation

Just install the gem, and you'll have access to this wonderful tool :D

$ gem install velibe

The cli relies on the JcDecaux API. You need an api token to be able to use it. You can see the official site to get one [there] (https://developer.jcdecaux.com/#/opendata/vls?page=dynamic). You'll need to create an account, and an acces token will be then granted

This token is to be stored in the VELIBE_TOKEN variable environment, or in the yaml config file under the token key.

Usage

Basic usage of the commandline is to query the API to see the status of some specific station:

 $ velibe 10042 18012 13020
   Velibe >> Stations 10042, 18012, 13020:
           > Station 10042 - poissonnière - enghien:  15 Velo(s) libre(s) pour 17 places libres
           > Station 18012 - doudeauville stephenson:  1 Velo(s) libre(s) pour 33 places libres
           > Station 13020 - mendes france:  25 Velo(s) libre(s) pour 17 places libres

Velibe handle storing of favorites stations, those would be the one that will be querried when no argument is provided.

You can control favorites with the favorite subcommand (which can be shorten to fav or f. This accept different subcommands:

  • a/add <sta1> <sta2> : add stations to favorites
  • reset/setup [--force|-f] : setup the config version, or reset it. you will need to add the force flag to erase existing config
  • if none is provided, just output current favorites.

Configuration is stored in ~/.velib.yaml which you can also edit by hand and eventually version in you dotfiles repo.

$ cat ~/.velib.yaml
---
favorites: [10035, 19003, 19004, 10031]
token: <this-is-your-token-string>

velibe's People

Contributors

adrieankhisbe avatar

Stargazers

IndianaJohan avatar  avatar

Watchers

James Cloos avatar  avatar

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.