fix print preamble
This commit is contained in:
parent
f2e8c63459
commit
a30cee6bb9
|
@ -12,7 +12,6 @@ def get_template(template_name: str = "plan.html", plan_path: Path | None = None
|
||||||
templates = Environment(
|
templates = Environment(
|
||||||
loader=PackageLoader("plan"), autoescape=select_autoescape()
|
loader=PackageLoader("plan"), autoescape=select_autoescape()
|
||||||
)
|
)
|
||||||
breakpoint()
|
|
||||||
template = templates.get_template(template_name)
|
template = templates.get_template(template_name)
|
||||||
today = datetime.today().strftime("%Y-%m-%d")
|
today = datetime.today().strftime("%Y-%m-%d")
|
||||||
return template.render(today=today, plan_path=plan_path)
|
return template.render(today=today, plan_path=plan_path)
|
||||||
|
@ -36,11 +35,12 @@ def print_plan(plan_path: Path):
|
||||||
uses pandoc and lp shell tools.
|
uses pandoc and lp shell tools.
|
||||||
"""
|
"""
|
||||||
preamble = """
|
preamble = """
|
||||||
---
|
---
|
||||||
documentclass: extarticle
|
documentclass: extarticle
|
||||||
fontsize: 20pt
|
fontsize: 20pt
|
||||||
---
|
---
|
||||||
"""
|
|
||||||
|
"""
|
||||||
preamble = subprocess.Popen(["echo", "-n", preamble], stdout=subprocess.PIPE)
|
preamble = subprocess.Popen(["echo", "-n", preamble], stdout=subprocess.PIPE)
|
||||||
cat = subprocess.Popen(
|
cat = subprocess.Popen(
|
||||||
["cat", "-", str(plan_path)],
|
["cat", "-", str(plan_path)],
|
||||||
|
|
Loading…
Reference in New Issue