microformats2-parser alternatives and similar packages
Based on the "Web" category.
Alternatively, view microformats2-parser alternatives based on common mentions on social networks and blogs.
-
scotty
Haskell web framework inspired by Ruby's Sinatra, using WAI and Warp (Official Repository) -
yesod-persistent
A RESTful Haskell web framework built on WAI. -
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. -
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. -
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) -
espial
Espial is an open-source, web-based bookmarking server. -
airship
Helium + Webmachine = Airship. A toolkit for building declarative, RESTful web apps. -
haskell-kubernetes
Haskell bindings to the Kubernetes API (via swagger-codegen) -
apecs-gloss
a fast, extensible, type driven Haskell ECS framework for games -
scalpel-core
A high level web scraping library for Haskell. -
digestive-functors
A general way to consume input using applicative functors -
hbro
[Unmaintained] A minimal web-browser written and configured in Haskell. -
hamlet
Haml-like template files that are compile-time checked -
servant-elm
Automatically derive Elm functions to query servant webservices -
tagsoup
Haskell library for parsing and extracting information from (possibly malformed) HTML/XML documents -
kubernetes-client-core
Haskell client for the kubernetes API. A work in progress. -
backprop
Heterogeneous automatic differentiation ("backpropagation") in Haskell -
engine-io
A Haskell server implementation of the Engine.IO and Socket.IO (1.0) protocols -
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 -
android-lint-summary
Prettier display of Android Lint issues
Access the most powerful time series database as a service
* 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 microformats2-parser or a related project?
README
microformats2-parser
Microformats 2 parser for Haskell! #IndieWeb
Originally created for sweetroll.
- parses
items
,rels
,rel-urls
- resolves relative URLs (with support for the
<base>
tag), including inside ofhtml
fore-*
properties - parses the value-class-pattern, including date and time normalization
- handles malformed HTML (the actual HTML parser is tagstream-conduit)
- also can convert to JF2
- high performance
- extensively tested
Also check out http-link-header because you often need to read links from the Link header!
DEMO PAGE
Usage
Look at the API docs on Hackage for more info, here's a quick overview:
{-# LANGUAGE OverloadedStrings #-}
import Data.Microformats2.Parser
import Data.Default
import Network.URI
parseMf2 def $ documentRoot $ parseLBS "<body><p class=h-entry><h1 class=p-name>Yay!</h1></p></body>"
parseMf2 (def { baseUri = parseURI "https://where.i.got/that/page/from/" }) $ documentRoot $ parseLBS "<body><base href=\"base/\"><link rel=micropub href='micropub'><p class=h-entry><h1 class=p-name>Yay!</h1></p></body>"
The def
is the default configuration.
The configuration includes:
htmlMode
, an HTML parsing mode (Unsafe
|Escape
|Sanitize
)baseUri
, theMaybe URI
that represents the address you retrieved the HTML from, used for resolving relative addresses -- you should set it
parseMf2
will return an Aeson Value structured like canonical microformats2 JSON.
lens-aeson is a good way to navigate it.
Development
Use stack to build.
Use ghci to run tests quickly with :test
(see the .ghci
file).
$ stack build
$ stack test
$ stack ghci
Contributing
Please feel free to submit pull requests!
By participating in this project you agree to follow the Contributor Code of Conduct and to release your contributions under the Unlicense.
The list of contributors is available on GitHub.
License
This is free and unencumbered software released into the public domain.
For more information, please refer to the UNLICENSE
file or unlicense.org.
*Note that all licence references and agreements mentioned in the microformats2-parser README section above
are relevant to that project's source code only.