Documentation features parser module

Library to parse the Linux Feature files and produce a ReST book.

class lib.python.feat.parse_features.ParseFeature(prefix, debug=0, enable_fname=False)

Bases: object

Parses Documentation/features, allowing to generate ReST documentation from it.

emit(msg='', end='\n')

Helper function to append a new message for feature output.

h_arch = 'Architecture'

architecture header string.

h_description = 'Description'

description header string.

h_kconfig = 'Kconfig'

Kernel config header string.

h_name = 'Feature'

feature header string.

h_status = 'Status'

status header string.

h_subsys = 'Subsystem'

subsystem header string.

list_arch_features(arch, feat)

Print a matrix of kernel feature support for the chosen architecture.

matrix_lines(desc_size, max_size_status, header)

Helper function to split element tables at the output matrix.

output_arch_table(arch, feat=None)

Output feature(s) for a given architecture.

output_feature(feat)

Output a feature on all architectures.

output_matrix()

Generates a set of tables, groped by subsystem, containing what’s the feature state on each architecture.

parse()

Parses all arch-support.txt feature files inside self.prefix.

parse_error(fname, ln, msg, data=None)

Displays an error message, printing file name and line.

parse_feat_file(fname)

Parses a single arch-support.txt feature file.

status_map = {'N/A': 2, 'TODO': 1, 'ok': 0}

Sort order for status. Others will be mapped at the end.