From d7578dad2f0ac7b9741bdf474d55fff76c30d6ba Mon Sep 17 00:00:00 2001 From: Tomasz Wojdat Date: Tue, 7 Nov 2023 23:14:04 +0100 Subject: [PATCH] Remove not used function --- src/pyzet/show.py | 4 ++-- src/pyzet/utils.py | 10 ---------- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/src/pyzet/show.py b/src/pyzet/show.py index 0bee0ea..6b6e4f1 100644 --- a/src/pyzet/show.py +++ b/src/pyzet/show.py @@ -9,7 +9,7 @@ from pyzet.utils import add_pattern_args from pyzet.utils import Config from pyzet.utils import get_git_remote_url -from pyzet.utils import get_md_relative_link +from pyzet.zettel import get_md_link from pyzet.zettel import get_zettel @@ -70,7 +70,7 @@ def show_zettel(id_: str, repo_path: Path) -> int: def show_zettel_as_md_link(id_: str, repo_path: Path) -> int: zettel_path = Path(repo_path, C.ZETDIR, id_) zettel = get_zettel(zettel_path) - print(get_md_relative_link(zettel.id_, zettel.title)) + print(get_md_link(zettel)) return 0 diff --git a/src/pyzet/utils.py b/src/pyzet/utils.py index fd1292e..cc83410 100644 --- a/src/pyzet/utils.py +++ b/src/pyzet/utils.py @@ -73,16 +73,6 @@ def _convert_ssh_to_https(remote: str) -> str: return 'https://' + remote.partition('git@')[-1].replace(':', '/') -def get_md_relative_link(id_: str, title: str) -> str: - """Returns a representation of a zettel that is a relative Markdown link. - - Asterisk at the beginning is a Markdown syntax for an unordered list, - as links to zettels are usually just used in references section of a - zettel. - """ - return f'* [{id_}](../{id_}) {title}' - - @functools.lru_cache(maxsize=1) def _get_git_bin() -> str: if (git := shutil.which('git')) is None: