diff options
author | Kefu Chai <kchai@redhat.com> | 2015-04-21 21:05:09 +0800 |
---|---|---|
committer | Kefu Chai <kchai@redhat.com> | 2015-04-21 21:12:45 +0800 |
commit | b2b443cd4a6feeed885493092f0ae8d56f12fd74 (patch) | |
tree | 75e52ef279058668079abd59204feeb5eac33861 /man | |
parent | 008b151958ce9b7574d06daa04f82dd00448a200 (diff) | |
download | ceph-b2b443cd4a6feeed885493092f0ae8d56f12fd74.tar.gz |
man: fix the description in NAME section
Signed-off-by: Kefu Chai <kchai@redhat.com>
Diffstat (limited to 'man')
-rw-r--r-- | man/conf.py | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/man/conf.py b/man/conf.py index 40f1b1e03f0..2b24223b12d 100644 --- a/man/conf.py +++ b/man/conf.py @@ -7,27 +7,27 @@ release = 'dev' exclude_patterns = ['**/.#*', '**/*~'] -def _get_description(fname): + +def _get_description(fname, base): with file(fname) as f: one = None - for line in f: - line = line.rstrip('\n') + while True: + line = f.readline().rstrip('\n') if not line: continue if line.startswith(':') and line.endswith(':'): continue one = line break - two = f.readline() - three = f.readline() - print one, three + two = f.readline().rstrip('\n') + three = f.readline().rstrip('\n') assert one == three - assert all(c=='=' for c in one.rstrip('\n')) - two = two.strip() + assert all(c=='=' for c in one) name, description = two.split('--', 1) assert name.strip() == base return description.strip() + def _get_manpages(): src_dir = os.path.dirname(__file__) top_srcdir = os.path.dirname(src_dir) @@ -43,7 +43,8 @@ def _get_manpages(): continue if base == 'index': continue - description = os.path.join(section_dir, filename) + path = os.path.join(section_dir, filename) + description = _get_description(path, base) yield ( os.path.join(section, base), base, |