npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

hubot-nextbus

v2.2.2

Published

Shows when the next transit vehicle will arrive at a particular stop.

Downloads

39

Readme

Hubot Nextbus

npm version Node CI

This Hubot package works with gtfs-rails-api. You provide an endpoint along with a latitude and longitude for it to obtain the next expected bus to a particular set of nearby stops.

Installation

In your hubot repository, run:

npm install hubot-nextbus --save

Then add hubot-nextbus to your external-scripts.json:

["hubot-nextbus"]

Configuration

| Environment Variable | Optional | Description | | ----------------------- | :------: | ----------------------------------------| | HUBOT_NEXTBUS_LAT_LON | No | Default location for hubot nextbus, separated by a comma. (e.g. 36.1629191,-86.7813481)| | HUBOT_NEXTBUS_STOP_ID | Yes | Specific identifier to use with hubot nextbus; if not set, falls back to latitude/longitude | | HUBOT_NEXTBUS_BASE_URL| Yes | URL of a gtfs-rails-api instance; Defaults to Nashville, TN. |

Usage

hubot nextbus

Returns the next bus for the nearest stop.

user> hubot nextbus
hubot> Upcoming Trips for [CHA7AWN] CHARLOTTE AVE & 7TH AVE N WB
  7:01 AM   #50 - CHARLOTTE WALMART            in a minute    
  7:15 AM   #17 - GREEN HILLS VIA 12TH AVE S   in 16 minutes  
  7:16 AM   #50 - CHARLOTTE WALMART            in 16 minutes  
  7:31 AM   #50 - CHARLOTTE WALMART            in 31 minutes  
  7:35 AM   #17 - GREEN HILLS VIA 12TH AVE S   in 36 minutes  

hubot nextbus stops

Get the list of stops nearby your configured latitude and longitude.

user> hubot nextbus stops
hubot> List of nearby stops:
hubot> - [CHA7AWN] CHARLOTTE AVE & 7TH AVE N WB
- [CHA7AEN] CHARLOTTE AVE & 7TH AVE N EB
- [6AVDEASN] 6TH AVE & DEADERICK ST SB
- [6AVDEANN] 6TH AVE N & DEADERICK ST NB
- [UNI7AWN] UNION ST & 7TH AVE N WB

hubot nextbus stop <stop id>

Returns the next bus for a given stop ID.

user> hubot nextbus stop PORGRENN
hubot> Upcoming Trips for [PORGRENN] PORTER RD & GREENWOOD AVE NB
  10:34 PM   #4 - INGLEWOOD   in 25 minutes  
  11:34 PM   #4 - INGLEWOOD   in an hour     
  12:32 AM   #4 - INGLEWOOD   in 2 hours