Get the fulltext markdown file path for an entry.
(entry: dict)
| 241 | |
| 242 | |
| 243 | def get_fulltext_path(entry: dict) -> Path: |
| 244 | """Get the fulltext markdown file path for an entry.""" |
| 245 | fw = entry["_framework"] |
| 246 | tp = entry["_type"] |
| 247 | slug = entry.get("slug", "") |
| 248 | eid = entry.get("id", "") |
| 249 | filename = slug or re.sub(r'[^\w\-.]', '_', eid) |
| 250 | return KNOWLEDGE_ROOT / fw / tp / "fulltext" / f"{filename}.md" |
| 251 | |
| 252 | |
| 253 | def fulltext_exists(entry: dict) -> bool: |
no test coverage detected