Skip to content

Commit

Permalink
Use sphinx builder to generate man page
Browse files Browse the repository at this point in the history
  • Loading branch information
martinhoyer committed Jul 24, 2024
1 parent 74cde61 commit c875ad1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
1 change: 1 addition & 0 deletions .packit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ issue_repository: https://github.com/teemtee/tmt
srpm_build_deps:
- hatch
- python3-hatch-vcs
- make

jobs:

Expand Down
3 changes: 2 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,10 +297,11 @@ def _load_theme(
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_man, '', 'tmt Documentation',
('man', 'tmt', 'tmt Documentation',
[author], 1)
]


# If true, show URL addresses after external links.
# man_show_urls = False

Expand Down
10 changes: 4 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -178,12 +178,10 @@ dependencies = ["tmt[docs]"]
# files below, but it may be providing additional metadata for RTD to index.
html = "sphinx-build -b html {root}/docs {root}/docs/_build {args}"
man = [
"cp {root}/docs/header.txt {root}/man.rst",
"tail -n+8 docs/overview.rst >> {root}/man.rst",
# TODO rst2man cannot process this directive, removed for now
"sed '/versionadded::/d' -i {root}/man.rst",
"rst2man.py {root}/man.rst > {root}/tmt.1",
"rm -f {root}/man.rst",
"(cat {root}/docs/header.txt; echo; tail -n+8 {root}/docs/overview.rst) > {root}/docs/man.rst",
"sed '/versionadded::/d' -i {root}/docs/man.rst",
"sphinx-build -b man {root}/docs/ {root}",
"rm -f {root}/docs/man.rst",
]

[dirs.env]
Expand Down

0 comments on commit c875ad1

Please sign in to comment.