takluyver / nbopen

Open a Jupyter notebook in the best available server
BSD 3-Clause "New" or "Revised" License
301 stars 58 forks source link

Add an option to create a new notebook #36

Closed senderle closed 6 years ago

senderle commented 7 years ago

This code adds a simple command line option to create a new notebook if one doesn't already exist. It does some obvious checks to see if the file exists (either with or without the .ipynb extension) but I may have missed something.

I saw that you said elsewhere that you see this as mainly for GUI integration, but I've been using nbopen at the console regularly since installing it a couple of weeks ago, and I have already wanted to open a new notebook from the console multiple times, so I thought others might find this useful too.

Open to feedback and happy to change anything you like!

takluyver commented 6 years ago

Sorry that it's taken me over a year to look at this. Now that I have looked at it, I think it looks good. I'm going to merge it manually to resolve the conflict, and make a couple of minor cleanups.