Skip to content

Commit

Permalink
docs: Rework portals.conf manpage
Browse files Browse the repository at this point in the history
Generate a synopsis, and tag it a bit more. Cleanup some attributes
in the manpage file.

Closes: #1096
  • Loading branch information
GeorgesStavracas committed Oct 11, 2023
1 parent f413c9b commit cc74099
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 5 deletions.
12 changes: 10 additions & 2 deletions doc/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,24 @@ if build_docbook
endif

if rst2man.found()
manpage_conf = configuration_data()
manpage_conf.set('DATADIR', datadir)
manpage_conf.set('SYSCONFDIR', sysconfdir)

rst2man_flags = [
'--syntax-highlight=none',
]

man_pages = [
{ 'input': 'portals-conf.rst', 'output': 'portals.conf', 'section': '5' },
{ 'input': 'portals.conf.rst.in', 'output': 'portals.conf', 'section': '5' },
]

foreach man_page: man_pages
man_input = man_page.get('input')
man_input = configure_file(
input: man_page.get('input'),
output: man_page.get('input').split('.in').get(0),
configuration: manpage_conf,
)
man_output = man_page.get('output', man_input)
man_section = man_page.get('section', '1')
man_full = '@0@.@1@'.format(man_output, man_section)
Expand Down
24 changes: 21 additions & 3 deletions doc/portals-conf.rst → doc/portals.conf.rst.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
.. _portals.conf(5):

============
portals.conf
============
Expand All @@ -8,8 +6,28 @@ portals.conf
XDG desktop portal configuration
--------------------------------

:Manual section: 5
:Manual group: File Formats Manual

.. _synopsis:

SYNOPSIS
========

*$XDG_CONFIG_HOME/xdg-desktop-portal/{\*-}portals.conf*

*$XDG_CONFIG_DIRS/xdg-desktop-portal/{\*-}portals.conf*

*@SYSCONFDIR@/xdg-desktop-portal/{\*-}portals.conf*

*$XDG_DATA_HOME/xdg-desktop-portal/{\*-}portals.conf*

*$XDG_DATA_DIRS/xdg-desktop-portal/{\*-}portals.conf*

*@DATADIR@/xdg-desktop-portal/{\*-}portals.conf*

DESCRIPTION
-----------
===========

xdg-desktop-portal uses a configuration file to determine which portal backend
should be used to provide the implementation for the requested interface.
Expand Down

0 comments on commit cc74099

Please sign in to comment.