diff options
author | Bojidar Marinov <bojidar.marinov.bg@gmail.com> | 2017-09-28 13:11:42 +0300 |
---|---|---|
committer | Bojidar Marinov <bojidar.marinov.bg@gmail.com> | 2017-09-28 13:13:32 +0300 |
commit | 1f60d0c23f25910904cad1b2318785e00228c90c (patch) | |
tree | cd5a0a64934fa68c2c76ebbedb6a7eafce393d59 /doc | |
parent | 62cb43bb8dec8f5078012b58ff06a2077078565f (diff) |
Allow using wildcards to filter docstatus class names
[ci skip]
Diffstat (limited to 'doc')
-rw-r--r-- | doc/tools/doc_status.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/doc/tools/doc_status.py b/doc/tools/doc_status.py index b0fa36230c..f99b48f1c9 100644 --- a/doc/tools/doc_status.py +++ b/doc/tools/doc_status.py @@ -1,5 +1,6 @@ #!/usr/bin/env python3 +import fnmatch import os import sys import re @@ -353,8 +354,13 @@ for file in input_file_list: class_names.sort() if len(input_class_list) < 1: - input_class_list = class_names + input_class_list = ['*'] +filtered_classes = set() +for pattern in input_class_list: + filtered_classes |= set(fnmatch.filter(class_names, pattern)) +filtered_classes = list(filtered_classes) +filtered_classes.sort() ################################################################################ # Make output table # @@ -366,10 +372,7 @@ table_column_chars = '|' total_status = ClassStatus('Total') -for cn in input_class_list: - if not cn in classes: - print('Cannot find class ' + cn + '!') - sys.exit(255) +for cn in filtered_classes: c = classes[cn] validate_tag(c, 'class') |