diff options
author | Brian Dolbec <dolsen@gentoo.org> | 2015-01-04 17:01:08 -0800 |
---|---|---|
committer | Brian Dolbec <dolsen@gentoo.org> | 2015-01-05 14:15:18 -0800 |
commit | 4485a6e491b7df9fa54314bae87df4d29318867e (patch) | |
tree | 9168cc22ee15d87f333ebbe6f872eccdfce55a03 /py2man | |
parent | gkeys/actions.py: moveseed() Fix SeedHandler intialization (diff) | |
download | gentoo-keys-4485a6e491b7df9fa54314bae87df4d29318867e.tar.gz gentoo-keys-4485a6e491b7df9fa54314bae87df4d29318867e.tar.bz2 gentoo-keys-4485a6e491b7df9fa54314bae87df4d29318867e.zip |
py2man: Make authors configurable
Diffstat (limited to 'py2man')
-rw-r--r-- | py2man/command.template | 5 | ||||
-rw-r--r-- | py2man/manpages.py | 15 | ||||
-rw-r--r-- | py2man/sub-command.template | 5 |
3 files changed, 15 insertions, 10 deletions
diff --git a/py2man/command.template b/py2man/command.template index 71ee35e..5879a05 100644 --- a/py2man/command.template +++ b/py2man/command.template @@ -22,10 +22,7 @@ Please assign bug to <gkeys@gentoo.org> email alias. Gentoo Keys project is under GPL-2 License. .SH AUTHORS -.br -Brian Dolbec <dolsen@gentoo.org> -.br -Pavlos Ratis <dastergon@gentoo.org> +%(authors) .SH "SEE ALSO" .BR gkeys.conf (1), diff --git a/py2man/manpages.py b/py2man/manpages.py index 2490fcc..0fd82ed 100644 --- a/py2man/manpages.py +++ b/py2man/manpages.py @@ -22,11 +22,12 @@ SubCmdHdr = '.SH \\ %s' class ManPage(object): - def __init__(self, prog, version, template, path): + def __init__(self, prog, version, template, docpath, authors): self.prog = prog self.version = version self.template = template - self.path = path + self.path = docpath + self.authors = authors @staticmethod @@ -62,6 +63,14 @@ class ManPage(object): @staticmethod + def gen_brlist(_list): + output = [] + for member in _list: + output.append(BreakStr % member) + return '\n'.join(output) + + + @staticmethod def gen_actions(actions): acts = [] for act in actions: @@ -113,6 +122,7 @@ class ManPage(object): data['prog'] = self.prog data['version'] = self.version data['date'] = datetime.strftime(datetime.today(),'%B %d, %Y') + data['authors'] = self.gen_brlist(self.authors) data['action'] = action data['actions'] = self.gen_actions(actions) data['options'] = self.gen_options(Action_Map[action]['options']) @@ -154,6 +164,7 @@ class ManPage(object): data['prog'] = self.prog data['version'] = self.version data['date'] = datetime.strftime(datetime.today(),'%B %d, %Y') + data['authors'] = self.gen_brlist(self.authors) data['actions'] = self.gen_actions(list(prog_map['sub-cmds'])) data['options'] = self.gen_options(prog_map['options']) data['desc'] = prog_map['desc'] diff --git a/py2man/sub-command.template b/py2man/sub-command.template index 41de926..89d1b1b 100644 --- a/py2man/sub-command.template +++ b/py2man/sub-command.template @@ -25,10 +25,7 @@ Please assign bug to <gkeys@gentoo.org> email alias. Gentoo Keys project is under GPL-2 License. .SH AUTHORS -.br -Brian Dolbec <dolsen@gentoo.org> -.br -Pavlos Ratis <dastergon@gentoo.org> +%(authors) .SH "SEE ALSO" .BR gkeys (1), |