parsers: Difference between revisions

From Microformats Wiki
Jump to navigation Jump to search
m (→‎HTML::Microformats: add link to release announcement)
 
(52 intermediate revisions by 20 users not shown)
Line 1: Line 1:
<entry-title>Microformats Parsers</entry-title>
{{DISPLAYTITLE:Microformats Parsers}}
;shortlinks
;shortlink
:http://ufs.cc/w/parsers (preferred)
:http://ufs.cc/w/ufprs
:http://tr.im/ufprs
This page lists libraries that consume, transform or convert microformats. This is only a partial list. If you know of other such tools for microformats, please add them and list what specific microformats they support. There is a separate page for [[validators]].
This page lists libraries that consume, transform or convert microformats. This is only a partial list. If you know of other such tools for microformats, please add them and list what specific microformats they support.


Alphabetical listing by programming language:
Alphabetical listing by programming language:


== .Net ==
= microformats2 parsers =
[http://ufxtract.com/ UfXtract] is an open source .Net microformats parser. It can parse microformats from URLs or HTML strings. The extracted data can be used directly in .Net or converted into JSON, JSON-P or XML. Currently Supports 16 microformats and can easily be extended with new definitions.
{{main|microformats2#Parsers}}
 
These are modern and maintained [[microformats2]] parsers and are suitable for use in modern web applications.
 
== Elixir ==
* [https://github.com/ckruse/microformats2-elixir ckruse/microformats2-elixir] - Elixir microformats2 parser
 
== Go ==
* [https://github.com/willnorris/microformats willnorris/microformats] (active fork of Andy Leap's [https://github.com/andyleap/microformats original library]) - Go microformats v1 and v2 parser
** live textarea entry: https://go.microformats.io
 
== Haskell ==
* [https://github.com/myfreeweb/microformats2-parser myfreeweb/microformats2-parser] - Haskell microformats2 parser
** live textarea entry: https://unrelenting.technology/mf2/


== Java ==
== Java ==
* [http://code.google.com/p/any23/ Any23 (Anything to Triples)] parses microformats into RDF triples
* [[any23]] Apache Any23 (Anything to Triples)] a library, a web service and a command line tool that extracts structured data in RDF format from a variety of Web documents: http://any23.apache.org
* [http://zwitserloot.com/org.microformats.hCard/ org.microformats.hCard] by Reinier Zwitserloot
* [https://github.com/kylewm/mf2j mf2j] - An early-stage Java microformats2 parser
* live: https://mf2j.herokuapp.com/?url={http://example.com}


== Javascript ==
== Javascript ==
=== microformats-parser ===
* '''microformats-parser''' for both browser and node.js
** github open source: https://github.com/microformats/microformats-parser
** live: https://microformats.github.io/microformats-parser/
=== Microformat Node ===
* [http://github.com/microformats/microformat-node microformat-node] microformat-node is a microformat parser for node.js. It is built using a well tested JavaScript parsing engine which already powers a number of browser extensions. Supports microformat v1 and v2. <!-- Dead link as of 2020, need a new deployment & maintainer: Try it out at http://glennjones.net/tools/microformats/ -->
<!-- Dead links as of 2020, need a new deployment & maintainer:
=== Microformat Shiv ===
=== Microformat Shiv ===
* [http://microformatshiv.com/ Microformat Shiv] The microformat shiv provides a simple to use, light-weight, cross-browser microformat API. It even works with modern mobile browsers and is backward compatible with Internet Explore 6. Based on the microformat API for Mozilla's extensions. This is the same code base as the popular Operater plug-in.
* [http://microformatshiv.com/ Microformat Shiv] The microformat shiv provides a simple to use JavaScript microformats parsing library. It can also be used in browser extensions and the web site has example code for Chrome, Firefox and Opera. Try it out http://microformatshiv.com/editor.html
-->
 
== PHP ==
=== php-mf2 ===
* PHP generic microformats2 parser
** source: https://github.com/indieweb/php-mf2
 
== Ruby ==
* '''G5/microformats2''' Ruby microformats2 parser
** github open source: https://github.com/G5/microformats2
 
== Python ==
* [[mf2py]]
** on PyPI: [https://pypi.python.org/pypi/mf2py/]
** source: [https://github.com/tommorris/mf2py github.com/tommorris/mf2py]
 
= past parsers =
These are past parsers of classic microformats some of which have not been maintained.
 
They may be useful as starting points for developing additional microformats2 parsers.
 
== .Net ==
[http://ufxtract.com/ UfXtract] is an open source .Net microformats parser. It can parse microformats from URLs or HTML strings. The extracted data can be used directly in .Net or converted into JSON, JSON-P or XML. Currently Supports 16 microformats and can easily be extended with new definitions.
 
== More Java ==
 
* [http://zwitserloot.com/org.microformats.hCard/ org.microformats.hCard] by Reinier Zwitserloot


== More Javascript ==
=== Sumo ===
=== Sumo ===
* [http://www.danwebb.net/2007/2/9/sumo-a-generic-microformats-parser-for-javascript Sumo! A Generic Microformats Parser For JavaScript]
* [http://www.danwebb.net/2007/2/9/sumo-a-generic-microformats-parser-for-javascript Sumo! A Generic Microformats Parser For JavaScript]
Line 28: Line 78:
=== HTML::Microformats ===
=== HTML::Microformats ===
Perhaps we can capture and update this info on a page like [[perl-html-microformats-parser]].
Perhaps we can capture and update this info on a page like [[perl-html-microformats-parser]].
* [http://search.cpan.org/~tobyink/HTML-Microformats/ HTML::Microformats] is a CPAN module that has support for:  
[http://search.cpan.org/~tobyink/HTML-Microformats/ HTML::Microformats] is a CPAN module that has support for:
* input:
** rel: [[rel-enclosure]], [[rel-license]], [[rel-tag]], [[VoteLinks]], [[XFN]].
** rel: [[rel-enclosure]], [[rel-license]], [[rel-tag]], [[VoteLinks]], [[XFN]].
** class: [[adr]], [[figure]], [[geo]], [[hAtom]], [[hAudio]], [[User:TobyInk/hcalendar-1.1|hCalendar]], [[hCard]], [[hListing]], [[hNews]], [[hProduct]], [[hRecipe]], [[hResume]], [[hReview]], [[hReview-aggregate]], [[xFolk]], [[XMDP]], [[XOXO]].
** class: [[adr]], [[figure]], [[geo]], [[hAtom]], [[hAudio]], [[User:TobyInk/hcalendar-1.1|hCalendar]], [[hCard]], [[hListing]], [[hNews]], [[hProduct]], [[hRecipe]], [[hResume]], [[hReview]], [[hReview-aggregate]], [[xFolk]], [[XMDP]], [[XOXO]].
*** highly experimental: [[measure]], [[species]].
*** highly experimental: [[measure]], [[species]].
** poshformats: [http://ocoins.info/ OpenURL COinS].
** poshformats: [http://ocoins.info/ OpenURL COinS].
** By [[User:TobyInk|Toby Inkster]].
* output:
** RDF: RDF/XML, Turtle, N-Triples, RDF/JSON, etc.
** JSON
** domain specific: vCard (3.0, 4.0 and XML), iCalendar, Atom, KML.
* By [[User:TobyInk|Toby Inkster]].


Versions and releases notes:
Versions and releases notes:
* 2011-02-05 [http://microformats.org/discuss/mail/microformats-dev/2011-February/000667.html 0.102]
* 2010-12-22 0.101
* 2010-12-16 [http://microformats.org/discuss/mail/microformats-discuss/2010-December/013363.html 0.100]
* 2010-12-16 [http://microformats.org/discuss/mail/microformats-discuss/2010-December/013363.html 0.100]
* 2010-10-18 0.00_13
* 2010-10-18 0.00_13
Line 66: Line 123:
** [[hCard]], [[hCalendar]], [[rel-tag]]
** [[hCard]], [[hCalendar]], [[rel-tag]]


== PHP ==
== More PHP ==
=== XMFP ===
=== XMFP ===
<span id="xmfp">[http://code.google.com/p/xmfp/ XMFP]</span> (eXtensible MicroFormats Parser for PHP 5) by [http://www.metonymie.com Emiliano Martínez Luque] is a set of PHP 5 classes providing a simple API for extracting Microformated Content either from a URI or a String representing HTML/XML. It can return the results as a PHP associative array, a JSON definition or an XML representation of the data. It supports most of the currently accepted microformats and can be easily extended to add new ones, it also has full support of the include pattern and provides basic validation of microformated data.
<span id="xmfp">[http://code.google.com/p/xmfp/ XMFP]</span> (eXtensible MicroFormats Parser for PHP 5) by [http://www.metonymie.com Emiliano Martínez Luque] is a set of PHP 5 classes providing a simple API for extracting Microformated Content either from a URI or a String representing HTML/XML. It can return the results as a PHP associative array, a JSON definition or an XML representation of the data. It supports most of the currently accepted microformats and can be easily extended to add new ones, it also has full support of the include pattern and provides basic validation of microformated data.
Line 91: Line 148:


===Microtron===
===Microtron===
* [[Microtron]] is intended to be a general-purpose microformat parser/transformer.   
{{main|Microtron}}
* [[Microtron]] is a general-purpose microformat parser/transformer.   


It can operate on the definition file included in [[Optimus]], making it a close replacement for certain tasks, and can easily be extended with new formats without modifying the source.  The primary advantages are speed (> 100x faster that [[Optimus]] for some operations), simplicity (single file) and small code size (currently < 150 lines).
It can operate on the definition file included in [[Optimus]], making it a close replacement for certain tasks, and can easily be extended with new formats without modifying the source.  The primary advantages are speed (> 100x faster that [[Optimus]] for some operations), simplicity (single file) and small code size (currently < 150 lines).


== Ruby ==
=== python-hcalendar ===
[http://pypi.python.org/pypi/python-hcalendar/0.1dev python-hcalendar] is a basic hCalendar parser.
 
== More Ruby ==
===Prism ===
===Prism ===
* [[Prism]]
* [[Prism]]
Line 131: Line 192:
* [[implementations]]
* [[implementations]]
* [[implementors]]
* [[implementors]]
* [[open-source]]
* [[user-interface]]
* [[user-interface]]
* [[open-source]]
* [[validators]]

Latest revision as of 08:44, 14 September 2023

shortlink
http://ufs.cc/w/ufprs

This page lists libraries that consume, transform or convert microformats. This is only a partial list. If you know of other such tools for microformats, please add them and list what specific microformats they support. There is a separate page for validators.

Alphabetical listing by programming language:

microformats2 parsers

Main article: microformats2#Parsers

These are modern and maintained microformats2 parsers and are suitable for use in modern web applications.

Elixir

Go

Haskell

Java

Javascript

microformats-parser

Microformat Node

  • microformat-node microformat-node is a microformat parser for node.js. It is built using a well tested JavaScript parsing engine which already powers a number of browser extensions. Supports microformat v1 and v2.


PHP

php-mf2

Ruby

Python

past parsers

These are past parsers of classic microformats some of which have not been maintained.

They may be useful as starting points for developing additional microformats2 parsers.

.Net

UfXtract is an open source .Net microformats parser. It can parse microformats from URLs or HTML strings. The extracted data can be used directly in .Net or converted into JSON, JSON-P or XML. Currently Supports 16 microformats and can easily be extended with new definitions.

More Java

More Javascript

Sumo

Perl

Data::Microformat

  • Data::Microformat is a CPAN module to parse and create hCard, adr, and geo.
    • By Brendan O'Connor / Six Apart

HTML::Microformats

Perhaps we can capture and update this info on a page like perl-html-microformats-parser. HTML::Microformats is a CPAN module that has support for:

Versions and releases notes:

  • 2011-02-05 0.102
  • 2010-12-22 0.101
  • 2010-12-16 0.100
  • 2010-10-18 0.00_13
  • 2010-06-25 0.00_12
  • 2010-06-23 0.00_11
  • 2010-05-13 0.00_10
  • 2010-05-12 0.00_09
  • 2010-04-29 0.00_08
  • 2010-04-28 0.00_07
  • 2010-04-16 0.00_06
  • 2010-04-16 0.00_05
  • 2010-03-20 0.00_04
  • 2010-03-09 0.00_03
  • 2010-02-28 0.00_02
  • 2010-02-24 0.00_01
  • 2010-02-20 0.00_00
  • see also the "Changes" file included in the CPAN distribution.

XML::Atom::Microformats

XML::Atom::Microformats provides the same functionality for Atom. It finds microformats in Atom entry content elements.

Swignition

  • Swignition is a parser for both “upper case Semantic Web” (RDF, RDFa) and “lower case semantic web” (microformats) technologies. It includes modules for exporting parsed data in a variety of formats, including RDF, vCard, iCalendar, Atom and KML.
    • By Toby Inkster
    • Active development has moved to HTML::Microformats (see above).

Text::Microformat

More PHP

XMFP

XMFP (eXtensible MicroFormats Parser for PHP 5) by Emiliano Martínez Luque is a set of PHP 5 classes providing a simple API for extracting Microformated Content either from a URI or a String representing HTML/XML. It can return the results as a PHP associative array, a JSON definition or an XML representation of the data. It supports most of the currently accepted microformats and can be easily extended to add new ones, it also has full support of the include pattern and provides basic validation of microformated data.

hKit Microformats Toolkit for PHP5

hKit Microformats Toolkit for PHP5 as announced by Drew McLellan. See also hKit on this wiki.

PHP Microformats parser

Microformats parser is a PHP package for extracting the microformats data embedded into HTML. The gathered data is stored as an xArray of objects - one for each microformat type container found. Announcement. The parser supports most of the hCard (missing SOUND), hCalendar, hReview (missing item info; spec really needs some clarification) and rel elements, according to their respective specification on microformats Wiki.

Transformr

A Simple set of XSLT and PHP tools for Transforming Microformats Source available from github Live webservice available at microform.at.

hCard Validator

Source code of the hCard Validator contains XSLT and PHP code for hCard and include microformats.

ARC2

ARC2 is a semantic web toolkit which includes support for hCard, adr, geo, XFN, hCalendar, hAtom, hResume, hReview, xFolk, rel-license and rel-tag. It's tri-licensed under the GPL 2 and 3, and the W3C Software licence.

Python

AUMP

  • AUMP is a parser written by David Janes. It supports hCard, hCalendar, hAtom, hReview and hListing.

Microtron

Main article: Microtron
  • Microtron is a general-purpose microformat parser/transformer.

It can operate on the definition file included in Optimus, making it a close replacement for certain tasks, and can easily be extended with new formats without modifying the source. The primary advantages are speed (> 100x faster that Optimus for some operations), simplicity (single file) and small code size (currently < 150 lines).

python-hcalendar

python-hcalendar is a basic hCalendar parser.

More Ruby

Prism

  • Prism
    • by Mark Wunsch
    • Library and command line tool for parsing POSH/Microformats
    • Uses the Nokogiri HTML, XML, SAX, and Reader parser

mofo ruby microformats parser

Microformat Parser for Ruby

uformats

scrAPI

XSLT

Optimus

  • Optimus is open source XSLT that parses microformats, converts them into JSON or XML, and validates them too.

X2V

editing this page

For now, this page copies (rather than moves) information from the existing Implementations page.

see also