title: How to run nbconvert on notebook in google colaboratory
body: <p>I have a simple jupyter notebook, say <code>foo.ipynb</code>.  I wish simply to run <code>nbconvert</code> in the usual way: on my local machine I would execute <code>!jupyter nbconvert foo.ipynb</code> in the notebook itself, or <code>jupyter notebook foo.ipynb</code> in a shell.  On Google Colaboratory, this does not work.  Of course this is because <code>foo.ipynb</code> is not running locally on the drive, but the usual methods to connect Drive and Colab are not working in this case. <strong>Question: is running <code>nbconvert</code> on a Colab notebook possible from within a Colab notebook (as in <code>!jupyter nbconvert foo.ipynb</code>), and if so, how?</strong> I have tried:</p>
  
  <ol>
  <li><p>(The Colab File Menu options don't do the necessary export, which is why I need <code>nbconvert</code>.  Downloading to a local machine and running <code>nbconvert</code> is also not an option here.) </p></li>
  <li><p>The simplest attempt to link to the file directly (when authenticated) <code>!jupyter nbconvert 'https://colab.research.google.com/drive/2pexUcovcblu1Api0F0NezyhZyN2MEMWLhs5ujm?authuser=2</code> </p></li>
  <li><p>This SO post: <a href="https://stackoverflow.com/questions/48376580/google-colab-how-to-read-data-from-my-google-drive">Google Colab: how to read data from my google drive?</a>
  But again no luck, since it can’t seem to find the file and <code>nbconvert</code> only takes a filename.</p></li>
  <li><p>Other approaches suggested in SO posts, including: <a href="https://stackoverflow.com/questions/49219341/is-it-possible-to-import-my-own-modules-into-a-google-colaboratory-notebook?noredirect=1&amp;lq=1">Is it possible to import my own modules into a google-colaboratory notebook?</a> , <a href="https://stackoverflow.com/questions/46986398/import-data-into-google-colaboratory?rq=1">Import data into Google Colaboratory</a> , <a href="https://stackoverflow.com/questions/48961866/how-to-run-a-downloaded-jupyter-notebook-on-google-colaboratory">How to run a downloaded Jupyter notebook on Google Colaboratory?</a></p></li>
  </ol>
  
  <p>How can I accomplish <code>nbconvert</code> on a colab notebook, within the notebook?  I can verify that <code>nbconvert</code> is available on colab; it's just not able to find the file under any of the above approaches (so far as I have been able). </p>