pirxpilot / liftie

:ski: Clean, simple, easy to read, fast ski resort lift status.
https://liftie.info
BSD 3-Clause "New" or "Revised" License
67 stars 31 forks source link

Parse <br> separated texts? #76

Closed FezVrasta closed 7 months ago

FezVrasta commented 9 months ago

I wanted to add a resort that displays the lifts status as plain text separated by breaking lines...

https://www.terminillo.eu/mappa-impianti-piste-da-sci/

Ideas on how to do it? Can I select text nodes or only HTML nodes are supported?

pirxpilot commented 9 months ago

Not sure about directly addressing a text node - check out fb55/css-select docs. There is currently no example of that in liftie but parse can be a function - it takes node and returns { name, status } object (it can also return a falsy value if you want to filter something out. So I would probably try to come up with a selector that gives me all the texts and then ignore empty lines. I would start with something like elementor-size-medium > * and checked if I can find something useful among the nodes and their siblings...