File: genmanpages.py

package info (click to toggle)
cnvkit 0.9.8-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 70,524 kB
  • sloc: python: 9,667; makefile: 305; sh: 53; xml: 38
file content (21 lines) | stat: -rwxr-xr-x 767 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/python3
from __future__ import print_function
from cnvlib import commands
import os
import sys
if os.name == 'posix' and sys.version_info[0] < 3:
    import subprocess32 as subprocess
else:
    import subprocess

for subcommand in commands.AP_subparsers._get_subactions():
    name = subcommand.dest
    description = subcommand.help
    if name == 'version':
        break
    with open("debian/cnvkit-%s.man.include" % name, "w") as f:
        print("[NAME]", file=f)
        print("cnvkit_%s \- %s" % (name, description), file=f)
    subprocess.check_call(['help2man', '--no-info', '--version-string=%s'
            % sys.argv[1], '--include=debian/cnvkit-%s.man.include' % name,
            '--output=debian/cnvkit-%s.1' % name, './cnvkit %s' % name])