2017-05-25 06:21:13 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
2017-05-25 16:15:57 +02:00
|
|
|
# create json directory if not already present
|
2017-05-25 06:26:38 +02:00
|
|
|
mkdir -p ../json
|
2017-05-25 16:15:57 +02:00
|
|
|
# parse API README and print (minified) JSON to stdout, redirect to /json
|
2017-05-25 06:32:50 +02:00
|
|
|
node md2json.js ../README.md > ../json/api.min.json
|
2017-05-25 16:15:57 +02:00
|
|
|
# beautify the previously created JSON file, redirect to /json
|
2017-05-25 06:32:50 +02:00
|
|
|
python -m json.tool ../json/api.min.json > ../json/api.json
|
2017-05-25 16:15:57 +02:00
|
|
|
# print out pretty JSON (useful for debugging, checking for new entries, etc)
|
2017-05-25 06:21:13 +02:00
|
|
|
cat ../json/api.json
|