fix paths
This commit is contained in:
@ -35,7 +35,8 @@ def linebreaks(text):
|
||||
return br.sub(r"<br />\n", text)
|
||||
|
||||
|
||||
env = jinja2.Environment(loader=jinja2.FileSystemLoader(os.path.curdir))
|
||||
template_dir = os.path.join(Path(__file__).parent.resolve(), "templates")
|
||||
env = jinja2.Environment(loader=jinja2.FileSystemLoader(template_dir))
|
||||
env.filters["duration"] = duration
|
||||
env.filters["linebreaks"] = linebreaks
|
||||
|
||||
@ -119,8 +120,7 @@ output_dir = os.environ.get(
|
||||
if not os.path.exists(output_dir):
|
||||
os.mkdir(output_dir)
|
||||
|
||||
cwd = Path.resolve()
|
||||
template = env.get_template(os.path.join(cwd, "templates" "video.md"))
|
||||
template = env.get_template("video.md")
|
||||
|
||||
existing_posts = os.listdir(output_dir)
|
||||
|
||||
|
Reference in New Issue
Block a user