title: How can I save a Jupyter Notebook (iPython notebook) programmatically?
body: <p>I'd like to save a notebook (like clicking the "disk" icon in the toolbar) via a code block. Reason: I'd like to use <code>nbconvert</code> via a <code>%%bash</code> magic to save HTML and slide versions, but that converts what's on disk, not what's running.</p>
  
  <p>I'm not looking to do this every time I save (for which I see some config that can be set up), but only selectively for some of my notebooks. I'm looking to be able to "Run All" and have the last few cells create the additional files reflecting the fresh data on screen at the moment.</p>
  
  <p>I've tried <code>%save</code> and <code>%notebook</code> magics, but neither does quite what I'm looking for (the best I can tell).</p>
  
  <p>Is there any way to do this?</p>