#!/usr/bin/env python

import sys
import os
from mktechdocslib import render_mktechdocs_jinja2_template

##
# Renderer for generic pages. Note that the curly brackets
# variables can be used to escape curly brackets when documenting
# Jinja2 python.
#

def render():
	head = ""
	foot = ""
	landing = ""

	if os.path.isfile("header.html"):
		with open("header.html", "r") as f:
			head = f.read()
	
	if os.path.isfile("footer.html"):
		with open("footer.html", "r") as f:
			foot = f.read()
	
	if os.path.isfile("landing.html"):
		with open("landing.html", "r") as f:
			landing = f.read()

	varDictionary = {"headerContent":head,
			 "footerContent":foot,
                	 "landingContent":landing,
			 "openCurlyBrackets":"{{",
               		 "closeCurlyBrackets":"}}",
			 "openCurlyBracket":"{",
			 "closeCurlyBracket":"}"
			 }

	if not os.path.isfile(sys.argv[1]):
		sys.stderr.write("Cannot find " + sys.argv[1] + "\n")
		sys.exit(1)

	print render_mktechdocs_jinja2_template(sys.argv[1], varDictionary)

if __name__ == "__main__":
	render()

deef385c1046ed4a58b9038b93d91ffe9083af4b
#!/usr/bin/env python

import sys
import os
from mktechdocslib import render_mktechdocs_jinja2_template

##
# Renderer for generic pages. Note that the curly brackets
# variables can be used to escape curly brackets when documenting
# Jinja2 python.
#

def render():
	head = ""
	foot = ""
	landing = ""

	if os.path.isfile("header.html"):
		with open("header.html", "r") as f:
			head = f.read()
	
	if os.path.isfile("footer.html"):
		with open("footer.html", "r") as f:
			foot = f.read()
	
	if os.path.isfile("landing.html"):
		with open("landing.html", "r") as f:
			landing = f.read()

	varDictionary = {"headerContent":head,
			 "footerContent":foot,
                	 "landingContent":landing,
			 "openCurlyBrackets":"{{",
               		 "closeCurlyBrackets":"}}",
			 "openCurlyBracket":"{",
			 "closeCurlyBracket":"}"
			 }

	if not os.path.isfile(sys.argv[1]):
		sys.stderr.write("Cannot find " + sys.argv[1] + "\n")
		sys.exit(1)

	print render_mktechdocs_jinja2_template(sys.argv[1], varDictionary)

if __name__ == "__main__":
	render()
