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 nbconvert via a %%bash magic to save HTML and slide versions, but that converts what's on disk, not what's running.
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.
I've tried %save and %notebook magics, but neither does quite what I'm looking for (the best I can tell).
Is there any way to do this?