Return-Path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 345452041B287 for ; Tue, 24 Apr 2018 03:13:04 -0700 (PDT) Date: Tue, 24 Apr 2018 12:13:01 +0200 Message-ID: From: Takashi Iwai Subject: Re: [PATCH ndctl v2 2/3] Documentation: Add the support for asciidoctor In-Reply-To: <1524519985.20736.2.camel@intel.com> References: <20180419151120.11041-1-tiwai@suse.de> <20180419151120.11041-3-tiwai@suse.de> <1524519985.20736.2.camel@intel.com> MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" To: "Verma, Vishal L" Cc: "linux-nvdimm@lists.01.org" List-ID: On Mon, 23 Apr 2018 23:46:28 +0200, Verma, Vishal L wrote: > > On Thu, 2018-04-19 at 17:11 +0200, Takashi Iwai wrote: > > This patch adds the support for asciidoctor to be used for generating > > documents instead of asciidoc. It's enabled via --enable-asciidoctor > > configure option while asciidoc is used still as default. > > > > In addition to the configure option, a few other changes were needed: > > * some asciidoc.conf python stuff has to be replaced with asciidoctor > > ruby extension; copied mostly from git > > * asciidoctor requires slightly different options > > * the man pages are generated directly via asciidoctor without xmlto > > processing; less package dependency > > > > Signed-off-by: Takashi Iwai > > --- > > Documentation/asciidoctor-extensions.rb.in | 28 > > ++++++++++++++++++++++++++++ > > Documentation/daxctl/Makefile.am | 28 > > ++++++++++++++++++++++++++-- > > Documentation/ndctl/Makefile.am | 28 > > ++++++++++++++++++++++++++-- > > configure.ac | 17 +++++++++++++++-- > > 4 files changed, 95 insertions(+), 6 deletions(-) > > create mode 100644 Documentation/asciidoctor-extensions.rb.in > > > > diff --git a/Documentation/asciidoctor-extensions.rb.in > > b/Documentation/asciidoctor-extensions.rb.in > > new file mode 100644 > > index 000000000000..ebdd665f1fb9 > > --- /dev/null > > +++ b/Documentation/asciidoctor-extensions.rb.in > > @@ -0,0 +1,28 @@ > > +require 'asciidoctor' > > +require 'asciidoctor/extensions' > > + > > +module @Utility@ > > + module Documentation > > + class Link@Utility@Processor < > > Asciidoctor::Extensions::InlineMacroProcessor > > + use_dsl > > + > > + named :chrome > > + > > + def process(parent, target, attrs) > > + if parent.document.basebackend? 'html' > > + prefix = parent.document.attr('@utility@-relative-html- > > prefix') > > + %( > href="#{prefix}#{target}.html">#{target}(#{attrs[1]})\n) > > + elsif parent.document.basebackend? 'docbook' > > + "\n" \ > > + "#{target}" \ > > + "#{attrs[1]}\n" \ > > + "\n" > > + end > > + end > > + end > > + end > > +end > > + > > +Asciidoctor::Extensions.register do > > + inline_macro @Utility@::Documentation::Link@Utility@Processor, :link@u > > tility@ > > +end > > Hi Takashi, > > It looks like this extension should be doing the right thing for the > 'linkndctl' macros, but for some reason it doesn't seem to be working for > me. In the generated man pages: > > SEE ALSO > linkndctl:ndctl-zero-labels[1], linkndctl:ndctl-init-labels[1]... etc. Mea culpa, I messed up the macro while rewriting. Will send a fixed v3 series. thanks, Takashi _______________________________________________ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm