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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

Attachment: signature.asc
Description: Digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux