[packagekit] RFC: Markup format

Richard Hughes hughsient at gmail.com
Wed Dec 17 08:23:46 PST 2008


At the moment we expect the backend to send the daemon "raw text" and
for the front-end to do something sensible which involves munging
character sequences without breaking things. There's no encoding
specified, nor is it common between gpk-application, gpk-update-viewer,
or KPackageKit. It sucks.

One place where we might want a little bit more cleverness is for the
update or package descriptions. These sometimes need bold text, links,
or bulletted lists. Example screenshot attached.

Now, I think it's pretty insane for the engine or backend to try to
parse the update data into some sort of XML, but I do think we can be a
little clever and at least provide a way for the text to look pretty for
the end users.

I propose we use a loose markdown [1] syntax, as it's probably exactly
what we are using already. You can do *italic*, **bold**, # headers,
proper rules (---) and normal:
* list
* items

You can also do links, and other cool stuff, but for now I want to stay
on the "pretty" side.

For instance, the following text:

---------------------------------------
This is a **critical** update for cups.
The following files were deemed to have
a security vulnerability:
* All the libraries
* Files in `src`

The update was describes as good "security"
by most distributions.
---------------------------------------

would be rendered as:
---------------------------------------
This is a <b>critical</b> update for cups. The following files were deemed to have a security vulnerability:
• All the libraries
• Files in <tt>src</tt>

The update was described as good “security” by most distributions.
---------------------------------------

The paragraph expansion was done automatically, which allows word-wrap
to wrap the text depending on the window width.

NOTE: you don't have to use 'markdown syntax', the front-end tools will
just display your text without any special formatting in that regard.

Richard.

[1] http://en.wikipedia.org/wiki/Markdown
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pk-markdown.png
Type: image/png
Size: 23864 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/packagekit/attachments/20081217/dbbd799b/attachment-0004.png>


More information about the PackageKit mailing list