Skip to content

Commit

Permalink
Include 'dt' as var_map
Browse files Browse the repository at this point in the history
  • Loading branch information
bbugyi200 committed Mar 13, 2024
1 parent 0c29bc3 commit a748db2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/zorg/runners.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from __future__ import annotations

import datetime as dt
from pathlib import Path
import tempfile
from typing import Any, Iterable, Iterator, Mapping
Expand Down Expand Up @@ -246,7 +247,7 @@ def render(self, template_path: Path, var_map: Mapping[str, Any]) -> str:
self._temp_dir_path, self._zettel_dir / template_path
)
template = self._template_env.get_template(template_path.name)
return template.render(var_map)
return template.render(var_map | {"dt": dt})

@classmethod
def _build_template_in_dir(
Expand Down

0 comments on commit a748db2

Please sign in to comment.