MCPcopy Create free account
hub / github.com/afar1/fieldtheory-cli / formatNavigationMeta

Function formatNavigationMeta

src/navigation.ts:442–457  ·  view source on GitHub ↗
(entry: NavigationEntry)

Source from the content-addressed store, hash-verified

440}
441
442export function formatNavigationMeta(entry: NavigationEntry): string {
443 const content = fs.readFileSync(entry.path, 'utf-8');
444 const tags = [...new Set([...parseFrontmatterTags(content), ...extractInlineTags(content)])].sort();
445 const links = extractWikiLinks(content);
446 return [
447 `title: ${entry.title}`,
448 `place: ${entry.place}`,
449 `path: ${entry.path}`,
450 `relPath: ${entry.relPath}`,
451 `updatedAt: ${entry.updatedAt}`,
452 `size: ${entry.size}`,
453 `tags: ${tags.length ? tags.join(', ') : '(none)'}`,
454 `links: ${links.length ? links.join(', ') : '(none)'}`,
455 '',
456 ].join('\n');
457}
458
459export function formatNavigationPwd(): string {
460 try {

Callers 1

buildCliFunction · 0.85

Calls 3

parseFrontmatterTagsFunction · 0.85
extractInlineTagsFunction · 0.85
extractWikiLinksFunction · 0.85

Tested by

no test coverage detected