1
0

Add url to frontmatter
Some checks failed
Test Python / Test (push) Failing after 26s

This commit is contained in:
Jon Michael Aanes 2024-09-28 14:34:37 +02:00
parent b8ecb5da25
commit a39f6141c7
Signed by: Jmaa
SSH Key Fingerprint: SHA256:Ab0GfHGCblESJx7JRE4fj4bFy/KRpeLhi41y4pF3sNA
2 changed files with 4 additions and 2 deletions

View File

@ -33,6 +33,7 @@ class FavroStat(fuse.Stat):
CARD_FILENAME_FORMAT = 'PAR-{seq_id}.md'
CARD_FILENAME_REGEX = r'^\/PAR\-(\d+)\.md$'
OFFICIAL_URL='https://favro.com/organization/{org_id}?card=par-{seq_id}'
@dataclasses.dataclass(frozen=True)
class Thing:
@ -184,6 +185,7 @@ class FavroFuse(fuse.Fuse):
tags,
assignments,
dependencies,
url=OFFICIAL_URL.format(org_id=card.organization_id.raw_id, seq_id=card.seq_id.raw_id),
)
return self.formatter.format_card_contents(card_contents)

View File

@ -39,8 +39,8 @@ class CardFileFormatter:
frontmatter_data = {}
if card.name and self.obsidian_mode:
frontmatter_data['aliases'] = [card.name]
if card.tags:
frontmatter_data['tags'] = card.tags
frontmatter_data['tags'] = card.tags
frontmatter_data['url'] = card.url
if card.assignments:
frontmatter_data['assignments'] = card.assignments
if self.obsidian_mode: