suaviloquence / scrapelect

Declarative web scraping DSL with CSS-inspired syntax
https://suaviloquence.github.io/scrapelect/
Apache License 2.0
1 stars 0 forks source link

add way to filter (select?) items in a list #14

Closed suaviloquence closed 1 month ago

suaviloquence commented 1 month ago

I don't want to add first-class functions, so at most filtering based on a property or property equality (with a similar syntax to CSS (pseudo-)selectors?). What would this look like?

suaviloquence commented 1 month ago

with a = [1, 2, 3, Null, "abc", 4]:

just-ints: a [type="int"]

just-ints: a [item: $item | type() | eq(to: "int")]

suaviloquence commented 1 month ago

in a68d978