MCPcopy Create free account
hub / github.com/RASAAS/docmcp-knowledge / get_title_str

Function get_title_str

scripts/json_to_markdown.py:188–192  ·  view source on GitHub ↗

Get title string, handling both string and dict formats.

(title, lang: str = "en")

Source from the content-addressed store, hash-verified

186
187
188def get_title_str(title, lang: str = "en") -> str:
189 """Get title string, handling both string and dict formats."""
190 if isinstance(title, dict):
191 return title.get(lang, "") or title.get("en", "")
192 return str(title) if title else ""
193
194
195def write_md(path: Path, content: str, dry_run: bool = False) -> bool:

Callers 2

Calls 1

getMethod · 0.80

Tested by

no test coverage detected