MCPcopy Create free account
hub / github.com/codenameone/CodenameOne / _build_task

Function _build_task

scripts/website/queue_browser_syndication.py:101–113  ·  view source on GitHub ↗
(post: Post, platform: str)

Source from the content-addressed store, hash-verified

99
100
101def _build_task(post: Post, platform: str) -> dict:
102 body_html = _markdown_to_html(render_syndicated_body(post))
103 return {
104 "id": f"{platform}:{post.slug}",
105 "site": platform,
106 "slug": post.slug,
107 "title": post.title,
108 "canonical": post.canonical_url,
109 "description": str(post.front_matter.get("description") or "").strip(),
110 "cover_image_url": post.cover_image,
111 "body_html": body_html,
112 "queued_at": dt.datetime.now(dt.timezone.utc).isoformat(timespec="seconds"),
113 }
114
115
116def parse_args(argv: list[str]) -> argparse.Namespace:

Callers 1

mainFunction · 0.85

Calls 5

render_syndicated_bodyFunction · 0.90
_markdown_to_htmlFunction · 0.85
getMethod · 0.65
stripMethod · 0.45
nowMethod · 0.45

Tested by

no test coverage detected