Update classes and functions to use the item as source of main heading instead of index
This commit is contained in:
@@ -91,7 +91,7 @@ class DocMerger:
|
||||
docText = (inDoc.readDocument() or "").rstrip("\n")
|
||||
|
||||
if addComment:
|
||||
docInfo = srcItem.describeMe("H0")
|
||||
docInfo = srcItem.describeMe()
|
||||
docSt, _ = srcItem.getImportStatus(incIcon=False)
|
||||
cmtLine = f"% {cmtPrefix} {docInfo}: {srcItem.itemName} [{docSt}]\n\n"
|
||||
docText = cmtLine + docText
|
||||
|
||||
@@ -276,7 +276,7 @@ class NWItem:
|
||||
# Lookup Methods
|
||||
##
|
||||
|
||||
def describeMe(self, hLevel=None):
|
||||
def describeMe(self):
|
||||
"""Return a string description of the item.
|
||||
"""
|
||||
descKey = "none"
|
||||
@@ -286,13 +286,13 @@ class NWItem:
|
||||
descKey = "folder"
|
||||
elif self._type == nwItemType.FILE:
|
||||
if self._layout == nwItemLayout.DOCUMENT:
|
||||
if hLevel == "H1":
|
||||
if self._heading == "H1":
|
||||
descKey = "doc_h1"
|
||||
elif hLevel == "H2":
|
||||
elif self._heading == "H2":
|
||||
descKey = "doc_h2"
|
||||
elif hLevel == "H3":
|
||||
elif self._heading == "H3":
|
||||
descKey = "doc_h3"
|
||||
elif hLevel == "H4":
|
||||
elif self._heading == "H4":
|
||||
descKey = "doc_h4"
|
||||
else:
|
||||
descKey = "document"
|
||||
|
||||
Reference in New Issue
Block a user