Add stats counting to tokenizer class
This commit is contained in:
@@ -52,14 +52,15 @@ class NWBuildDocument:
|
||||
manuscript, based on a build definition object (BuildSettings).
|
||||
"""
|
||||
|
||||
__slots__ = ("_project", "_build", "_queue", "_error", "_cache")
|
||||
__slots__ = ("_project", "_build", "_queue", "_error", "_cache", "_count")
|
||||
|
||||
def __init__(self, project: NWProject, build: BuildSettings) -> None:
|
||||
def __init__(self, project: NWProject, build: BuildSettings, doCount: bool = False) -> None:
|
||||
self._project = project
|
||||
self._build = build
|
||||
self._queue = []
|
||||
self._error = None
|
||||
self._cache = None
|
||||
self._count = doCount
|
||||
return
|
||||
|
||||
##
|
||||
@@ -319,6 +320,8 @@ class NWBuildDocument:
|
||||
bldObj.doPreProcessing()
|
||||
bldObj.tokenizeText()
|
||||
bldObj.doHeaders()
|
||||
if self._count:
|
||||
bldObj.countStats()
|
||||
if convert:
|
||||
bldObj.doConvert()
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user