From: Jérémy Rosen Date: Tue, 14 Apr 2020 18:15:19 +0000 (+0200) Subject: make-directive-index: allow pages to specify the path to search X-Git-Tag: v246-rc1~549^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=acbfdec33e982c01cc2f2cc2cd6bed43665570e7;p=thirdparty%2Fsystemd.git make-directive-index: allow pages to specify the path to search So far, make-directive-index would look for ./valistentry/term/varname for elements to add to the directive man page. This commit allows to specify xpath= in the varlist directive to tell the generator what to look for. --- diff --git a/tools/make-directive-index.py b/tools/make-directive-index.py index da10575f32b..659c6275f5f 100755 --- a/tools/make-directive-index.py +++ b/tools/make-directive-index.py @@ -180,9 +180,10 @@ def _extract_directives(directive_groups, formatting, page): storopt = directive_groups['options'] for variablelist in t.iterfind('.//variablelist'): klass = variablelist.attrib.get('class') + searchpath = variablelist.attrib.get('xpath','./varlistentry/term/varname') storvar = directive_groups[klass or 'miscellaneous'] #