| File vimdoc2html.py changed (mode: 100755) (index c045067..afddc6e) |
| ... |
... |
script_dir = path.dirname(path.realpath(__file__)) |
| 55 |
55 |
parser = argparse.ArgumentParser(description=__doc__) |
parser = argparse.ArgumentParser(description=__doc__) |
| 56 |
56 |
parser.add_argument('-r', '--raw', dest='raw', action='store_true', |
parser.add_argument('-r', '--raw', dest='raw', action='store_true', |
| 57 |
57 |
help="Don't wrap output into template") |
help="Don't wrap output into template") |
|
58 |
|
parser.add_argument('-o', '--output', |
|
59 |
|
help="output HTML file") |
| 58 |
60 |
parser.add_argument('-t', '--template', |
parser.add_argument('-t', '--template', |
| 59 |
61 |
help="template file (overrides builtin template)") |
help="template file (overrides builtin template)") |
| 60 |
62 |
parser.add_argument('vimdoc', nargs=1, help='Vim documentation file') |
parser.add_argument('vimdoc', nargs=1, help='Vim documentation file') |
| |
| ... |
... |
subprocess.call([path.join(script_dir, 'helpztags'), src_dir]) |
| 68 |
70 |
|
|
| 69 |
71 |
tags_path = path.join(src_dir, 'tags') |
tags_path = path.join(src_dir, 'tags') |
| 70 |
72 |
css_path = path.join(script_dir, 'vimhelp.css') |
css_path = path.join(script_dir, 'vimhelp.css') |
| 71 |
|
html_path = '%s.html' % src_filename; |
|
|
73 |
|
html_path = args.output if args.output is not None else '%s.html' % src_filename |
| 72 |
74 |
|
|
| 73 |
75 |
# read in all external files |
# read in all external files |
| 74 |
76 |
with io.open(tags_path, 'r', encoding='utf-8') as tags_file: |
with io.open(tags_path, 'r', encoding='utf-8') as tags_file: |