Using the existing command line gopdx
node module as an easy proof of concept. I already had the module installed globally (npm install -g gopdx
) and had a json of my favorite stops by id (as it requires). But in about 3 minutes I was able to turn it into a quick and dirty menubar app. ❇️
Last active
August 29, 2015 14:17
-
-
Save jlord/04a9fa443cfb81ced0f0 to your computer and use it in GitHub Desktop.
Atom Shell menubar app with @maxogden's menubar module
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var menubar = require('menubar') | |
var exec = require('child_process').exec | |
var fs = require('fs') | |
var mb = menubar() | |
mb.on('ready', function ready () { | |
console.log('Ready!') | |
fetchTimes() | |
}) | |
mb.on('show', function show () { | |
fetchTimes() | |
}) | |
function fetchTimes () { | |
exec('gopdx -f', function (err, stdout, stderr) { | |
if (err) return console.log('ERR OH NOE') | |
fs.writeFileSync('index.html', '<pre>' + stdout + '</pre>') | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment