LADI
/
spa
1
Fork 0

doc: include manpages in html docs

Include manpages as raw text in html docs.  Simple and readable
enough...
This commit is contained in:
Pauli Virtanen 2022-01-20 21:06:54 +02:00 committed by Wim Taymans
parent 695f8dfdd9
commit 88e744a06f
16 changed files with 56 additions and 36 deletions

5
doc/manpage.dox.in Normal file
View File

@ -0,0 +1,5 @@
/** \page @pagename@ @title@
\verbinclude @filename@
*/

View File

@ -26,7 +26,6 @@ extra_docs = [
'pipewire-daemon.dox',
'pipewire-library.dox',
'pipewire-modules.dox',
'pipewire-tools.dox',
'pipewire-session-manager.dox',
'pipewire-objects-design.dox',
'pipewire-audio.dox',
@ -115,6 +114,30 @@ examples_dox = configure_file(input: 'examples.dox.in',
input_dirs += [ 'doc/examples.dox' ]
man_doxygen = []
man_subpages = []
foreach m : manpages
manconf = configuration_data()
pagename = 'page_man_' + m.split('.rst.in').get(0).replace('.', '_').replace('-', '_')
filename = m.split('.rst.in').get(0) + '.dox'
manconf.set('pagename', pagename)
manconf.set('title', m.split('.rst.in').get(0).replace('.1','').replace('.5',''))
manconf.set('filename', meson.project_source_root() / 'man' / m)
manfile = configure_file(input: 'manpage.dox.in',
output: filename,
configuration: manconf)
man_doxygen += [manfile]
man_subpages += ['- \subpage ' + pagename]
input_dirs += [ 'doc/' + filename ]
endforeach
pw_tools_dox_conf = configuration_data()
pw_tools_dox_conf.set('man_subpages', '\n'.join(man_subpages))
pw_tools_dox = configure_file(input: 'pipewire-tools.dox.in',
output: 'pipewire-tools.dox',
configuration: pw_tools_dox_conf)
input_dirs += [ 'doc/pipewire-tools.dox' ]
doxyfile_conf.set('inputs', ' '.join(inputs + input_dirs))
doxyfile_conf.set('cssfiles', ' '.join(cssfiles))
doxyfile_conf.set('path_prefixes', ' '.join(path_prefixes))
@ -131,7 +154,7 @@ if docdir == ''
endif
html_target = custom_target('pipewire-docs',
input: [ doxyfile, examples_dox ] + inputs + cssfiles,
input: [ doxyfile, examples_dox, pw_tools_dox ] + inputs + cssfiles + man_doxygen,
output: [ 'html' ],
command: [ doxygen, doxyfile ],
install: true,

View File

@ -1,4 +1,7 @@
/** \page page_tools PipeWire Tools
*/
Manual pages:
@man_subpages@
*/

View File

@ -23,6 +23,10 @@ if not get_option('pipewire-jack').disabled()
manpages += 'pw-jack.1.rst.in'
endif
if not generate_manpages
subdir_done()
endif
foreach m : manpages
file = m.split('.rst.in').get(0)
rst = configure_file(input : m,

View File

@ -1,5 +1,3 @@
.. This file is part of PipeWire.
pipewire-pulse
##############

View File

@ -1,5 +1,3 @@
.. This file is part of PipeWire.
pipewire
########

View File

@ -1,5 +1,3 @@
.. This file is part of PipeWire.
pipewire.conf
#############

View File

@ -1,5 +1,3 @@
.. This file is part of PipeWire.
pw-cat
######
@ -44,13 +42,16 @@ OPTIONS
a connection is made to the default PipeWire instance.
-p | --playback
Playback mode. Read data from the specified file, and play it back. If the tool is called under the name **pw-play** or **pw-midiplay** this is the default.
Playback mode. Read data from the specified file, and play it back. If the tool
is called under the name **pw-play** or **pw-midiplay** this is the default.
-r | --record
Recording mode. Capture data and write it to the specified file. If the tool is called under the name **pw-record** or **pw-midirecord** this is the default.
Recording mode. Capture data and write it to the specified file. If the tool is
called under the name **pw-record** or **pw-midirecord** this is the default.
-m | --midi
MIDI mode. *FILE* is a MIDI file. If the tool is called under the name **pw-midiplay** or **pw-midirecord** this is the default.
MIDI mode. *FILE* is a MIDI file. If the tool is called under the name
**pw-midiplay** or **pw-midirecord** this is the default.
--media-type=VALUE
Set the media type property (default Audio/Midi depending on mode).

View File

@ -1,5 +1,3 @@
.. This file is part of PipeWire.
pw-cli
######
@ -45,7 +43,8 @@ quit
MODULE MANAGEMENT
=================
| Modules are loaded and unloaded in the local instance and can add functionality or objects to the local instance.
| Modules are loaded and unloaded in the local instance and can add
| functionality or objects to the local instance.
load-module *name* [*arguments...*]
Load a module specified by its name and arguments. For most

View File

@ -1,5 +1,3 @@
.. This file is part of PipeWire.
pw-dot
######

View File

@ -1,5 +1,3 @@
.. This file is part of PipeWire.
pw-jack
#######

View File

@ -1,5 +1,3 @@
.. This file is part of PipeWire.
pw-metadata
###########

View File

@ -1,5 +1,3 @@
.. This file is part of PipeWire.
pw-mididump
###########

View File

@ -1,5 +1,3 @@
.. This file is part of PipeWire.
pw-mon
######

View File

@ -1,5 +1,3 @@
.. This file is part of PipeWire.
pw-profiler
###########

View File

@ -479,22 +479,25 @@ if alsa_dep.found()
subdir('pipewire-alsa/tests')
endif
doxygen = find_program('doxygen', required : get_option('docs'))
if doxygen.found()
subdir('doc')
endif
generate_manpages = false
if not get_option('man').disabled()
rst2man = find_program('rst2man', required: false)
if not rst2man.found()
rst2man = find_program('rst2man.py', required: get_option('man'))
endif
summary({'Manpage generation': rst2man.found()}, bool_yn: true)
if rst2man.found()
subdir('man')
generate_manpages = true
endif
endif
summary({'Manpage generation': generate_manpages}, bool_yn: true)
subdir('man')
doxygen = find_program('doxygen', required : get_option('docs'))
if doxygen.found()
subdir('doc')
endif
setenv = find_program('pw-uninstalled.sh')
run_target('pw-uninstalled',
command : [setenv,