fix paths

This commit is contained in:
cellarspoon
2021-12-15 12:05:44 +01:00
parent 55050aa3f6
commit 30dbc6212f
4 changed files with 15 additions and 18 deletions

View File

@ -111,13 +111,13 @@ mastodon = login_mastodon_bot()
output_dir = output_dir
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["localize_media_url"] = localize_media_url
env.filters["filter_mastodon_urls"] = filter_mastodon_urls
cwd = Path.resolve()
template = env.get_template(os.path.join(cwd, "templates" "hashtag.md"))
template = env.get_template("hashtag.md")
if not os.path.exists(output_dir):