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!
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.
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!