Last active
April 1, 2019 18:02
-
-
Save tkambler/5222d276f783def5ece8 to your computer and use it in GitHub Desktop.
Displaying Tabular Data in Today Scripts for Yosemite Notification Center
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
#!/usr/local/bin/node | |
var Table = require('cli-table'); | |
var table = new Table({ | |
chars: { 'top': '' , 'top-mid': '' , 'top-left': '' , 'top-right': '' | |
, 'bottom': '' , 'bottom-mid': '' , 'bottom-left': '' , 'bottom-right': '' | |
, 'left': '' , 'left-mid': '' , 'mid': '' , 'mid-mid': '' | |
, 'right': '' , 'right-mid': '' , 'middle': ' ' }, | |
style: { 'padding-left': 0, 'padding-right': 0 } | |
}); | |
table.push( | |
{ 'Some key': 'Some value' } | |
, { 'Another key': 'Another value' } | |
); | |
console.log(table.toString()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment