summaryrefslogtreecommitdiff
path: root/rst2man.py
diff options
context:
space:
mode:
Diffstat (limited to 'rst2man.py')
-rw-r--r--rst2man.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/rst2man.py b/rst2man.py
index 9842573..1dd5c1d 100644
--- a/rst2man.py
+++ b/rst2man.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
-# Author:
+# Author:
# Contact: [email protected]
# Copyright: This module has been placed in the public domain.
@@ -28,7 +28,7 @@ from docutils.core import publish_cmdline, default_description
Simple man page writer for reStructuredText.
Man pages (short for "manual pages") contain system documentation on unix-like
-systems. The pages are grouped in numbered sections:
+systems. The pages are grouped in numbered sections:
1 executable programs and shell commands
2 system calls
@@ -150,7 +150,7 @@ class Table:
text += '|%s|.\n' % ('|'.join(self._coldefs))
for row in self._rows:
# row = array of cells. cell = array of lines.
- # line above
+ # line above
text += '_\n'
max_lns_in_cell = 0
for cell in row:
@@ -194,8 +194,8 @@ class Translator(nodes.NodeVisitor):
self._docinfo = {
"title" : "", "subtitle" : "",
"manual_section" : "", "manual_group" : "",
- "author" : "",
- "date" : "",
+ "author" : "",
+ "date" : "",
"copyright" : "",
"version" : "",
}
@@ -224,7 +224,7 @@ class Translator(nodes.NodeVisitor):
'option_list_item' : ('\n.TP', ''),
#option_group, option
'description' : ('\n', ''),
-
+
'reference' : (r'\fI\%', r'\fP'),
#'target' : (r'\fI\%', r'\fP'),
'emphasis': ('\\fI', '\\fP'),
@@ -538,14 +538,14 @@ class Translator(nodes.NodeVisitor):
def depart_document(self, node):
if self._docinfo['author']:
- self.body.append('\n.SH AUTHOR\n%s\n'
+ self.body.append('\n.SH AUTHOR\n%s\n'
% self._docinfo['author'])
if self._docinfo['copyright']:
- self.body.append('\n.SH COPYRIGHT\n%s\n'
+ self.body.append('\n.SH COPYRIGHT\n%s\n'
% self._docinfo['copyright'])
self.body.append(
self.comment(
- 'Generated by docutils manpage writer on %s.\n'
+ 'Generated by docutils manpage writer on %s.\n'
% (time.strftime('%Y-%m-%d %H:%M')) ) )
def visit_emphasis(self, node):
@@ -600,7 +600,7 @@ class Translator(nodes.NodeVisitor):
def depart_field_list(self, node):
self.dedent('depart_field_list')
-
+
def visit_field_name(self, node):
if self._in_docinfo:
@@ -830,7 +830,7 @@ class Translator(nodes.NodeVisitor):
# as one option could have several forms it is a group
# options without parameter bold only, .B, -v
# options with parameter bold italic, .BI, -f file
-
+
# we do not know if .B or .BI
self.context.append('.B') # blind guess
self.context.append(len(self.body)) # to be able to insert later