[Sugar-devel] A small request.

Bernie Innocenti bernie at laptop.org
Mon Feb 2 07:11:13 EST 2009


Bernie Innocenti wrote:
> Another issue is how we integrate the updater with addons.sl.o.
> Because the OLPC microformat is trivial, it might be easy to modify
> the remora's html output to be compatible with it.  Mick, Tomeu and
> David, who have had a closer look at the code, might want to comment.

If you have no idea what this "OLPC microformat" is, here's the
format specification as was originally documented by C.Scott.

-----cut-----
"""Activity information microformat parser.

Activity information is embedded in HTML/XHTML/XML pages using a
semantic `microformat <http://microformats.org/>`_.  The following
CSS rules pull out the desired information.

Repository/group information for related activities is denoted by the
`CSS <http://www.w3.org/Style/CSS/>`_ selector::

  #olpc-activity-group-name

which provides a "short name" for the group, and::

  #olpc-activity-group-desc

which provides a slightly longer description.  As indicated by the fact
that these are matches on the 'id' attribute, they should match exactly
once.  These attributes are optional, and are not expected to be included
in pages describing updates for an individual activity. 

Each block of activity information is denoted by the selector::

  .olpc-activity-info

All information within that block describes a single available
version of an activity, so the following selectors should match
at most once within the block.

The activity id, which should be unique among all activities, is denoted
by the contents of the element identified by the selector::

  .olpc-activity-info .olpc-activity-id

The version number is denoted by the contents of the element identified by
the selector::

  .olpc-activity-info .olpc-activity-version

The version URL is denoted by the contents of the href attribute of the
element identified by the selector::

  .olpc-activity-info .olpc-activity-url *[href]

An example::

  <table class="olpc-activity-info">
  <tr>
  <td>Browse</td>
  <td class="olpc-activity-id"
      style="display:none;">org.laptop.WebActivity</td>
  <td class="olpc-activity-version">54</td>
  <td class="olpc-activity-url"><a href="Browse-54.xo">download!</a></td>
  </td>
  </table>
-----cut-----


-- 
   // Bernie Innocenti - http://www.codewiz.org/
 \X/  Sugar Labs       - http://www.sugarlabs.org/


More information about the Sugar-devel mailing list