[packagekit] RFC: Markup format

Trever Fischer wm161 at wm161.net
Wed Dec 17 13:57:20 PST 2008


On Wednesday 17 December 2008 11:23:46 am Richard Hughes wrote:
> 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,
or italic /slashies/ as well.
> 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.
>
This sounds like a really neat and straightforward idea. You got my vote. 
However, what if someone doesn't want the formatting applied in their 
description? I can't really think of an instance where someone would want 
this, except if they were using /italic slashies/ and had a filesystem path in 
there. It probably wouldn't, however, take a lot of smartiness to see that 
someone means /usr/lib instead of <i>usr</i>lib.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/packagekit/attachments/20081217/3dc709cc/attachment-0004.pgp>


More information about the PackageKit mailing list