2 # Wireshark - Network traffic analyzer
3 # By Gerald Combs <gerald@wireshark.org>
4 # Copyright 1998 Gerald Combs
6 # SPDX-License-Identifier: GPL-2.0-or-later
9 Go through all user guide help URLs listed in the program
10 and confirm these are present in the User's Guide source files.
19 with
open("ui/help_url.c") as f
:
21 if url
:= search(r
"user_guide_url\(\"(.*).html
\"\
);", line):
22 chapter = url.group(1)
23 found[chapter] = False
25 adoc_files = glob("doc
/wsug_src
/*.adoc
")
27 for adoc_file in adoc_files:
28 with open(adoc_file) as f:
30 # Fail on legacy block anchor syntax (double square brackets)
31 if tag := search(r"^\
[\
#(.*)]", line):
32 chapter
= tag
.group(1)
39 if not found
[chapter
]:
41 print("The following chapters are missing in the User's Guide:")