Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
tartavull committed Sep 25, 2014
0 parents commit bb52688
Show file tree
Hide file tree
Showing 368 changed files with 42,585 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/dist
/node_modules
/cache
19 changes: 19 additions & 0 deletions Gruntfile.js
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']);
};
662 changes: 662 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions README.md
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

26 changes: 26 additions & 0 deletions app/controller/kernel.js
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);
};
31 changes: 31 additions & 0 deletions app/index.html
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>
1 change: 1 addition & 0 deletions app/node_modules/.bin/notebook-proxy

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions app/node_modules/ipython-notebook-proxy/.npmignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
54 changes: 54 additions & 0 deletions app/node_modules/ipython-notebook-proxy/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

73 changes: 73 additions & 0 deletions app/node_modules/ipython-notebook-proxy/bin/notebook-proxy.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions app/node_modules/ipython-notebook-proxy/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
120 changes: 120 additions & 0 deletions app/node_modules/ipython-notebook-proxy/lib/main.js

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.

Loading

0 comments on commit bb52688

Please sign in to comment.