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

Class Lesson

docs/website/scripts/split_courses.py:44–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42
43@dataclass
44class Lesson:
45 module_title: str
46 module_order: int
47 title: str
48 body_lines: List[str] = field(default_factory=list)
49 lesson_order_in_module: int = 0
50 global_order: int = 0
51
52 def summary(self) -> str:
53 for line in self.body_lines:
54 t = line.strip()
55 if not t:
56 continue
57 if t.startswith("{{<") or t.startswith("!["):
58 continue
59 if t.startswith("*") or t.startswith("-"):
60 continue
61 return t[:190]
62 return "Watch the lesson and follow the accompanying resources."
63
64
65@dataclass

Callers 1

parse_courseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected