#! /usr/bin/env python3 # Time-stamp: <2019-07-18 11:21:18 christophe@pallier.org> """ Extract information from json description files (passed on the command line) to create a Markdown table """ import sys import json print('|base|description|') print('|----|-----------|') for fname in sys.argv[1:]: try: with open(fname, 'rt') as f: data = json.loads(f.read()) print(f'|[{data["name"]}]({data["readme"]}) | {data["description"]} |') except: print(f"\n **** Problem with file {fname} \n") print()