Make some general import/export functionality improvements

This commit is contained in:
Veronica Berglyd Olsen
2024-12-31 00:14:25 +01:00
parent 33aea82e6e
commit 136939d391
3 changed files with 22 additions and 16 deletions
+7 -1
View File
@@ -29,7 +29,8 @@ import uuid
from typing import TYPE_CHECKING, Any
from novelwriter.common import (
checkBool, checkInt, checkStringNone, checkUuid, isHandle, simplified
checkBool, checkInt, checkStringNone, checkUuid, isHandle,
makeFileNameSafe, simplified
)
from novelwriter.core.status import NWStatus
@@ -101,6 +102,11 @@ class NWProjectData:
"""Return the project name."""
return self._name
@property
def fileSafeName(self) -> str:
"""Return the project name in a file name safe format."""
return makeFileNameSafe(self._name)
@property
def author(self) -> str:
"""Return the project author."""