-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/dist | ||
/node_modules | ||
/cache |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
module.exports = function(grunt) { | ||
grunt.initConfig({ | ||
pkg: grunt.file.readJSON('package.json'), | ||
nodewebkit: { | ||
options: { | ||
build_dir: './dist', | ||
// choose what platforms to compile for here | ||
mac: true, | ||
win: true, | ||
linux32: true, | ||
linux64: true | ||
}, | ||
src: ['./app/**/*'] | ||
} | ||
}) | ||
|
||
grunt.loadNpmTasks('grunt-node-webkit-builder'); | ||
grunt.registerTask('default', ['nodewebkit']); | ||
}; |
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
INotebook | ||
========= | ||
|
||
IPython Notebook File Viewer | ||
|
||
sudo add-apt-repository ppa:tartavull/ppa | ||
sudo apt-get update | ||
sudo apt-get install inotebook | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
window.ipython = window.ipython || {}; | ||
|
||
var proxy = require("ipython-notebook-proxy"); | ||
var path = require('path'); | ||
|
||
ipython.init = function(argv, callback) { | ||
|
||
var pattern = /--notebook=((\/|\\\\).*)*/; | ||
var filepath = pattern.exec(argv[0]); | ||
var dirname = path.dirname(filepath[1]); | ||
|
||
if (dirname) { | ||
var urlpath = "inotebook"; | ||
var port = 10001; | ||
console.log("Opening file : " + dirname); | ||
proxy.start(dirname, urlpath, port); | ||
} | ||
|
||
|
||
win.on('closed', function() { | ||
console.log("Stoping server"); | ||
proxy.stop_all(); | ||
}); | ||
|
||
callback(urlpath, port); | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<html> | ||
<head> | ||
<title>IPython</title> | ||
<script type="text/javascript" src="controller/kernel.js"></script> | ||
<script type="text/javascript"> | ||
|
||
var gui = require('nw.gui'); | ||
var win = gui.Window.get(); | ||
|
||
gui.App.on('open', function(cmdline) { | ||
console.log('command line: ' + cmdline); | ||
}); | ||
|
||
ipython.init(gui.App.fullArgv, function(urlpath , port){ | ||
|
||
if(urlpath){ | ||
setTimeout(function(){ | ||
var url = "http://localhost:"+port+"/"+urlpath; | ||
console.log(url); | ||
location.href = url; | ||
}, 3000); | ||
|
||
|
||
} | ||
}); | ||
</script> | ||
</head> | ||
<body> | ||
<h1>Works!</h1> | ||
</body> | ||
</html> |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.