Schlagwort: Microformats

Mikroformate sind ein Markup-Format zur semantischen Annotation von HTML oder XHTML. Mikroformat-Annotationen können leicht aus Webseiten extrahiert werden und machen weiteren Programmen (etwa Suchmaschinen) die Bedeutung des Seiteninhalts verständlich.

  • vCard Explorer

    Der vCard Explorer ist ein kleines Tool (leider nur für den Mac) zum Anzeigen von vCards und hCards, ohne sie direkt in das Adressbuch importieren zu müssen.

    Weitere Features:

    • Durchsuchen der aktuell geöffneten URL in Safari nach einer hCard
    • Kein Importieren der vCards in das Adressbuch nötig für die Darstellung.
    • Anzeigen der Adresse in Google maps
    • Importmöglichkeiten von vCard und hCard in das Apple Adressbuch

    Einige Screenshots und einen Screencast findet man auf der offiziellen Homepage.

    2 Kommentare zu vCard Explorer
  • microJSON ist ein Projekt von Jon Sykes und Jim Barraud. Es geht darum, Microformats in Form der JSON Schreibweise darzustellen. Die Idee von JSON ist, einen einfachen Datenaustausch von Objekten oder auch anderen Datenstrukturen wie z.B. Arrays zwischen Client Systemen (z.B. dem WebBrowser) und Server Systemen zu realisieren. Der Vorteil von JSON ist, dass sie kaum Overhead produziert und in JavaScript über die eval() Funktion wieder ganz einfach in ein Objekt gewandelt werden kann.

    Beipiel einer hCard:

    <div id="hcard-given-middle-family" class="vcard">
      <span class="fn n">
        <span class="given-name">given</span>
        <span class="additional-name">middle</span>
        <span class="family-name">family</span>
      </span>
      <div class="org">org</div>
      <a class="email" href="mailto:email">email</a>
      <div class="adr">
        <div class="street-address">street</div>
        <span class="locality">city</span>,<span class="region">state/province</span>,<span class="postal-code">postal</span>
        <span class="country-name">country</span>
      </div>
      <div class="tel">phone</div>
      <a class="url" href="aim:goim?screenname=AIM">AIM</a>
      <a class="url" href="ymsgr:sendIM?YIM">YIM</a>
    </div>Code-Sprache: HTML, XML (xml)

    Die gleiche hCard als jCard:

    {
    "vcard":{
      "name":{
        "given":"John",
        "additional":"Paul",
        "family":"Smith"
      },
      "org":"Company Corp",
      "email":"john@companycorp.com",
      "address":{
        "street":"50 Main Street",
        "locality":"Cityville",
        "region":"Stateshire",
        "postalCode":"1234abc",
        "country":"Someplace"
      },
      "tel":"111-222-333",
      "aim":"johnsmith",
      "yim":"smithjohn"
    }Code-Sprache: JSON / JSON mit Kommentaren (json)

    Neben den Abbildungen der Microformats hCard (jCard) und hCalendar (jCalendar) sind auch die Format jAtom, jResume, jReview, jAtom und jResume geplant. Weitere abbildung gibt es für normale Formulare (jForm), sowie auch für RSS Feeds (jRSS).

    MicroJSON sind meiner Meinung nach eine sehr gute Idee, wenn man Bedenkt dass viele gute Microformats Parser, wie z.B. der vom Firefox Addon Operator verwendete ufParser, auf JavaScript basiert.

    5 Kommentare zu microJSON – Microformats in JSON
  • Planet Mikroformate hat ein kleines Simplepie Update (auf Version 1.01) bekommen und sollte jetzt wieder stabil laufen. Falls jemand doch einen entdeckt, freue ich mich über Feedback.

    Keine Kommentare zu Planet Mikroformate Update
  • Das Microformats Bookmarklet von Leftlogic funktioniert jetzt auch mit dem Internet Explorer:

    […] you can now use the Microformats bookmarklet in IE6 and IE7 as you would in Safari and Firefox. #

    [via pierro]

    Keine Kommentare zu Microformats Bookmarklet für den IE
  • bioformats

    Modern biological research is reliant on the data and tools made available on the web. However, even as the volume of biological data grows, and as new tools arrive to accommodate this growth, putting them to work is not straightforward. Cut and paste, screen scrapers and custom parsers are all common place. Microformats offer an alternative. 

    #

    Bioformats sind Mikroformate um biologische Daten abzubilden. Es gibt schon ein paar Working Drafts für Proteine, Gene und Abläufe, wobei bisher nur die hGenes ausformuliert wurden.

    Ein hGene könnte wie folgt aussehen:

    <div class='hgene'>
      <span class='name'>BRCA2</span>
      <p class='description'>
        Breast cancer type 2 susceptibility protein 
        (Fanconi anemia group D1 protein)	
      </p>
      <ul>
        <li>Genbank: <a href='genbank.pl?U43746' class='ident' rel='genbank'>U43746</a></li>
        <li>Entrez: <a href='entrez.pl?675' class='ident' rel='entrez'>675</a></li>
        <li>Location: <a href='lookup.pl?675' class='location' rel='homo_sapiens'>13:31787611-31871347</a></li>	  
      </ul>
    </div>Code-Sprache: HTML, XML (xml)

    Witzige Idee… vor allem das Logo!

    Mal schauen was neben Microformats, Nanoformats, Picoformats und jetzt auch Bioformats noch so alles entsteht.

    Keine Kommentare zu bioformats: microformats for biology
  • Carnival ist ein Microformats Plugin für den Safari, er unterstützt bis jetzt zwar nur das hCard Format, aber es ist zumindest mal ein Anfang.

    Carnival: microformats for Safari

    Anwendung:

    • runterladen
    • ausführen
    • wenn eine Seite hCards enthält, leuchtet das Microformats Logo grün…

    Beim Beenden ist es ganz wichtig zuerst Carnival und dann Safari zu beenden, sonst öffnet sich Safari ständig wieder neu.

    1 Kommentar zu Microformats Plugin für Safari
  • Die zwei Jungs von wevent haben mal wieder tolle Arbeit geleistet. Nach dem „Freundesnetzwerk-Import“ über das hCard Microformat haben sie das ganze in Windeseile auch noch für Events umgesetzt. Über „Events Importieren“ ist es möglich mit hCalendar ausgezeichnete Events in wevent zu importieren. Einen sehr schönen und ausführlichen Bericht über das neue Feature findet ihr auf Dennis‘ Weblog.

    Und damit ich mich etwas von der Thesis ablenken kann 😉 habe ich die ganzen Neuerungen natürlich sofort das wevent Operator Script angepasst. Die neue Version gibts unter hier.

    Übrigens will sich wevent umbenennen und zahlt 500 € für die beste Idee!

    1 Kommentar zu Microformats Killerapplikation: wevent
  • Seit dem 21. August steht die Finale Version (Version 0.8) des Firefox Operator Plugins bei addons.mozilla.org zum Download zur Verfügung.

    Features von Operator 0.8:

    • RDFa support (courtesy of Elias Torres)
    • eRDF support (courtesy of Keith Alexander)
    • New user interface elements, including an icon on the location bar as well as a sidebar
    • New preferences including auto-hiding the toolbar
    • The address microformats has been split out so that actions can be more granular
    • Actions can now be associated with multiple types of data, so the Google Maps action, for instance, works with Addresses and Locations
    • Much better support for frames and iframes
    • Support for non HTML documents
    • When debugging microformats, Operator connects to Brian Suda’s X2V behind the scenes so you can compare results
    • Lots of bug fixes

    Außerdem gibt es unter mozillalinks.org ein Interview mit dem Operator Entwickler Michael Kaply über die Microformats implementierung in Firefox 3.

    Keine Kommentare zu Operator 0.8 Final
  • Neben den Planeten planetmicroformats.com und planetmikroformate.de gibt es jetzt noch einen britischen Microformats Aggregator: microformats.co.uk.

    Bisher ist das ganze noch etwas spartanisch, aber mal schaun was sich demnächst noch so alles tut.

    2 Kommentare zu Britischer Micro-Kosmos
  • Here are some code snippets to use the gorgeous X2V microformats XSLT files from Brian Suda with PHP 5 and libxslt (PHP 5 includes the XSL extension by default).

    hCard to vCard:

    To parse a XML or XHTML document, it has to be valid. To tidy the XML file, you can use a service from the W3C:

    $xml_string_tidy = file_get_contents("http://cgi.w3.org/cgi-bin/tidy?docAddr=".urlencode($uri));Code-Sprache: PHP (php)

    Then you have to create the HTML DOM…

    @$document = new DOMDocument();
    @$document->loadHTML($xml_string_tidy);Code-Sprache: PHP (php)

    and the XSLT DOM…

    $stylesheet = new DOMDocument();
    $stylesheet->load('hcard2vcard.xsl');Code-Sprache: PHP (php)

    Create a new XSLT Processor, load the Stylesheet…

    $processor = new XsltProcessor();
    $processor->importStylesheet($stylesheet);Code-Sprache: PHP (php)

    and run the transformation.

    $result = $processor->transformToDoc($document);
    $str = $result->saveXML();Code-Sprache: PHP (php)

    Now $str contains the transformed code.
    To send the vCard header with PHP, try

    header("Content-Disposition: attachment; filename=contact.vcf");
    header("Content-Type: text/x-vcard; charset=UTF-8 name=contact.vcf");
    echo $str;Code-Sprache: PHP (php)

    If you want to use the vCard extension .vcf instead of .php you have to add something like that to your .htaccess file

    RewriteEngine On
    RewriteBase /
    RewriteRule ^contact.vcf /hcard2vcard.php [L,QSA]

    I hope it works 🙂

    4 Kommentare zu X2V with PHP 5