This commit is contained in:
James Turk 2024-07-28 03:15:00 -04:00
parent b61c8fcb68
commit dfce639aae
2 changed files with 14 additions and 16 deletions

View File

@ -1 +1,14 @@
# wud: what's up doc
## Tasks
- TODO: add key navigation
- [ ] arrow keys/hjkl
- [ ] / search
- [ ] m new module prompt
- IDEA: pluggable parsers for other languages
- TODO: classes
- [ ] constructor
- [ ] methods
- [ ] attributes
- DONE: basic browser of docstrings

View File

@ -20,21 +20,6 @@ class MemberListView(ListView):
yield ListItem(Label(f"{f.name:<16}{f.icon}"))
def func2md(func):
return f"""## {func.name}{func.signature}
{func.desc}
"""
def mod2md(mod):
func_md = "\n\n".join(func2md(f) for f in mod.functions)
return f"""# {mod.name}
{mod.desc}
{func_md}
"""
# class DocView(MarkdownViewer):
#
# def __init__(self, mod):
@ -59,7 +44,7 @@ class WudTui(App):
def compose(self) -> ComposeResult:
yield Header()
yield MemberListView(self.mod_list)
yield Markdown(mod2md(self.mod), id="docview")
yield Markdown(self.mod_list[0].as_markdown(), id="docview")
def on_mount(self):
self.title = "wud"