From 0c99ad13abd192f6176b24c25298f7c7132eb02e Mon Sep 17 00:00:00 2001 From: Jani Nikula Date: Sun, 18 Jan 2015 21:44:42 +0200 Subject: [PATCH] Re: [PATCH] doc: remove support for rst2man --- d4/7e3b768ac6f42a6e12e7775b4ae94b5cedf064 | 615 ++++++++++++++++++++++ 1 file changed, 615 insertions(+) create mode 100644 d4/7e3b768ac6f42a6e12e7775b4ae94b5cedf064 diff --git a/d4/7e3b768ac6f42a6e12e7775b4ae94b5cedf064 b/d4/7e3b768ac6f42a6e12e7775b4ae94b5cedf064 new file mode 100644 index 000000000..d7133b5bf --- /dev/null +++ b/d4/7e3b768ac6f42a6e12e7775b4ae94b5cedf064 @@ -0,0 +1,615 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id CB9CA431FB6 + for ; Sun, 18 Jan 2015 11:44:48 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 1.739 +X-Spam-Level: * +X-Spam-Status: No, score=1.739 tagged_above=-999 required=5 + tests=[DNS_FROM_AHBL_RHSBL=2.438, HTML_MESSAGE=0.001, + RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id Oi5jKMAruayZ for ; + Sun, 18 Jan 2015 11:44:45 -0800 (PST) +Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com + [209.85.217.182]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 486A2431FAF + for ; Sun, 18 Jan 2015 11:44:45 -0800 (PST) +Received: by mail-lb0-f182.google.com with SMTP id u10so24968968lbd.13 + for ; Sun, 18 Jan 2015 11:44:42 -0800 (PST) +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=1e100.net; s=20130820; + h=x-gm-message-state:mime-version:in-reply-to:references:date + :message-id:subject:from:to:cc:content-type; + bh=kNPFNURgMPqn3UFKH1gt0E7cm6sDrl2mBGmWYXelfik=; + b=IDONrnndH8mnzuWuHvg6+HaOKIvz2umXle6NpnepSkYEznHSODS8tOlXmoSfvopCsO + gmMC7qKGP/ET4Epg99FJK0NKepsWME8i9J0pJ7CkzLlytccpK195V+HD5v4sDJMzkXI1 + 4OgRH2cF77xvl7RcNkgPGZbyiCx4WUdKYJo8eIdtUJ8+eGHHNOLZDW+sD70NnIRDd/Y+ + FNiDkK9jtT2eHShXjlj5mSKqeaI6d1TOgrpAZ5cX/4wur6eNPRt0Ic4wGRnO9EpNSqIT + 7tTtCqAAS89dSON4TrRVgzj47juafI/nFFxGspdAt2qiFG5+Mc6EjwoSsEBv9JJWC+1s + w0Yg== +X-Gm-Message-State: + ALoCoQlBOxQNZfV5h791Faadf7dseXUs0ppP5lwNWsrm6uMIvHlG0zTXQrnJBu9Sx63s75TBYX0v +MIME-Version: 1.0 +X-Received: by 10.112.119.167 with SMTP id kv7mr26201348lbb.62.1421610282610; + Sun, 18 Jan 2015 11:44:42 -0800 (PST) +Received: by 10.25.160.143 with HTTP; Sun, 18 Jan 2015 11:44:42 -0800 (PST) +Received: by 10.25.160.143 with HTTP; Sun, 18 Jan 2015 11:44:42 -0800 (PST) +In-Reply-To: <1421600110-19988-1-git-send-email-david@tethera.net> +References: <87k312x4i2.fsf@maritornes.cs.unb.ca> + <1421600110-19988-1-git-send-email-david@tethera.net> +Date: Sun, 18 Jan 2015 21:44:42 +0200 +Message-ID: + +Subject: Re: [PATCH] doc: remove support for rst2man +From: Jani Nikula +To: David Bremner +Content-Type: multipart/alternative; boundary=047d7b874450e78936050cf26f93 +Cc: Notmuch Mail +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Sun, 18 Jan 2015 19:44:48 -0000 + +--047d7b874450e78936050cf26f93 +Content-Type: text/plain; charset=UTF-8 + +On Jan 18, 2015 6:56 PM, "David Bremner" wrote: +> +> It was becoming increasingly complicated to support rst2man, and there +> were apparently not many people that relied on it. +> --- +> +> Now's your chance to tell us how useful rst2man support is to you. +> +> INSTALL | 7 ++---- +> NEWS | 6 +++++ +> configure | 20 +++-------------- +> doc/INSTALL | 13 ----------- +> doc/Makefile.local | 7 ++---- +> doc/prerst2man.py | 64 +------------------------------------------------------ +> 6 files changed, 13 insertions(+), 104 deletions(-) +> delete mode 100644 doc/prerst2man.py +> +> diff --git a/INSTALL b/INSTALL +> index b543c50..eaccd93 100644 +> --- a/INSTALL +> +++ b/INSTALL +> @@ -75,14 +75,11 @@ Talloc, and zlib which are each described below: +> Building Documentation +> ---------------------- +> +> -By default the documentation for notmuch is built using sphinx. +> +To build the documentation for notmuch you need at least version 1.0 +> +of sphinx (Jul. 2010). +> +> Sphinx is available from www.sphinx-doc.org. +> +> -If you prefer, you can build the man pages using rst2man, from the +> -python docutils package. See doc/INSTALL for details. +> - +> - +> Installing Dependencies from Packages +> ------------------------------------- +> +> diff --git a/NEWS b/NEWS +> index abb5ad7..53e06aa 100644 +> --- a/NEWS +> +++ b/NEWS +> @@ -1,5 +1,11 @@ +> Notmuch 0.20 (UNRELEASED) +> +> +Documentation +> +------------- +> + +> +Support for using rst2man in place of sphinx to build the +> +docmumentation has been removed. + +-mu + +Otherwise lgtm. + +Jani. + +> + +> Contrib +> ------- +> +> diff --git a/configure b/configure +> index 137acea..a6b49ae 100755 +> --- a/configure +> +++ b/configure +> @@ -447,19 +447,9 @@ printf "Checking if sphinx is available and supports +nroff output... " +> if hash sphinx-build > /dev/null 2>&1 && ${python} -m +sphinx.writers.manpage > /dev/null 2>&1 ; then +> printf "Yes.\n" +> have_sphinx=1 +> - have_rst2man=0 +> else +> - printf "No (falling back to rst2man).\n" +> + printf "No (so will not install man pages).\n" +> have_sphinx=0 +> - +> - printf "Checking if rst2man is available... " +> - if rst2man -V > /dev/null 2>&1; then +> - printf "Yes.\n" +> - have_rst2man=1 +> - else +> - printf "No (so will not install man pages).\n" +> - have_rst2man=0 +> - fi +> fi +> +> libdir_in_ldconfig=0 +> @@ -848,9 +838,6 @@ HAVE_EMACS = ${have_emacs} +> # Whether there's a sphinx-build binary available for building +documentation +> HAVE_SPHINX=${have_sphinx} +> +> -# Whether there's a rst2man binary available for building documentation +> -HAVE_RST2MAN=${have_rst2man} +> - +> # Whether there's a doxygen binary available for building api +documentation +> HAVE_DOXYGEN=${have_doxygen} +> +> @@ -978,9 +965,8 @@ cat > sh.config < # Whether the Xapian version in use supports compaction +> NOTMUCH_HAVE_XAPIAN_COMPACT=${have_xapian_compact} +> +> -# Whether there's either sphinx or rst2man available for building +> -# documentation +> -NOTMUCH_HAVE_MAN=$((have_sphinx || have_rst2man)) +> +# do we have man pages? +> +NOTMUCH_HAVE_MAN=$((have_sphinx)) +> +> # Name of python interpreter +> NOTMUCH_PYTHON=${python} +> diff --git a/doc/INSTALL b/doc/INSTALL +> index e37c2b9..0585476 100644 +> --- a/doc/INSTALL +> +++ b/doc/INSTALL +> @@ -1,9 +1,6 @@ +> This file contains some more detailed information about building and +> installing the documentation. +> +> -Building with sphinx. +> ---------------------- +> - +> - You need sphinx at least version 1.0. +> +> - You can build build and install man pages with 'make install-man' +> @@ -12,13 +9,3 @@ Building with sphinx. +> (currently only the man pages) with +> +> 'make install-{man|info|html|pdf}' +> - +> -Building the man pages +> ----------------------- +> - +> -- You can build the man pages with rst2man (from python-docutils) with +> - 'make rst2man'. +> - +> -- Currently there is no support to automagically install the resulting +> - nroff files, but it should work to modify the target install-man +> - in doc/Makefile.local. +> diff --git a/doc/Makefile.local b/doc/Makefile.local +> index e7d0bac..0bdf2e1 100644 +> --- a/doc/Makefile.local +> +++ b/doc/Makefile.local +> @@ -7,7 +7,6 @@ SPHINXOPTS := -q +> SPHINXBUILD = sphinx-build +> DOCBUILDDIR := $(dir)/_build +> +> -prerst2man := python $(srcdir)/$(dir)/prerst2man.py +> mkdocdeps := python $(srcdir)/$(dir)/mkdocdeps.py +> +> # Internal variables. +> @@ -50,8 +49,6 @@ ifeq ($(HAVE_SPHINX),1) +> mkdir -p $(DOCBUILDDIR)/man/man$${section}; \ +> mv $(DOCBUILDDIR)/man/*.$${section} +$(DOCBUILDDIR)/man/man$${section}; \ +> done +> -else ifeq ($(HAVE_RST2MAN),1) +> - $(prerst2man) $(srcdir)/doc $(DOCBUILDDIR)/man +> else +> @echo "Fatal: build dependency fail." +> @false +> @@ -79,10 +76,10 @@ endif +> +> # Do not try to build or install man pages if a man page converter is +> # not available. +> -ifeq ($(HAVE_SPHINX)$(HAVE_RST2MAN),00) +> +ifeq ($(HAVE_SPHINX),0) +> build-man: +> install-man: +> - @echo "No sphinx or rst2man, will not install man pages." +> + @echo "No sphinx, will not install man pages." +> else +> build-man: ${MAN_GZIP_FILES} +> install-man: ${MAN_GZIP_FILES} +> diff --git a/doc/prerst2man.py b/doc/prerst2man.py +> deleted file mode 100644 +> index 968722a..0000000 +> --- a/doc/prerst2man.py +> +++ /dev/null +> @@ -1,64 +0,0 @@ +> -from sys import argv +> -from datetime import date +> -from os.path import dirname, isdir +> -from os import makedirs, system +> -import re +> - +> -sourcedir = argv[1] +> -outdir = argv[2] +> - +> -if not isdir(outdir): +> - makedirs(outdir, 0o755) +> - +> -with open(sourcedir + "/conf.py") as cf: +> - exec(cf.read()) +> - +> - +> -def header(file, startdocname, command, description, authors, section): +> - file.write(""" +> -{0:s} +> -{1:s} +> -{2:s} +> - +> -:Date: {3:s} +> -:Version: {4:s} +> -:Manual section: {5:d} +> -:Manual group: {6:s} +> - +> -""".format( +> -'-' * len(description), +> -description, +> -'-' * len(description), +> -date.today().isoformat(), release, section, project)) +> - +> -blankre = re.compile("^\s*$") +> -for page in man_pages: +> - outdirname = outdir + '/' + dirname(page[0]) +> - if not isdir(outdirname): +> - makedirs(outdirname, 0o755) +> - filename = outdir + '/' + page[0] + '.rst' +> - outfile = open(filename, 'w') +> - infile = open(sourcedir + '/' + page[0] + '.rst', 'r') +> - +> - # this is a crude hack. We look for the first blank line, and +> - # insert the rst2man header there. +> - # +> - # XXX consider really parsing input +> - +> - count = 0 +> - lines = infile.readlines() +> - for line in lines: +> - outfile.write(line) +> - if (blankre.match(line)): +> - break +> - count = count + 1 +> - +> - del lines[0:count + 1] +> - +> - header(outfile, *page) +> - +> - outfile.write("".join(lines)) +> - outfile.close() +> - +> - system('set -x; rst2man {0} {1}/{2}.{3}' +> - .format(filename, outdir, page[0], page[4])) +> -- +> 2.1.4 +> +> _______________________________________________ +> notmuch mailing list +> notmuch@notmuchmail.org +> http://notmuchmail.org/mailman/listinfo/notmuch + +--047d7b874450e78936050cf26f93 +Content-Type: text/html; charset=UTF-8 +Content-Transfer-Encoding: quoted-printable + +


+On Jan 18, 2015 6:56 PM, "David Bremner" <david@tethera.net> wrote:
+>
+> It was becoming increasingly complicated to support rst2man, and there= +
+> were apparently not many people that relied on it.
+> ---
+>
+> Now's your chance to tell us how useful rst2man support is to you.= +
+>
+> =C2=A0INSTALL=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 |=C2=A0 7 ++---= +-
+> =C2=A0NEWS=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0|=C2= +=A0 6 +++++
+> =C2=A0configure=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 | 20 +++------------= +--
+> =C2=A0doc/INSTALL=C2=A0 =C2=A0 =C2=A0 =C2=A0 | 13 -----------
+> =C2=A0doc/Makefile.local |=C2=A0 7 ++----
+> =C2=A0doc/prerst2man.py=C2=A0 | 64 -----------------------------------= +-------------------
+> =C2=A06 files changed, 13 insertions(+), 104 deletions(-)
+> =C2=A0delete mode 100644 doc/prerst2man.py
+>
+> diff --git a/INSTALL b/INSTALL
+> index b543c50..eaccd93 100644
+> --- a/INSTALL
+> +++ b/INSTALL
+> @@ -75,14 +75,11 @@ Talloc, and zlib which are each described below: +> =C2=A0Building Documentation
+> =C2=A0----------------------
+>
+> -By default the documentation for notmuch is built using sphinx.
+> +To build the documentation for notmuch you need at least version 1.0<= +br> +> +of sphinx (Jul. 2010).
+>
+> =C2=A0Sphinx is available from w= +ww.sphinx-doc.org.
+>
+> -If you prefer, you can build the man pages using rst2man, from the +> -python docutils package. See doc/INSTALL for details.
+> -
+> -
+> =C2=A0Installing Dependencies from Packages
+> =C2=A0-------------------------------------
+>
+> diff --git a/NEWS b/NEWS
+> index abb5ad7..53e06aa 100644
+> --- a/NEWS
+> +++ b/NEWS
+> @@ -1,5 +1,11 @@
+> =C2=A0Notmuch 0.20 (UNRELEASED)
+>
+> +Documentation
+> +-------------
+> +
+> +Support for using rst2man in place of sphinx to build the
+> +docmumentation has been removed.

+

-mu

+

Otherwise lgtm.

+

Jani.

+

> +
+> =C2=A0Contrib
+> =C2=A0-------
+>
+> diff --git a/configure b/configure
+> index 137acea..a6b49ae 100755
+> --- a/configure
+> +++ b/configure
+> @@ -447,19 +447,9 @@ printf "Checking if sphinx is available and = +supports nroff output... "
+> =C2=A0if hash sphinx-build > /dev/null 2>&1 && ${pyt= +hon} -m sphinx.writers.manpage > /dev/null 2>&1 ; then
+> =C2=A0 =C2=A0 =C2=A0printf "Yes.\n"
+> =C2=A0 =C2=A0 =C2=A0have_sphinx=3D1
+> -=C2=A0 =C2=A0 have_rst2man=3D0
+> =C2=A0else
+> -=C2=A0 =C2=A0 printf "No (falling back to rst2man).\n"
+> +=C2=A0 =C2=A0 printf "No (so will not install man pages).\n"= +;
+> =C2=A0 =C2=A0 =C2=A0have_sphinx=3D0
+> -
+> -=C2=A0 =C2=A0 printf "Checking if rst2man is available... "= +
+> -=C2=A0 =C2=A0 if rst2man -V > /dev/null 2>&1; then
+> -=C2=A0 =C2=A0 =C2=A0 =C2=A0printf "Yes.\n"
+> -=C2=A0 =C2=A0 =C2=A0 =C2=A0have_rst2man=3D1
+> -=C2=A0 =C2=A0 else
+> -=C2=A0 =C2=A0 =C2=A0 =C2=A0printf "No (so will not install man p= +ages).\n"
+> -=C2=A0 =C2=A0 =C2=A0 =C2=A0have_rst2man=3D0
+> -=C2=A0 =C2=A0 fi
+> =C2=A0fi
+>
+> =C2=A0libdir_in_ldconfig=3D0
+> @@ -848,9 +838,6 @@ HAVE_EMACS =3D ${have_emacs}
+> =C2=A0# Whether there's a sphinx-build binary available for buildi= +ng documentation
+> =C2=A0HAVE_SPHINX=3D${have_sphinx}
+>
+> -# Whether there's a rst2man binary available for building documen= +tation
+> -HAVE_RST2MAN=3D${have_rst2man}
+> -
+> =C2=A0# Whether there's a doxygen binary available for building ap= +i documentation
+> =C2=A0HAVE_DOXYGEN=3D${have_doxygen}
+>
+> @@ -978,9 +965,8 @@ cat > sh.config <<EOF
+> =C2=A0# Whether the Xapian version in use supports compaction
+> =C2=A0NOTMUCH_HAVE_XAPIAN_COMPACT=3D${have_xapian_compact}
+>
+> -# Whether there's either sphinx or rst2man available for building= +
+> -# documentation
+> -NOTMUCH_HAVE_MAN=3D$((have_sphinx || have_rst2man))
+> +# do we have man pages?
+> +NOTMUCH_HAVE_MAN=3D$((have_sphinx))
+>
+> =C2=A0# Name of python interpreter
+> =C2=A0NOTMUCH_PYTHON=3D${python}
+> diff --git a/doc/INSTALL b/doc/INSTALL
+> index e37c2b9..0585476 100644
+> --- a/doc/INSTALL
+> +++ b/doc/INSTALL
+> @@ -1,9 +1,6 @@
+> =C2=A0This file contains some more detailed information about building= + and
+> =C2=A0installing the documentation.
+>
+> -Building with sphinx.
+> ----------------------
+> -
+> =C2=A0- You need sphinx at least version 1.0.
+>
+> =C2=A0- You can build build and install man pages with 'make insta= +ll-man'
+> @@ -12,13 +9,3 @@ Building with sphinx.
+> =C2=A0 =C2=A0(currently only the man pages) with
+>
+> =C2=A0 =C2=A0 =C2=A0 'make install-{man|info|html|pdf}'
+> -
+> -Building the man pages
+> -----------------------
+> -
+> -- You can build the man pages with rst2man (from python-docutils) wit= +h
+> -=C2=A0 'make rst2man'.
+> -
+> -- Currently there is no support to automagically install the resultin= +g
+> -=C2=A0 nroff files, but it should work to modify the target install-m= +an
+> -=C2=A0 in doc/Makefile.local.
+> diff --git a/doc/Makefile.local b/doc/Makefile.local
+> index e7d0bac..0bdf2e1 100644
+> --- a/doc/Makefile.local
+> +++ b/doc/Makefile.local
+> @@ -7,7 +7,6 @@ SPHINXOPTS=C2=A0 =C2=A0 :=3D -q
+> =C2=A0SPHINXBUILD=C2=A0 =C2=A0=3D sphinx-build
+> =C2=A0DOCBUILDDIR=C2=A0 =C2=A0 =C2=A0 :=3D $(dir)/_build
+>
+> -prerst2man :=3D python $(srcdir)/$(dir)/prerst2man.py
+> =C2=A0mkdocdeps :=3D python $(srcdir)/$(dir)/mkdocdeps.py
+>
+> =C2=A0# Internal variables.
+> @@ -50,8 +49,6 @@ ifeq ($(HAVE_SPHINX),1)
+> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 mkdir -p $(DOCBUILDDIR)/man/= +man$${section}; \
+> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 mv $(DOCBUILDDIR)/man/*.$${s= +ection} $(DOCBUILDDIR)/man/man$${section}; \
+> =C2=A0 =C2=A0 =C2=A0 =C2=A0 done
+> -else ifeq ($(HAVE_RST2MAN),1)
+> -=C2=A0 =C2=A0 =C2=A0 =C2=A0$(prerst2man) $(srcdir)/doc $(DOCBUILDDIR)= +/man
+> =C2=A0else
+> =C2=A0 =C2=A0 =C2=A0 =C2=A0 @echo "Fatal: build dependency fail.&= +quot;
+> =C2=A0 =C2=A0 =C2=A0 =C2=A0 @false
+> @@ -79,10 +76,10 @@ endif
+>
+> =C2=A0# Do not try to build or install man pages if a man page convert= +er is
+> =C2=A0# not available.
+> -ifeq ($(HAVE_SPHINX)$(HAVE_RST2MAN),00)
+> +ifeq ($(HAVE_SPHINX),0)
+> =C2=A0build-man:
+> =C2=A0install-man:
+> -=C2=A0 =C2=A0 =C2=A0 =C2=A0@echo "No sphinx or rst2man, will not= + install man pages."
+> +=C2=A0 =C2=A0 =C2=A0 =C2=A0@echo "No sphinx, will not install ma= +n pages."
+> =C2=A0else
+> =C2=A0build-man: ${MAN_GZIP_FILES}
+> =C2=A0install-man: ${MAN_GZIP_FILES}
+> diff --git a/doc/prerst2man.py b/doc/prerst2man.py
+> deleted file mode 100644
+> index 968722a..0000000
+> --- a/doc/prerst2man.py
+> +++ /dev/null
+> @@ -1,64 +0,0 @@
+> -from sys import argv
+> -from datetime import date
+> -from os.path import dirname, isdir
+> -from os import makedirs, system
+> -import re
+> -
+> -sourcedir =3D argv[1]
+> -outdir =3D argv[2]
+> -
+> -if not isdir(outdir):
+> -=C2=A0 =C2=A0 makedirs(outdir, 0o755)
+> -
+> -with open(sourcedir + "/conf.py") as cf:
+> -=C2=A0 =C2=A0 exec(cf.read())
+> -
+> -
+> -def header(file, startdocname, command, description, authors, section= +):
+> -=C2=A0 =C2=A0 file.write("""
+> -{0:s}
+> -{1:s}
+> -{2:s}
+> -
+> -:Date:=C2=A0 =C2=A0{3:s}
+> -:Version: {4:s}
+> -:Manual section: {5:d}
+> -:Manual group: {6:s}
+> -
+> -""".format(
+> -'-' * len(description),
+> -description,
+> -'-' * len(description),
+> -date.today().isoformat(), release, section, project))
+> -
+> -blankre =3D re.compile("^\s*$")
+> -for page in man_pages:
+> -=C2=A0 =C2=A0 outdirname =3D outdir + '/' + dirname(page[0])<= +br> +> -=C2=A0 =C2=A0 if not isdir(outdirname):
+> -=C2=A0 =C2=A0 =C2=A0 =C2=A0 makedirs(outdirname, 0o755)
+> -=C2=A0 =C2=A0 filename =3D outdir + '/' + page[0] + '.rst= +'
+> -=C2=A0 =C2=A0 outfile =3D open(filename, 'w')
+> -=C2=A0 =C2=A0 infile =3D open(sourcedir + '/' + page[0] + = +9;.rst', 'r')
+> -
+> -=C2=A0 =C2=A0 # this is a crude hack. We look for the first blank lin= +e, and
+> -=C2=A0 =C2=A0 # insert the rst2man header there.
+> -=C2=A0 =C2=A0 #
+> -=C2=A0 =C2=A0 # XXX consider really parsing input
+> -
+> -=C2=A0 =C2=A0 count =3D 0
+> -=C2=A0 =C2=A0 lines =3D infile.readlines()
+> -=C2=A0 =C2=A0 for line in lines:
+> -=C2=A0 =C2=A0 =C2=A0 =C2=A0 outfile.write(line)
+> -=C2=A0 =C2=A0 =C2=A0 =C2=A0 if (blankre.match(line)):
+> -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 break
+> -=C2=A0 =C2=A0 =C2=A0 =C2=A0 count =3D count + 1
+> -
+> -=C2=A0 =C2=A0 del lines[0:count + 1]
+> -
+> -=C2=A0 =C2=A0 header(outfile, *page)
+> -
+> -=C2=A0 =C2=A0 outfile.write("".join(lines))
+> -=C2=A0 =C2=A0 outfile.close()
+> -
+> -=C2=A0 =C2=A0 system('set -x; rst2man {0} {1}/{2}.{3}'
+> -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0.format(filename, outdir, pa= +ge[0], page[4]))
+> --
+> 2.1.4
+>
+> _______________________________________________
+> notmuch mailing list
+> notmuch@notmuchmail.org= +
+> http://not= +muchmail.org/mailman/listinfo/notmuch
+

+ +--047d7b874450e78936050cf26f93-- -- 2.26.2