Export the entire novel structure from the Outline view

This commit is contained in:
Veronica Berglyd Olsen
2025-04-10 21:59:36 +02:00
parent 0a9c530f06
commit 6dcdd34fe1
2 changed files with 74 additions and 6 deletions
+8
View File
@@ -608,6 +608,10 @@ class Index:
yield from tItem.items()
return
def getStoryKeys(self) -> set[str]:
"""Return all story structure keys."""
return self._itemIndex.allStoryKeys()
def novelStructure(
self, rootHandle: str | None = None, activeOnly: bool = True
) -> Iterable[tuple[str, str, str, IndexHeading]]:
@@ -956,6 +960,10 @@ class ItemIndex:
self._items[tHandle] = IndexNode(self._cache, tHandle, nwItem)
return
def allStoryKeys(self) -> set[str]:
"""Return all story structure keys."""
return self._cache.story.copy()
def allItemTags(self, tHandle: str) -> list[str]:
"""Get all tags set for headings of an item."""
if tHandle in self._items: