diff options
author | 2012-12-22 17:21:48 -0800 | |
---|---|---|
committer | 2012-12-22 17:21:48 -0800 | |
commit | fde00b46e7e01cb7fc73f336df79253ab27009c7 (patch) | |
tree | e66cc305e9d717d3391127960b3113a8cd2428be | |
parent | Add a blank line between pkgs in a query, bug 448190 (diff) | |
download | gentoolkit-fde00b46e7e01cb7fc73f336df79253ab27009c7.tar.gz gentoolkit-fde00b46e7e01cb7fc73f336df79253ab27009c7.tar.bz2 gentoolkit-fde00b46e7e01cb7fc73f336df79253ab27009c7.zip |
Make the man page titles more consistent and enable setup.py to set the manpage versions.
-rw-r--r-- | man/eclean.1 | 2 | ||||
-rw-r--r-- | man/eread.1 | 2 | ||||
-rw-r--r-- | man/eshowkw.1 | 2 | ||||
-rw-r--r-- | man/glsa-check.1 | 2 | ||||
-rw-r--r-- | man/revdep-rebuild.1 | 2 | ||||
-rwxr-xr-x | setup.py | 23 |
6 files changed, 25 insertions, 8 deletions
diff --git a/man/eclean.1 b/man/eclean.1 index 4cb9204..de1daee 100644 --- a/man/eclean.1 +++ b/man/eclean.1 @@ -1,4 +1,4 @@ -.TH "eclean" "1" "0.4.1" "gentoolkit" "" +.TH "ECLEAN" "1" "0.4.1" "gentoolkit" "" .SH "NAME" eclean \- A cleaning tool for Gentoo distfiles and binary packages. .SH "SYNOPSIS" diff --git a/man/eread.1 b/man/eread.1 index 78181a1..595b749 100644 --- a/man/eread.1 +++ b/man/eread.1 @@ -1,4 +1,4 @@ -.TH "eread" "1" "1.0" "Donnie Berkholz" "gentoolkit" +.TH "EREAD" "1" "1.0" "Donnie Berkholz" "gentoolkit" .SH "NAME" .LP eread \- Gentoo: Tool to display and manage ELOG files from portage diff --git a/man/eshowkw.1 b/man/eshowkw.1 index 46ab008..62ccb9a 100644 --- a/man/eshowkw.1 +++ b/man/eshowkw.1 @@ -1,4 +1,4 @@ -.TH "eshowkw" "1" "" "Tomáš Chvátal" "" +.TH "ESHOWKW" "1" "" "Tomáš Chvátal" "" .SH "NAME" .LP eshowkw \- Gentoo: Tool to package keywords diff --git a/man/glsa-check.1 b/man/glsa-check.1 index 260fa17..018bbd2 100644 --- a/man/glsa-check.1 +++ b/man/glsa-check.1 @@ -1,4 +1,4 @@ -.TH "glsa-check" "1" "0.3" "Marius Mauch" "gentoolkit" +.TH "GLSA-CHECK" "1" "0.3" "Marius Mauch" "gentoolkit" .SH "NAME" .LP glsa\-check \- Gentoo: Tool to locally monitor and manage GLSAs diff --git a/man/revdep-rebuild.1 b/man/revdep-rebuild.1 index c45c6a1..581dd66 100644 --- a/man/revdep-rebuild.1 +++ b/man/revdep-rebuild.1 @@ -1,4 +1,4 @@ -.TH "revdep\-rebuild" "1" "" "gentoolkit" "" +.TH "REVDEP-REBUILD" "1" "" "gentoolkit" .SH "NAME" revdep\-rebuild \- Gentoo: Reverse Dependency Rebuilder .SH "SYNOPSIS" @@ -32,7 +32,7 @@ bash_scripts = [os.path.join(cwd, path) for path in ( )] # Python files that need `__version__ = ""` subbed, relative to this dir: -python_scripts = [os.path.join(cwd, path) for path in ( +python_scripts = [(os.path.join(cwd, path), None) for path in ( 'bin/eclean', 'bin/epkginfo', 'bin/glsa-check', @@ -43,6 +43,17 @@ python_scripts = [os.path.join(cwd, path) for path in ( 'pym/gentoolkit/revdep_rebuild/__init__.py' )] +manpages = [(os.path.join(cwd, path[0]), path[1]) for path in ( + ('man/eclean.1', 'ECLEAN'), + ('man/enalyze.1', 'ENALYZE'), + ('man/epkginfo.1', 'EPKGINFO'), + ('man/equery.1', 'EQUERY'), + ('man/eread.1', 'EREAD'), + ('man/eshowkw.1', 'ESHOWKW'), + ('man/euse.1', 'EUSE'), + ('man/glsa-check.1', 'GLSA-CHECK'), + ('man/revdep-rebuild.1', 'REVDEP-REBUILD'), +)] class set_version(core.Command): """Set python __version__ and bash VERSION to our __version__.""" @@ -61,9 +72,13 @@ class set_version(core.Command): def sub(files, pattern): for f in files: updated_file = [] - with io.open(f, 'r', 1, 'utf_8') as s: + with io.open(f[0], 'r', 1, 'utf_8') as s: + if f[1]: + _pattern = pattern % f[1] + else: + _pattern = pattern for line in s: - newline = re.sub(pattern, '"%s"' % ver, line, 1) + newline = re.sub(_pattern, '"%s"' % ver, line, 1) if newline != line: #log.info("%s: %s" % (f, newline)) print("%s: %s" % (f, newline)) @@ -76,6 +91,8 @@ class set_version(core.Command): sub(bash_scripts, bash_re) python_re = r'(?<=^__version__ = )' + quote + '[^\'"]*' + quote sub(python_scripts, python_re) + man_re = r'(?<=^.TH "[.*]" "[0-9]" )' + quote + '[^\'"]*' + quote + sub(manpages, man_re) def load_test(): |