Skip to content

Python script to convert a Markdown style document into Google Apps Script code to generate a Google Forms

License

Notifications You must be signed in to change notification settings

george-gca/markdown-to-google-forms

Repository files navigation

Markdown to Google Forms

NOTE: Since I realized that this would be much more useful to more people if it was a web app, I decided to sunset this repository and create a new one, with a new flask code base.

Open In Colab

Python script to convert a Markdown style document into Google Apps Script code, which in turn is used to generate a Google Forms.

This is not the best solution possible, but it is a solution. One can probably implement something more robust by using libraries like marko or mistletoe.

Usage

Simply call the script giving a markdown file as input. By default it prints the code to stdout, but you can pipe the output to a file:

python3 main.py sample.md > script.js

There's also a jupyter notebook and Google Colab version in this repo. In this case, modify the contents of the markdown_file variable in the notebook and run all cells.

Then, paste the generated code on a new project in Google Apps Script and execute it. On the first run of this new project it will ask for permissions to your Google Drive, which should be conceded so it can create the new form. A new file will be created on your Google Drive with the name you used as title. Note that the form is not ready to use, but at least the basic structure will be done.

About

Python script to convert a Markdown style document into Google Apps Script code to generate a Google Forms

Topics

Resources

License

Stars

Watchers

Forks