Set link for man pages' source
So, contributors can get fast to source of our man pages. Signed-off-by: George Melikov <mail@gmelikov.ru>
This commit is contained in:
@@ -27,6 +27,7 @@ import sys
|
||||
LOG = logging.getLogger()
|
||||
logging.basicConfig(stream=sys.stdout, level=logging.DEBUG)
|
||||
|
||||
zfs_repo_url = 'https://github.com/openzfs/zfs/'
|
||||
|
||||
man_sections = {
|
||||
'1': 'User Commands',
|
||||
@@ -99,8 +100,9 @@ def run(in_dir, out_dir):
|
||||
os.makedirs(man_path, exist_ok=True)
|
||||
with open(os.path.join(man_path, 'index.rst'), "w") as f:
|
||||
f.write(
|
||||
"""
|
||||
.. THIS FILE IS AUTOGENERATED, DO NOT EDIT!
|
||||
""".. THIS FILE IS AUTOGENERATED, DO NOT EDIT!
|
||||
|
||||
:github_url: {zfs_repo_url}blob/master/man/
|
||||
|
||||
{name}
|
||||
{name_sub}
|
||||
@@ -109,7 +111,8 @@ def run(in_dir, out_dir):
|
||||
:glob:
|
||||
|
||||
*/index
|
||||
""".format(name=man_section_name,
|
||||
""".format(zfs_repo_url=zfs_repo_url,
|
||||
name=man_section_name,
|
||||
name_sub="=" * len(man_section_name))
|
||||
)
|
||||
|
||||
@@ -123,8 +126,9 @@ def run(in_dir, out_dir):
|
||||
name=section_name, num=section_num)
|
||||
with open(os.path.join(rst_dir, 'index.rst'), "w") as f:
|
||||
f.write(
|
||||
"""
|
||||
.. THIS FILE IS AUTOGENERATED, DO NOT EDIT!
|
||||
""".. THIS FILE IS AUTOGENERATED, DO NOT EDIT!
|
||||
|
||||
:github_url: {zfs_repo_url}blob/master/man/man{section_num}/
|
||||
|
||||
{name}
|
||||
{name_sub}
|
||||
@@ -133,14 +137,17 @@ def run(in_dir, out_dir):
|
||||
:glob:
|
||||
|
||||
*
|
||||
""".format(name=section_name_with_num,
|
||||
name_sub="=" * len(section_name_with_num))
|
||||
""".format(zfs_repo_url=zfs_repo_url,
|
||||
section_num=section_num,
|
||||
name=section_name_with_num,
|
||||
name_sub="=" * len(section_name_with_num),)
|
||||
)
|
||||
for page in section_pages:
|
||||
with open(os.path.join(rst_dir, page + '.rst'), "w") as f:
|
||||
f.write(
|
||||
"""
|
||||
.. THIS FILE IS AUTOGENERATED, DO NOT EDIT!
|
||||
""".. THIS FILE IS AUTOGENERATED, DO NOT EDIT!
|
||||
|
||||
:github_url: {zfs_repo_url}blob/master/man/man{section_num}/{name}
|
||||
|
||||
{name}
|
||||
{name_sub}
|
||||
@@ -154,7 +161,8 @@ def run(in_dir, out_dir):
|
||||
.. raw:: html
|
||||
|
||||
</div>
|
||||
""".format(name=page,
|
||||
""".format(zfs_repo_url=zfs_repo_url,
|
||||
name=page,
|
||||
build_dir=build_dir,
|
||||
section_num=section_num,
|
||||
name_sub="=" * len(page))
|
||||
|
||||
Reference in New Issue
Block a user