An open API service indexing awesome lists of open source software.

https://github.com/no2chem/soss-cli

CLI interface to the California Hydrogen Fuel Cell Station Operational Status System (SOSS)
https://github.com/no2chem/soss-cli

cli command-line fuel-cell hydrogen soss

Last synced: about 1 year ago
JSON representation

CLI interface to the California Hydrogen Fuel Cell Station Operational Status System (SOSS)

Awesome Lists containing this project

README

          

> Query California hydrogen station status from the CLI!

![Screenshot](screenshot.svg)

> (The tables will render correctly in your terminal if emojis are correctly configured).

# soss-cli
[![Build Status](https://travis-ci.org/no2chem/soss-cli.svg?branch=master)](https://travis-ci.org/no2chem/soss-cli)
* πŸ€” Query the [CAFCP](https://cafcp.org)'s
Station Operational Status System (SOSS) from the command line

* πŸ›°οΈ Use geolocation to locate nearest stations

* β›³ Query stations near point of interest

## Installation

You need npm or yarn installed. On macos, install [homebrew](https://brew.sh/) and run ```brew install npm```, on
Debian-flavored Linux, run ```sudo apt-get install npm```.

Then, install globally using npm or yarn:
```sh
# With npm
npm install -g soss-cli

# With yarn
yarn global add soss-cli
```

The ```soss``` command will now be available.

## Querying

Running without parameters will automatically print help.

```sh
soss nearest
```
Will output a list of stations nearby. If you are running macos, CoreLocation will be used to locate you, otherwise we
fallback to IP-based geolocation.

```
~ ❯❯❯ soss nearest ✘ 1
βœ” Getting current location
βœ” Getting station data
βœ” Getting Station Status
╔═════════════╀═══════════════╀═════╀═════╀═════════════╀════════════════════════════════╗
β•‘ πŸš— Distanceβ”‚ 🏒 Name β”‚ H35 β”‚ H70 β”‚ πŸ•’ Updated β”‚ πŸ’¬ Message β•‘
β•Ÿβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β•’
β•‘ 1.67 mi β”‚ West LA β”‚ ❌ β”‚ ❌ β”‚ 11:28:45 AM β”‚ The station is offline for mai β•‘
β•‘ β”‚ β”‚ β”‚ β”‚ β”‚ ntenance, and we expect to reo β•‘
β•‘ β”‚ β”‚ β”‚ β”‚ β”‚ pen around Thursday, 3/1. In t β•‘
β•‘ β”‚ β”‚ β”‚ β”‚ β”‚ he interim, customers can use β•‘
β•‘ β”‚ β”‚ β”‚ β”‚ β”‚ Santa Monica or other nearby s β•‘
β•‘ β”‚ β”‚ β”‚ β”‚ β”‚ tations. Please check back for β•‘
β•‘ β”‚ β”‚ β”‚ β”‚ β”‚ updates. We apologize for any β•‘
β•‘ β”‚ β”‚ β”‚ β”‚ β”‚ inconvenience. β•‘
β•Ÿβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β•’
β•‘ 3.54 mi β”‚ Santa Monica β”‚ βœ… β”‚ βœ… β”‚ 11:33:44 AM β”‚ β•‘
β•Ÿβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β•’
β•‘ 4.64 mi β”‚ Fairfax-LA β”‚ βœ… β”‚ βœ… β”‚ 11:33:44 AM β”‚ The Fairfax station will be of β•‘
β•‘ β”‚ β”‚ β”‚ β”‚ β”‚ fline for maintenance activiti β•‘
β•‘ β”‚ β”‚ β”‚ β”‚ β”‚ es all day on 3/6 through 3/7, β•‘
β•‘ β”‚ β”‚ β”‚ β”‚ β”‚ We will advise as soon as the β•‘
β•‘ β”‚ β”‚ β”‚ β”‚ β”‚ station returns to operation. β•‘
β•‘ β”‚ β”‚ β”‚ β”‚ β”‚ We apologize for any inconveni β•‘
β•‘ β”‚ β”‚ β”‚ β”‚ β”‚ ence this may cause. β•‘
β•Ÿβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β•’
β•‘ 7.42 mi β”‚ Playa Del Rey β”‚ βœ… β”‚ βœ… β”‚ 11:31:57 AM β”‚ β•‘
β•Ÿβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β•’
β•‘ 7.50 mi β”‚ Hollywood β”‚ βœ… β”‚ βœ… β”‚ 11:21:55 AM β”‚ β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•§β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•§β•β•β•β•β•β•§β•β•β•β•β•β•§β•β•β•β•β•β•β•β•β•β•β•β•β•β•§β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•
```

You can also ask for stations near a particular POI. We use [openstreetmap](https://www.openstreetmap.org/) to
resolve addresses:

```
~ ❯❯❯ soss nearest disneyland
βœ” Getting station data
βœ” Getting Station Status
╔═════════════╀═══════════════╀═════╀═════╀═════════════╀════════════════════════════════╗
β•‘ πŸš— Distance β”‚ 🏒 Name β”‚ H35 β”‚ H70 β”‚ πŸ•’ Updated β”‚ πŸ’¬ Message β•‘
β•Ÿβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β•’
β•‘ 5.62 mi β”‚ Anaheim β”‚ ❌ β”‚ βœ… β”‚ 10:57:15 AM β”‚ This station will reduce its e β•‘
β•‘ β”‚ β”‚ β”‚ β”‚ β”‚ nergy consumption (to reduce H β•‘
β•‘ β”‚ β”‚ β”‚ β”‚ β”‚ 2 costs!) between 12 midnight β•‘
β•‘ β”‚ β”‚ β”‚ β”‚ β”‚ to 5 AM daily. Safe, complet β•‘
β•‘ β”‚ β”‚ β”‚ β”‚ β”‚ e fills will still be achieved β•‘
β•‘ β”‚ β”‚ β”‚ β”‚ β”‚ during this period, they will β•‘
β•‘ β”‚ β”‚ β”‚ β”‚ β”‚ just require a few minutes lon β•‘
β•‘ β”‚ β”‚ β”‚ β”‚ β”‚ ger than routine. β•‘
β•Ÿβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β•’
β•‘ 10.72 mi β”‚ UC Irvine β”‚ βœ… β”‚ βœ… β”‚ 11:03:48 AM β”‚ β•‘
β•Ÿβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β•’
β•‘ 11.16 mi β”‚ Costa Mesa β”‚ βœ… β”‚ βœ… β”‚ 11:02:09 AM β”‚ β•‘
β•Ÿβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β•’
β•‘ 12.98 mi β”‚ Newport Beach β”‚ βœ… β”‚ βœ… β”‚ 11:09:00 AM β”‚ β•‘
β•Ÿβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β•’
β•‘ 14.16 mi β”‚ Diamond Bar β”‚ βœ… β”‚ ⚠️ β”‚ 11:03:47 AM β”‚ β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•§β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•§β•β•β•β•β•β•§β•β•β•β•β•β•§β•β•β•β•β•β•β•β•β•β•β•β•β•β•§β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•
```

To query an individual station, you can use the status command:
```
~ ❯❯❯ soss status hayward
βœ” Getting Station Status
βœ” Getting station data
╔═══════╀═════════╀═════╀═════╀═════════════╀════════════════════════════════╗
β•‘ πŸ†” IDβ”‚ 🏒 Nameβ”‚ H35 β”‚ H70 β”‚ πŸ•’ Updated β”‚ πŸ’¬ Message β•‘
β•Ÿβ”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β•’
β•‘ 15023 β”‚ Hayward β”‚ βœ… β”‚ βœ… β”‚ 11:02:13 AM β”‚ β•‘
β•šβ•β•β•β•β•β•β•β•§β•β•β•β•β•β•β•β•β•β•§β•β•β•β•β•β•§β•β•β•β•β•β•§β•β•β•β•β•β•β•β•β•β•β•β•β•β•§β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•
```

Providing no argument will print all stations in the system.

#

This project is not affiliated in any way with the California Hydrogen Fuel Cell Partnership.