From nobody Sat Apr 20 07:06:53 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1555331500; cv=none; d=zoho.com; s=zohoarc; b=Kol0gS1iWbp5kcaQf6jFzxpZd28o5zPNPttU7ATgTeCE0yi+LtGhlp9ZGiVr8u39yvCmZmg+ICTkd3wrob7im0YFezsACT7zUifRLqrEt6c6aimxFwp2tDhLKDWpRnIkK+t1Hovoan/jnMzPkateZAlh163ovccunf/qVj2Xvks= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1555331500; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=UJQoofageV30uZkwnDjlecomI26KQEENhM4Hn77jN3c=; b=QYfve2WGh1CEixrd8Q5lhl0Cq1znCP4y+S0FWkueqy5wOnI5sBIoJ08bqQpn3Mo2looc4KA1ODqOknGAac0FtcEEa5ko0VLVhGUrzam7fY7HvA2vROHRfOxxKm+rUfgg/bhn0ZyPVV91a95IKRdYv/AO4Obvy9LzzNuggkyxuGY= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1555331500007824.4658899320914; Mon, 15 Apr 2019 05:31:40 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C194B87621; Mon, 15 Apr 2019 12:31:37 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 82CC11001E84; Mon, 15 Apr 2019 12:31:37 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 23A7B181AC45; Mon, 15 Apr 2019 12:31:33 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x3FCVPjf024677 for ; Mon, 15 Apr 2019 08:31:25 -0400 Received: by smtp.corp.redhat.com (Postfix) id 2ABEC5C223; Mon, 15 Apr 2019 12:31:25 +0000 (UTC) Received: from kinshicho.redhat.com (ovpn-204-220.brq.redhat.com [10.40.204.220]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E35E55C1B4; Mon, 15 Apr 2019 12:31:23 +0000 (UTC) From: Andrea Bolognani To: libvir-list@redhat.com Date: Mon, 15 Apr 2019 14:31:11 +0200 Message-Id: <20190415123111.21922-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [keycodemapdb PATCH] keymap-gen: Name sections in pod output X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Mon, 15 Apr 2019 12:31:38 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Properly formatted man pages have at least a NAME section, which tools like apropos(1) parse and index. The current implementation of PodLanguageGenerator doesn't generate this section, and even if the user were to try and work around the limitation by passing --varname=3DNAME, there would still be nothing in the section to actually parse. Change the generator so that varname will be used as the contents of the NAME section, add a DESCRIPTION section in which values are listed. Signed-off-by: Andrea Bolognani --- Dan said on IRC he would accept keycodemapdb patches sent to the mailing list of any project using the module, so here we are :) I need this to fix generation of virkey{code,name}-* man pages anyway. tools/keymap-gen | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tools/keymap-gen b/tools/keymap-gen index 7965d37..78676a9 100755 --- a/tools/keymap-gen +++ b/tools/keymap-gen @@ -873,7 +873,11 @@ class PodLanguageGenerator(LanguageDocGenerator): print("#") =20 def _array_start_name_doc(self, varname, namemap): - print("=3Dhead1 %s" % varname) + print("=3Dhead1 NAME") + print("") + print("%s" % varname) + print("") + print("=3Dhead1 DESCRIPTION") print("") print("List of %s key code names, with corresponding key code valu= es" % namemap) print("") @@ -881,7 +885,11 @@ class PodLanguageGenerator(LanguageDocGenerator): print("") =20 def _array_start_code_doc(self, varname, codemap, namemap): - print("=3Dhead1 %s" % varname) + print("=3Dhead1 NAME") + print("") + print("%s" % varname) + print("") + print("=3Dhead1 DESCRIPTION") print("") print("List of %s key code values, with corresponding %s key code = names" % (codemap, namemap)) print("") --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list