Activity microformat: Difference between revisions
(Link to another example of an activity information page.) |
(Clarify that group information is optional.) |
||
Line 17: | Line 17: | ||
which provides a slightly longer description. As indicated by the fact |
which provides a slightly longer description. As indicated by the fact |
||
that these are matches on the 'id' attribute, they should match exactly |
that these are matches on the 'id' attribute, they should match exactly |
||
once. These attributes are optional, and are not expected to be included |
|||
once. |
|||
in pages describing updates for an individual activity. |
|||
Each block of activity information is denoted by the selector: |
Each block of activity information is denoted by the selector: |
Revision as of 14:54, 12 August 2008
The definitive source for this document is the documentation for the 'bitfrost.update.microformat' package, which can be found at http://dev.laptop.org/git?p=users/cscott/sugar-update-control;a=blob;f=bitfrost/update/microformat.py and by running pydoc bitfrost.update.microformat
on an XO.
Activity information is embedded in HTML/XHTML/XML pages using a semantic microformat. The following CSS rules pull out the desired information.
Repository/group information for related activities is denoted by the 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>
Another example can be found at: http://dev.laptop.org/~cscott/bundles/firefox.html