Nicer output
This commit is contained in:
parent
1a91c32880
commit
876d46b719
|
@ -77,8 +77,7 @@ def historique(idsonde):
|
|||
|
||||
if diff:
|
||||
for d in diff["changements"]:
|
||||
line = date, *d
|
||||
print(line)
|
||||
line = date, *utils.clean_state(d)
|
||||
yield " ".join(line)
|
||||
else:
|
||||
print(f"no change for {date}")
|
||||
|
|
|
@ -54,6 +54,11 @@ def compare(channels, previous, current):
|
|||
return res
|
||||
|
||||
|
||||
def clean_state(state):
|
||||
# Ote l'identifiant en début de chaine
|
||||
return state[0].split("#", 1)[1], *state[1:]
|
||||
|
||||
|
||||
def list_channels(p, c):
|
||||
all_channels = sorted(set((*p["channels"], *c["channels"])))
|
||||
return all_channels
|
||||
|
|
Loading…
Reference in New Issue