#!/bin/sh git log -1 --date='rfc' --format='



Last modified by %an - %ad - commit %h' README.md | cat README.md - > pre.md pandoc -o pre.html -f markdown+multiline_tables pre.md cat < index.html LMM Counsellor REST API Documentation EOF echo "" >> index.html sed -i '/^

' index.html rm pre.html pre.md # mv index.html ../ cat README.md | sed ':a;N;$!ba;s/\n/\\n/g' | sed 's/"/\\"/g' > content cat < payload { "description": "REST API docs for LMM Counsellor App", "files": { "REST API Counsellor.md": { "content": "`cat content`", "filename": "REST API Counsellor.md" } } } EOF # curl -s -X PATCH\ # -H 'Authorization: token xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'\ # -d@payload\ # https://api.github.com/gists/c1b86bac8046770f8718d60e120f92ea > /dev/null 2>&1 rm payload content