Code Monkey home page Code Monkey logo

bustimebot's Introduction

Bus Time Bot (@bus_time_bot)

Codacy Badge

Bus Time Bot is a telegram bot that tells you bus timings of the nearest bus stops based on the location (GPS coordinates) you send to it.

Currently supports bus timings for NUS, NTU, SBS Transit and SMRT Buses.

Try it out at https://t.me/bus_time_bot

Getting Started

  1. Clone the project
  2. Create a file key.properties in the project's root folder and go to the links below to get a token
  3. Fill the contents of key.properties like this:
lta=<<insert lta token here>>
telegram=<<insert telegram token here>>
#either 'true' or 'false' (defaults to false)
use_database=false
  1. Run!

Running the tests

Automated JUnit 4 testing development in progress

Functions to check

  • Sending a location (Public)
  • Sending a location (NUS)
  • Sending a location (NTU)
  • Searching by popular location (amk hub)
  • Searching by postal code (118426)
  • Searching by address (Blk 1 Hougang Ave 1)
  • Searching by bus stop number (63151)
  • Look up bus info for Public Transit (1 way, 112)
  • Look up bus info for Public Transit (2 way, 854)
  • Look up bus info for NUS (A1)
  • Look up bus info for NTU (CWR)

Commands:

  • start/help - See what you can do with this bot
  • search - Search by popular locations, postal codes, address, bus stop number
  • bus - Look up bus information

Deployment

  • Ensure that key.properties file is in the same directory as the BusTimeBot.jar file
  • Run the jar file using command: java -jar BusTimeBot.jar

Built With

  • Java Telegram Bot API - The telegram bot framework
  • GSON - Parsing of json data retrieved from the bus timing services
  • Emoji Java - Used to generate the emoji unicode for the text
  • Jsoup - Used for parsing public bus information from the SBSTransit website
  • LTA Datamall, SBSTransit and NUS/NTU Bus Services for arrival time information

Contributing

Feel free to pull the project, I will merge the project if the feature is a good one

Disclaimer

Bus Time Bot does indeed log your personal information. I use this data to see what improvements can be made to improve the user experience of this bot. Rest assured that I will not sell this data for any profit or monetary gain to a 3rd party.

Bus timing from various organizations are retrieved from their respective servers. I am not responsible for the inaccuracy of the timings stated by the bot.

Authors

License

No License at the moment

Acknowledgments

  • Telegram for allowing me to develop bots for their platform
  • My friends who gave me inspiration for this bot
  • Authors of the libraries that I have used for making this bot possible
  • Hostgagements for promoting this application to their clients!

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.