ModestEx - Pipeable transformations on html strings (with CSS selectors)

Hey @mischov @OvermindDL1

I just published ModestEx v0.0.2-dev.

Thanks again for your input. It’s a lot clearer now what the main strength of the library actually is!

I added a new feature ModestEx.get_attribute and ModestEx.set_attribute.

And you can actually pipe them together.

iex> ModestEx.find("<p><a>Hello</a><a>World</a></p>", "p a") |> 
...> ModestEx.set_attribute("href", ["https://elixir-lang.org", "https://google.de"])
["<html><head></head><body><a href=\"https://elixir-lang.org\">Hello</a></body></html>", "<html><head></head><body><a href=\"https://google.de\">World</a></body></html>"]
3 Likes