<filename>tools/gen_markdown_api_doc.py<gh_stars>0
#! /usr/bin/env python3
import sys
import os
import argparse

parser = argparse.ArgumentParser()
parser.add_argument("-f", "--file", dest="file", type=str,
                    help="Markdown location (within repository)")
parser.add_argument("-o","--output", dest="output", type=str,
                    help="Output docsite file")
args = parser.parse_args()

base = os.path.basename(args.file)
title = os.path.splitext(base)[0]
output = '''---
title: {0}
---

{{% include_absolute {1} %}}
'''.format(title, args.file)
with open(args.output, "w") as output_file:
    output_file.write(output)

<filename>tools/gen_markdown_api_doc.py<gh_stars>0
#! /usr/bin/env python3
import sys
import os
import argparse

parser = argparse.ArgumentParser()
parser.add_argument("-f", "--file", dest="file", type=str,
                    help="Markdown location (within repository)")
parser.add_argument("-o","--output", dest="output", type=str,
                    help="Output docsite file")
args = parser.parse_args()

base = os.path.basename(args.file)
title = os.path.splitext(base)[0]
output = '''---
title: {0}
---

{{% include_absolute {1} %}}
'''.format(title, args.file)
with open(args.output, "w") as output_file:
    output_file.write(output)

#! /usr/bin/env python3 --- title: {0} ---  {{% include_absolute {1} %}}