Skip to content

Instantly share code, notes, and snippets.

Last active Jun 2, 2017
What would you like to do?
nbdiffex - nbdiff-web extension for Jupyter notebook
// call "nbdime" and compare current version with new version in new tab
], function(IPython, $, events, utils) {
"use strict";
* Call nbdiff-web with current notebook against checkpointed version
var nbCheckpointDiffView = function () {
var kernel = IPython.notebook.kernel;
var name = IPython.notebook.notebook_name;
var path= IPython.notebook.notebook_path
var base_url=window.location.protocol + '//' +window.location.hostname
var abspath='/vagrant/notebooks'
var hostport='35101'
var guestport='8899'
var url = base_url+':'+hostport+'?remote='+abspath+'/.ipynb_checkpoints/'+utils.splitext(name)[0]+'-checkpoint.ipynb&base='+abspath+'/'+path;
var command = 'import subprocess;\'nbdiff-web --port='+guestport+' --ip=* \', shell=True)';
var load_ipython_extension = function() {
id: 'doCheckpointDiffView',
label: 'Display nbdiff to checkpointed version',
icon: 'fa-list-alt',
callback: nbCheckpointDiffView
return {
load_ipython_extension : load_ipython_extension
Type: IPython Notebook Extension
Name: Checkpointdiffer
Description: Calls nbdiff with current notebook and checkpointed version
Compatibility: 4.x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment