Skip to content

This is BicikeLJ client implemented in Bash.

License

Notifications You must be signed in to change notification settings

otobrglez/bicikelj-sh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bicikelj.sh

This is BicikeLJ client implemented in Bash.

Usage:

./bicikelj.sh
./bicikelj.sh "Dunajska 5, 1000 Ljubljana"

The output will show 3 nearest stations that have bikes available. I.e.

[
  {
    "name": "PREŠERNOV TRG-PETKOVŠKOVO NABREŽJE",
    "free": 13,
    "latitude": 46.051380037071965,
    "longitude": 14.506524332086412,
    "distance": 42.969
  },
  {
    "name": "POGAČARJEV TRG-TRŽNICA",
    "free": 13,
    "latitude": 46.05110603801571,
    "longitude": 14.507168331524257,
    "distance": 99.135
  },
  {
    "name": "KONGRESNI TRG-ŠUBIČEVA ULICA",
    "free": 14,
    "latitude": 46.05040103728995,
    "longitude": 14.504605334359988,
    "distance": 155.301
  }
]

Capabilities

  • Gets the nearest BicikeLJ bicycle stations that has free bicycles. Location is extracted from your IP address.
  • Gets the nearest stations for particular location - expressed in text.

Web Services and APIs

Dependencies

This script depends on the following tools: jq, curl and standard toolset with bc, echo, cat and sed.

Development

ls *.sh | entr ./bicikelj.sh "Ljubljana Dunajska 5"

Author

About

This is BicikeLJ client implemented in Bash.

Topics

Resources

License

Stars

Watchers

Forks

Packages