[libvirt] [PATCH v2 2/3] NEWS: Reformat at generation time

Martin Kletzander mkletzan at redhat.com
Thu Jan 5 14:59:10 UTC 2017


On Thu, Jan 05, 2017 at 02:54:28PM +0000, Daniel P. Berrange wrote:
>On Thu, Jan 05, 2017 at 03:34:36PM +0100, Andrea Bolognani wrote:
>> Instead of encoding formatting information inside the
>> corresponding XSLT stylesheet, use a Python script to reformat
>> the text appropriately based on a few simple markers.
>>
>> Splitting the task between the XSLT stylesheet and the Python
>> script allows us to keep both parts very simple.
>
>It is easy enough todo the right line wrapping & indent in the
>XSLT straight away avoiding this two pass system. We had this
>exact same need for the template that converts security notices
>from XML to plain text.
>
>Just copy the "wrap-string" template from this file:
>
>  http://libvirt.org/git/?p=libvirt-security-notice.git;a=blob;f=templates/lsn2text.xsl;hb=HEAD
>

Uh, so *THIS* is the thing we were looking for.  What a discussion we
could've saved.

>and call it anywhere you need todo wrapping from
>
>This avoids the need to rely on magic markers being the in
>intermediate text file, which could get mis-interpreted
>depending on what people write in the release notes.
>
>Regards,
>Daniel
>--
>|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
>|: http://libvirt.org              -o-             http://virt-manager.org :|
>|: http://entangle-photo.org       -o-    http://search.cpan.org/~danberr/ :|
>
>--
>libvir-list mailing list
>libvir-list at redhat.com
>https://www.redhat.com/mailman/listinfo/libvir-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20170105/8fa364e8/attachment-0001.sig>


More information about the libvir-list mailing list