From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 873DC431FD4 for ; Tue, 11 Mar 2014 05:06:14 -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 0DUAPdTifT59 for ; Tue, 11 Mar 2014 05:06:10 -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 30BDA431FC0 for ; Tue, 11 Mar 2014 05:06:10 -0700 (PDT) Received: from remotemail by yantan.tethera.net with local (Exim 4.80) (envelope-from ) id 1WNLRh-0007Jj-Sc; Tue, 11 Mar 2014 09:06:09 -0300 Received: (nullmailer pid 28621 invoked by uid 1000); Tue, 11 Mar 2014 12:05:59 -0000 From: David Bremner To: notmuch@notmuchmail.org Subject: [Patch v2 1/3] doc: have prerst2man.py generate roff files all in one directory Date: Tue, 11 Mar 2014 09:05:53 -0300 Message-Id: <1394539555-28334-2-git-send-email-david@tethera.net> X-Mailer: git-send-email 1.8.5.3 In-Reply-To: <1394539555-28334-1-git-send-email-david@tethera.net> References: <1394539555-28334-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 12:06:14 -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 | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/doc/prerst2man.py b/doc/prerst2man.py index 720deb6..ec343e7 100644 --- a/doc/prerst2man.py +++ b/doc/prerst2man.py @@ -32,10 +32,7 @@ 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' + filename = outdir + '/' + page[1] + '.rst' outfile = open(filename, 'w') infile = open(sourcedir + '/' + page[0] + '.rst', 'r') @@ -59,4 +56,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