(entry: NavigationEntry)
| 440 | } |
| 441 | |
| 442 | export 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 | |
| 459 | export function formatNavigationPwd(): string { |
| 460 | try { |
no test coverage detected