Gbsample
A sample Sinatra app that uses the Green Button gem to parse a Green Button data file and graph it using High Charts.
Install / Use
/learn @cew821/GbsampleREADME
Readme
This is a sample application that uses the Green Button gem to parse data collected from a server that responds to GET requests for Green Button usage points.
It is built using Sinatra and HighCharts, and is merely meant to provide a simple example of the Green Button parser library at work.
Running Locally
You will need Ruby installed.
To run locally, clone the repository, cd into the repo, and run $ bundle install. Then, $ ruby gbsample.rb to start a server. Visit http://localhost:4567/greenbutton to initiate a request to the sample Green Button data endpoint (in this case https://services.greenbuttondata.org/DataCustodian/espi/1_1/resource/Batch/RetailCustomer/1/UsagePoint). Once the file has been loaded from the server, it will be parsed and displayed on the chart.
The action happens in gbsample.rb.
In Production
The app, such as it is, is deployed on Heroku. You can test it by visiting http://gbsample.herokuapp.com/greenbutton.
This software is Open Source. See license.txt for more details.
Related Skills
node-connect
352.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
111.3kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
352.5kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
352.5kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
