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(
|
||||
loader=PackageLoader("plan"), autoescape=select_autoescape()
|
||||
)
|
||||
breakpoint()
|
||||
template = templates.get_template(template_name)
|
||||
today = datetime.today().strftime("%Y-%m-%d")
|
||||
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.
|
||||
"""
|
||||
preamble = """
|
||||
---
|
||||
documentclass: extarticle
|
||||
fontsize: 20pt
|
||||
---
|
||||
"""
|
||||
---
|
||||
documentclass: extarticle
|
||||
fontsize: 20pt
|
||||
---
|
||||
|
||||
"""
|
||||
preamble = subprocess.Popen(["echo", "-n", preamble], stdout=subprocess.PIPE)
|
||||
cat = subprocess.Popen(
|
||||
["cat", "-", str(plan_path)],
|
||||
|
|
Loading…
Reference in New Issue