joshuaberetta / md2xlsform

Convert Markdown to XLSForm for importing into KoBo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

md2xlsform

Convert Markdown to XLSForm for importing into KoBo.

Setup

git clone https://github.com/joshuaberetta/md2xlsform
cd md2xlsform
pip3 install -r requirements.txt
chmod +x md2xlsform.py

# optional
sudo ln -s $(pwd)/md2xlsform.py /usr/local/bin/md2xlsform

Usage

# if added to path
md2xlsform -i input_file.md -o output_file.xlsx

# otherwise
./md2xlsform.py -i input_file.md -o output_file.xlsx

Markdown file structure

%% survey

| type             | name | label                        |
| ---              | ---  | ---                          |
| text             | name | What is your name?           |
| integer          | age  | How old are you?             |
| select_one foods | food | What is your favourite meal? |

%% choices

| list_name | name  | label |
| ---       | ---   | ---   |
| foods     | pasta | Pasta |
| foods     | pizza | Pizza |
| foods     | sushi | Sushi |

%% settings

| form_title |
| ---        |
| Basics     |

About

Convert Markdown to XLSForm for importing into KoBo


Languages

Language:Python 100.0%