From: David Bremner Date: Tue, 11 Mar 2014 02:18:29 +0000 (+2100) Subject: [PATCH 3/3] doc: have prerst2man.py generate roff files all in one directory X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=472d48c3736cfe3c857111d6947d62fe86d16f6b;p=notmuch-archives.git [PATCH 3/3] doc: have prerst2man.py generate roff files all in one directory --- diff --git a/b6/d6163ecc37cb6a12fa005e80f05ce0aa300147 b/b6/d6163ecc37cb6a12fa005e80f05ce0aa300147 new file mode 100644 index 000000000..64d691467 --- /dev/null +++ b/b6/d6163ecc37cb6a12fa005e80f05ce0aa300147 @@ -0,0 +1,88 @@ +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 4C91D431FBD + for ; Mon, 10 Mar 2014 19:20:30 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0 +X-Spam-Level: +X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] + 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 breVqMOOa8qK for ; + Mon, 10 Mar 2014 19:20:25 -0700 (PDT) +Received: from yantan.tethera.net (yantan.tethera.net [199.188.72.155]) + (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 0156A431FC3 + for ; Mon, 10 Mar 2014 19:20:18 -0700 (PDT) +Received: from remotemail by yantan.tethera.net with local (Exim 4.80) + (envelope-from ) + id 1WNCIh-0005QO-IJ; Mon, 10 Mar 2014 23:20:15 -0300 +Received: (nullmailer pid 7592 invoked by uid 1000); Tue, 11 Mar 2014 + 02:20:05 -0000 +From: David Bremner +To: notmuch@notmuchmail.org +Subject: [PATCH 3/3] doc: have prerst2man.py generate roff files all in one + directory +Date: Mon, 10 Mar 2014 23:18:29 -0300 +Message-Id: <1394504309-7433-3-git-send-email-david@tethera.net> +X-Mailer: git-send-email 1.8.5.3 +In-Reply-To: <1394504309-7433-1-git-send-email-david@tethera.net> +References: + <1394504309-7433-1-git-send-email-david@tethera.net> +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: Tue, 11 Mar 2014 02:20:30 -0000 + +Originally it seemed tidier to put them in subdirectories, but it +turned out not to be obvious how to do that with sphinx. Bring the two +methods back in sync again, and unbreak the generation of gzipped +manpages. + +As a side-effect, fix a particular egregious combination of format and +string concatenation. +--- + doc/prerst2man.py | 9 ++++----- + 1 file changed, 4 insertions(+), 5 deletions(-) + +diff --git a/doc/prerst2man.py b/doc/prerst2man.py +index 720deb6..adc0d3d 100644 +--- a/doc/prerst2man.py ++++ b/doc/prerst2man.py +@@ -32,10 +32,8 @@ 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, 0755) +- filename = outdir + '/' + page[0] + '.rst' ++ print outdir ++ filename = outdir + '/' + page[1] + '.rst' + outfile = open(filename, 'w') + infile = open(sourcedir + '/' + page[0] + '.rst', 'r') + +@@ -59,4 +57,5 @@ for page in man_pages: + outfile.write("".join(lines)) + outfile.close() + +- os.system('set -x; rst2man {0} {1}'.format(filename, outdir + '/' + page[0] + '.' + str(page[4]))) ++ os.system('set -x; rst2man {0} {1}/{2}.{3}' ++ .format(filename, outdir, page[1],page[4])) +-- +1.8.5.3 +