Broken project to implement a cross-protocol browser in textual
Diffstat (limited to 'gemtext.py')
| -rw-r--r-- | gemtext.py | 10 |
1 files changed, 2 insertions, 8 deletions
@@ -4,17 +4,11 @@ from textual.containers import Container class Gemtext(Static): """Gemtext widget.""" - items = [] - #def compose(self) -> ComposeResult: - # yield Container(id="content") def __init__(self, txt, id): super().__init__(id=id) - self.update(txt) - def update(self, txt): - #S = self.query("Static") - #if S: - # S.last().remove() + self.addlines(txt) + def addlines(self, txt): for line in txt.split('\n'): if line.startswith("=>"): path = line[2:].lstrip().split(' ')[0] |