Skip to content

Commit

Permalink
We're getting there
Browse files Browse the repository at this point in the history
  • Loading branch information
tpwo committed Nov 7, 2023
1 parent 19c643c commit b9339ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pyzet/zettel.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,12 @@ def get(path: Path) -> Zettel:
"""Gets zettel from a full path."""
if path.is_dir():
raise ValueError
id_ = path.parent.name

title_line, tags_line = _get_first_and_last_line(path)
title = get_markdown_title(title_line.strip(), path.name)
tags = get_tags(tags_line.strip()) if tags_line.startswith(4 * ' ') else ()
logging.debug(f"get_zettel: '{path.name}' with title '{title}'")
id_ = path.parent.name
return Zettel(title=title, id=id_, tags=tags, path=path)

# title_line, tags_line = _get_first_and_last_line(path)
Expand Down

0 comments on commit b9339ef

Please sign in to comment.