indieweb-algorithms: A collection of implementations of IndieWeb algorithms.

[ library, public-domain, web ] [ Propose Tags ]


[Last Documentation]

  • Data
    • IndieWeb
      • Data.IndieWeb.Authorship
      • Data.IndieWeb.Endpoints
      • Data.IndieWeb.MicroformatsToAtom
      • Data.IndieWeb.MicroformatsUtil
      • Data.IndieWeb.SiloToMicroformats


Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


  • No Candidates
Versions [RSS] 0.1.0, 0.1.1
Dependencies aeson, base (>= && <5), bytestring, containers, data-default, either, errors, http-link-header (>=1.2.0), lens, lens-aeson, microformats2-parser, network-uri, safe, text, time, transformers, unordered-containers, vector, xml-conduit, xml-conduit-writer, xml-lens (>=0.2) [details]
License LicenseRef-PublicDomain
Copyright 2015-2017 Val Packett <>
Author Val Packett
Category Web
Home page
Bug tracker
Source repo head: git clone
Uploaded by valpackett at 2022-10-18T20:00:27Z
Distributions NixOS:0.1.1
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 822 total (4 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
All reported builds failed as of 2022-10-18 [all 2 reports]

Readme for indieweb-algorithms-0.1.1

[back to package description]

indieweb-algorithms Hackage unlicense

A collection of implementations of IndieWeb- and Microformats 2-related algorithms (based on microformats2-parser and http-link-header):

  • finding all microformats of a given type (while retaining the path to them), ie. flattening the tree
  • discovering authorship of an h-entry
  • discovering Webmention/Micropub/IndieAuth/etc. endpoints (HTTP Link header, a and link tags with the rel attribute)
  • parsing tweets on into microformats (like php-mf2-shim)
  • detecting post types
  • converting microformats to Atom feeds



{-# LANGUAGE OverloadedStrings #-}

import Network.HTTP.Link
import Data.Default
import Data.Maybe
import Data.Microformats2.Parser
import Data.IndieWeb.Endpoints

discoverEndpoints [ "micropub" ] (parseMf2 def $ documentRoot $ parseLBS "<link rel=micropub href=''>...") (fromMaybe [] $ parseLinkHeader "<>; rel=\"micropub\"")


Use stack to build.
Use ghci to run tests quickly with :test (see the .ghci file).

$ stack build

$ stack test

$ stack ghci


This is free and unencumbered software released into the public domain.
For more information, please refer to the UNLICENSE file or