From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 5F327138A1A for ; Mon, 5 Jan 2015 23:12:52 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 32541E085E; Mon, 5 Jan 2015 23:12:44 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id EE7C2E0854 for ; Mon, 5 Jan 2015 23:12:41 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E0E843406F8 for ; Mon, 5 Jan 2015 23:12:40 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 41086EF47 for ; Mon, 5 Jan 2015 23:12:37 +0000 (UTC) From: "Brian Dolbec" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Brian Dolbec" Message-ID: <1420496513.a051bd81ac741839c74c94060e4d509e3d4b06b0.dolsen@gentoo> Subject: [gentoo-commits] proj/gentoo-keys:master commit in: py2man/ X-VCS-Repository: proj/gentoo-keys X-VCS-Files: py2man/command.template py2man/manpages.py py2man/sub-command.template X-VCS-Directories: py2man/ X-VCS-Committer: dolsen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: a051bd81ac741839c74c94060e4d509e3d4b06b0 X-VCS-Branch: master Date: Mon, 5 Jan 2015 23:12:37 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: fc9c5ced-efd9-4919-8abe-37b8dcb6fd84 X-Archives-Hash: 46feadb3d947a382779953a974f512ea commit: a051bd81ac741839c74c94060e4d509e3d4b06b0 Author: Pavlos Ratis gentoo org> AuthorDate: Mon Jan 5 15:56:40 2015 +0000 Commit: Brian Dolbec gentoo org> CommitDate: Mon Jan 5 22:21:53 2015 +0000 URL: http://sources.gentoo.org/gitweb/?p=proj/gentoo-keys.git;a=commit;h=a051bd81 py2man: tiny updates --- py2man/command.template | 3 ++- py2man/manpages.py | 16 +++++++--------- py2man/sub-command.template | 3 ++- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/py2man/command.template b/py2man/command.template index 5879a05..e2111e3 100644 --- a/py2man/command.template +++ b/py2man/command.template @@ -28,4 +28,5 @@ Gentoo Keys project is under GPL-2 License. .BR gkeys.conf (1), %(actions)s -(This man page was auto-generated from source) +.SH NOTE +This is an auto-generated man page from source diff --git a/py2man/manpages.py b/py2man/manpages.py index 0fd82ed..d5828f8 100644 --- a/py2man/manpages.py +++ b/py2man/manpages.py @@ -5,12 +5,12 @@ import os from datetime import datetime -from .options import LONG_OPTIONS, SHORT_OPTS +from options import LONG_OPTIONS, SHORT_OPTS ActionStr = '.BR gkeys-%s (1),' -ExampleHeader = '''.SH Example''' +EXAMPLEHEADER = '''.SH Example''' BreakStr = '''.br %s''' @@ -45,12 +45,12 @@ class ManPage(object): wrapl = 72 + escapes output = [] line = firstline.rstrip('%(opts)s') % data - ll = len(line) + line_len = len(line) l1 = True for opt in opts: - if (ll + len(SHORT_OPTS[opt])) < wrapl: + if (line_len + len(SHORT_OPTS[opt])) < wrapl: line = line + '%s ' % SHORT_OPTS[opt] - ll = len(line) + line_len = len(line) else: if l1: output.append(line) @@ -58,7 +58,7 @@ class ManPage(object): else: output.append(BreakStr % line) line = indent + '%s ' % SHORT_OPTS[opt] - ll = len(line) + line_len = len(line) return '\n'.join(output) @@ -101,10 +101,8 @@ class ManPage(object): @staticmethod def gen_subcmd(cmds): - #print(cmds.values()) output = [] for cmd in list(cmds): - print(cmd) if cmd.startswith('--'): output.append(SubCmdHdr % cmd.strip('-').upper()) else: @@ -130,7 +128,7 @@ class ManPage(object): data['long_desc'] = Action_Map[action]['long_desc'] if Action_Map[action]['example']: data['example'] = self.gen_example(Action_Map[action]['example']) - data['exampleheader'] = ExampleHeader + data['exampleheader'] = EXAMPLEHEADER else: data['example'] = '' data['exampleheader'] = '' diff --git a/py2man/sub-command.template b/py2man/sub-command.template index 89d1b1b..f15fa0e 100644 --- a/py2man/sub-command.template +++ b/py2man/sub-command.template @@ -32,4 +32,5 @@ Gentoo Keys project is under GPL-2 License. .BR gkeys.conf (1), %(actions)s -(This man page was auto-generated from source) +.SH NOTE +This is an auto-generated man page from source