mirror of
https://github.com/jpetazzo/container.training.git
synced 2026-02-14 17:49:59 +00:00
18 lines
429 B
Python
Executable File
18 lines
429 B
Python
Executable File
#!/usr/bin/env python
|
|
|
|
import logging
|
|
import os
|
|
import subprocess
|
|
import sys
|
|
|
|
logging.basicConfig(level=os.environ.get("LOG_LEVEL", "INFO"))
|
|
|
|
filename = sys.argv[1]
|
|
|
|
logging.info("Checking file {}...".format(filename))
|
|
text = subprocess.check_output(["./slidechecker.js", filename])
|
|
html = open(filename).read()
|
|
html = html.replace("</textarea>", "\n---\n```\n{}\n```\n</textarea>".format(text))
|
|
|
|
open(filename, "w").write(html)
|