hquery alternatives and similar packages
Based on the "Web" category.
Alternatively, view hquery alternatives based on common mentions on social networks and blogs.
-
swagger-petstore
swagger-codegen contains a template-driven engine to generate documentation, API clients and server stubs in different languages by parsing your OpenAPI / Swagger definition. -
haskell-bitmex-rest
swagger-codegen contains a template-driven engine to generate documentation, API clients and server stubs in different languages by parsing your OpenAPI / Swagger definition. -
servant
Main repository for the servant libraries — DSL for describing, serving, querying, mocking, documenting web applications and more! -
neuron
Future-proof note-taking and publishing based on Zettelkasten (superseded by Emanote: https://github.com/srid/emanote) -
tagsoup
Haskell library for parsing and extracting information from (possibly malformed) HTML/XML documents -
keera-hails-reactive-htmldom
Keera Hails: Haskell on Rails - Reactive Programming Framework for Interactive Haskell applications -
ghcjs-dom
Make Document Object Model (DOM) apps that run in any browser and natively using WebKitGtk
WorkOS - The modern identity platform for B2B SaaS
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of hquery or a related project?
README
What is it?
Hquery can be used to manipulate xmlhtml trees (and has a similar selector syntax to jquery, hence the name). This enables easy manipulation and content generation from html templates. If you're familiar with Lift's CssSels, this is basically an implementation of those in haskell.
Examples
Suppose you have the template:
<div class="person">
<div class="name"></div>
<div class="occupation"></div>
</div>
If you invoke hquery as:
import Text.Hquery
template = ... -- parse your template here
people = [ ("Justin Bieber", "Celebrity")
, ("Jens Kidman", "Musician")
]
bindPerson (n, o) = hq ".name *" n . hq ".occupation *" o
f = hq ".person *" $ map bindPerson people
f template
You'll get:
<div class="person">
<div class="name">Justin Bieber</div>
<div class="occupation">Celebrity</div>
</div>
<div class="person">
<div class="name">Jens Kidman</div>
<div class="occupation">Musician</div>
</div>
You can also add, remove, and append to element attributes. For example if we
have: <div class="foo"></div>
, below are some example transformations:
hq "div [class+]" "hidden"
gives<div class="foo hidden"></div>
hq ".foo [id]" "bar"
gives<div id="bar" class="foo"></div>
hq "* [class!]" "foo"
gives<div></div>
Installation
Hquery is availiable on HackageDB, via cabal install hquery
.
License
Hquery is MIT licensed.
*Note that all licence references and agreements mentioned in the hquery README section above
are relevant to that project's source code only.