<aside> 👉 Make sure you've followed the steps outlined in Install the Pathbird author command-line tool. You'll also need a Jupyter notebook; any notebook should work. If you don't have a notebook, follow the steps in Create a new Jupyter notebook.

</aside>

Upload a codex for the first time

  1. Make sure you've saved you work.

  2. Open a terminal.

  3. Make sure your pbauthor installation is working:

     pbauthor auth status
    

    Running  indicates that we're logged-in and ready to go.

    Running pbauthor auth status indicates that we're logged-in and ready to go.

  4. Navigate to the directory (folder) where your notebook was created:

    # Change this to be the directory where your notebook was created
    # Note that using quotes is required if your directory name contains spaces.
    cd "Documents/My First Codex"
    

  5. Run the pbauthor codex upload command:

    # The . indicates that the codex is in the current directory
    pbauthor codex upload .
    

    <aside> 👉 You won't be able to upload the codex if you haven't had a course set up for you as described in the Authoring on Pathbird pre-requisites.

    </aside>

  6. Choose the course you'd like to upload the codex to using the arrow keys and press enter to confirm.

  7. Success!

    The pbauthor tool will indicate the URL where the codex lives and you should be able to view it live!

    <aside> 👉 The first time you upload a codex, it may take a few minutes for the kernel to be built. Depending on the packages you use (see Adding packages), it may a while to build the kernel. Building the kernel ensures that every student gets a consistent and optimized experience, so we promise it's worth the wait. Subsequent uploads will re-use the same kernel image (unless you change the packages being used).

    </aside>

Re-upload and overwrite a codex

Authoring codices is hard work and frequently requires a lot of revisions. Fortunately, it's super easy to re-upload and overwrite a codex that hasn't been released yet.

<aside> 👉 If you've released a codex to your students, it can no longer be overwritten in order to prevent students' work from being deleted.

</aside>

  1. Make a change to the codex.

    Here, we've added a new Markdown cell below the existing code cell.

    Here, we've added a new Markdown cell below the existing code cell.

  2. Save the notebook file.

  3. Re-run the pbauthor codex upload command.

  4. Refresh the codex in your browser and see that it's updated to the version you just uploaded.

Next steps

Adding exercises to a codex