You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Apologies if I've missed if this is already an option.
I'd like to be able to output nbdime diff-web to a file, from the command line without a UI.
Specifically, I'm hoping to script out the generation of nbdime diff outputs for each commit in a range -- ie, for a pull request touching notebooks, to show the changes commit-by-commit.
Context:
Changing code is hard, reading code is harder, reading diffs is pretty hard, and reading .ipynb diffs is even harder :) That's why 'nbdime diff' is compelling. Another strategy that helps is to break up even slightly complicated changes in to a series of smaller commits, each of which (as much as possible) do just one atomic thing. Unfortunately it's a little tricky to take advantage of both nbdime diff and a large number of small commits together. That's what's led me to want to script around (headlessly) collecting processed notebook diffs for a sequence of commits.
The text was updated successfully, but these errors were encountered:
It is not currently possible to write the HTML output from nbdime-web directly to a file from the CLI. It is definitely a relevant feature request to consider. The current implementation of having a button on the page to save the static HTML was a simple fix for this at the time.
To implement this, two current steps would need to be considered:
Once the diff is calculated, it is sent to the browser as JSON.
The JS code of nbdime is responsible for converting this JSON representation of the diff into HTML DOM (together with the jinja templates used).
As you can see, this current process relies on the browser environment to generate the HTML, which would need to be taken into account if we wanted to be able to generate this directly from the CLI. Not impossible, but a bit of work.
Apologies if I've missed if this is already an option.
I'd like to be able to output nbdime diff-web to a file, from the command line without a UI.
Specifically, I'm hoping to script out the generation of nbdime diff outputs for each commit in a range -- ie, for a pull request touching notebooks, to show the changes commit-by-commit.
Context:
Changing code is hard, reading code is harder, reading diffs is pretty hard, and reading .ipynb diffs is even harder :) That's why 'nbdime diff' is compelling. Another strategy that helps is to break up even slightly complicated changes in to a series of smaller commits, each of which (as much as possible) do just one atomic thing. Unfortunately it's a little tricky to take advantage of both nbdime diff and a large number of small commits together. That's what's led me to want to script around (headlessly) collecting processed notebook diffs for a sequence of commits.
The text was updated successfully, but these errors were encountered: