Skip to content

Commit

Permalink
Remove not used function
Browse files Browse the repository at this point in the history
  • Loading branch information
tpwo committed Nov 7, 2023
1 parent b7535a3 commit d7578da
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/pyzet/show.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down Expand Up @@ -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


Expand Down
10 changes: 0 additions & 10 deletions src/pyzet/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit d7578da

Please sign in to comment.