Google Doc > Markdown script for Course in a Box

We’ve outlined our process for creating online courses in a recent blogpost.

We’re trying to get a sense of whether others are interested in / would utilize a tool that converted Google Docs to Markdown-formatted modules within a Github repo. So far we’ve developed:

A script: https://github.com/p2pu/facilitate-course/blob/gh-pages/gdoc2ciab.py

A formatting template: P2PU Google Doc Template - Google Docs

Hi Grif,
Are there any instructions on how to use the gdoc2ciab.py script or setup the Google API for it to work?
Thanks!

Hey @svigneau,

I haven’t written detailed instructions, but @aoliveras asked before I went on holiday, and this is what I shared with him.

A quick disclaimer first - you should be familiar with using python in your environment. You don’t need to code, but you do need to edit the script to update the google document ID.

Before you start, you also need to fork the course in a box repo and use a git client to clone the repository to your local system.

Here follows the instructions:

  1. Copy gdoc2ciab.py to the folder your course is in.
  2. Copy requirements.txt to the folder your course is in.
  3. Setup a python virtual environment: virtualenv -p python3.6 venv
  4. Activate the virtual environment source venv/bin/activate
  5. Install the dependencies pip install -r requirements.txt
  6. Create a google doc with your course content. Content should be formatted as described below.
  7. Edit the document ID in gdoc2ciab.py line 19.
  8. Update the course: rm -r modules && ./venv/bin/python gdoc2ciab.py && git add modules/. index.md _data/course.yml

Content formatting:

  • Use the Formatting that is in the toolbar at the top to maintain the course outline
  • Headings indicate modules and sub-modules
    • “Heading 1” will be a module
    • “Heading 2” will be a sub-module
    • “heading 3”+ will become normal headings on a page
  • For content on the landing page, put it at the top of the document, before any “heading 1” or “heading 2”.
  • You can use normal bullets
  • To insert a picture, upload the picture to GitHub, and then add the ‘raw’ link to the doc. Image added the normal google doc way won’t work atm.
  • You can embed a youtube video by adding the “embed link” to the doc. Ex. <iframe width="560" height="315" src="https://www.youtube.com/embed/bQqmIS7WQa8" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> would embed the video on the P2PU landing page in the course. Other services that is embedded using an iframe can also be used similarly.

Let me know if you get stuck.