Created
March 11, 2014 05:07
-
-
Save hliyan/9479799 to your computer and use it in GitHub Desktop.
Magpie init
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
magpie = include.magpie; // use the library identifer instead of 'include' if it's different | |
include.$db.set(ScriptDb.getMyDb()); // Magpie will use the spreadsheet's database | |
// this will create the Magpie menubar items | |
function onOpen() { | |
magpie.onOpen(); | |
}; | |
// this will run when you select Magpie > Update | |
// and once every hour | |
// replace the token with your own Github token | |
function update() { | |
magpie.update('43e200f4c7ec1a974182912a4cb7e3dc9ba95876'); // NOTE: replace! | |
} | |
// this will run when you select Magpie > Chart | |
function chart() { | |
magpie.viewChartPanel(); | |
} | |
// don't use Magpie > Reset unless you want to clear the | |
// database and start over | |
function reset() { | |
magpie.reset(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment