mirror of
https://github.com/markqvist/NomadNet.git
synced 2026-11-29 03:16:40 -05:00
Added field and variable parsing to partials
This commit is contained in:
parent
b35cc04f57
commit
f2d0ea9910
2 changed files with 65 additions and 6 deletions
|
|
@ -102,11 +102,10 @@ def parse_partial(line):
|
|||
partial_url = partial_components[0]
|
||||
partial_refresh = float(partial_components[1])
|
||||
partial_fields = ""
|
||||
# TODO: Implement fields and parameters for partials
|
||||
# elif len(partial_components) == 3:
|
||||
# partial_url = partial_components[0]
|
||||
# partial_refresh = float(partial_components[1])
|
||||
# partial_fields = partial_components[2]
|
||||
elif len(partial_components) == 3:
|
||||
partial_url = partial_components[0]
|
||||
partial_refresh = float(partial_components[1])
|
||||
partial_fields = partial_components[2]
|
||||
else:
|
||||
partial_url = ""
|
||||
partial_fields = ""
|
||||
|
|
@ -114,6 +113,9 @@ def parse_partial(line):
|
|||
|
||||
if partial_refresh and partial_refresh < 1: partial_refresh = None
|
||||
|
||||
pf = partial_fields.split("|")
|
||||
if len(pf) > 0: partial_fields = pf
|
||||
|
||||
if len(partial_url):
|
||||
pile = urwid.Pile([urwid.Text(f"⧖")])
|
||||
partial_descriptor = "|".join(partial_components)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue