public-apis/build/build.sh

11 lines
426 B
Bash
Raw Normal View History

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
mkdir -p ../json
2017-05-25 16:15:57 +02:00
# parse API README and print (minified) JSON to stdout, redirect to /json
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
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