MCPcopy Create free account
hub / github.com/catchorg/Catch2 / updateDocumentToC

Function updateDocumentToC

tools/scripts/updateDocumentToC.py:389–396  ·  view source on GitHub ↗

Add or update table of contents to specified paths. Return number of changed files

(paths, min_toc_len, verbose)

Source from the content-addressed store, hash-verified

387 return 1
388
389def updateDocumentToC(paths, min_toc_len, verbose):
390 """Add or update table of contents to specified paths. Return number of changed files"""
391 n = 0
392 for g in paths:
393 for f in glob.glob(g):
394 if os.path.isfile(f):
395 n = n + updateSingleDocumentToC(input_file=f, min_toc_len=min_toc_len, verbose=verbose)
396 return n
397
398def updateDocumentToCMain():
399 """Add or update table of contents to specified paths."""

Callers 1

updateDocumentToCMainFunction · 0.85

Calls 1

updateSingleDocumentToCFunction · 0.85

Tested by

no test coverage detected