Merge branch 'main' into i18n
This commit is contained in:
+504
-481
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -315,12 +315,12 @@ class ProjectBuilder:
|
|||||||
# Settings
|
# Settings
|
||||||
projName = data.get("projName", lblNewProject)
|
projName = data.get("projName", lblNewProject)
|
||||||
projTitle = data.get("projTitle", lblNewProject)
|
projTitle = data.get("projTitle", lblNewProject)
|
||||||
projAuthors = data.get("projAuthors", "")
|
projAuthor = data.get("projAuthor", "")
|
||||||
|
|
||||||
project.data.setUuid(None)
|
project.data.setUuid(None)
|
||||||
project.data.setName(projName)
|
project.data.setName(projName)
|
||||||
project.data.setTitle(projTitle)
|
project.data.setTitle(projTitle)
|
||||||
project.data.setAuthors(projAuthors)
|
project.data.setAuthor(projAuthor)
|
||||||
project.setDefaultStatusImport()
|
project.setDefaultStatusImport()
|
||||||
project._projOpened = int(time())
|
project._projOpened = int(time())
|
||||||
|
|
||||||
@@ -330,8 +330,8 @@ class ProjectBuilder:
|
|||||||
novelTitle = project.data.title if project.data.title else project.data.name
|
novelTitle = project.data.title if project.data.title else project.data.name
|
||||||
|
|
||||||
titlePage = f"#! {novelTitle}\n\n"
|
titlePage = f"#! {novelTitle}\n\n"
|
||||||
if project.data.authors:
|
if project.data.author:
|
||||||
titlePage += f">> {lblByAuthors} {project.getFormattedAuthors()} <<\n\n"
|
titlePage += f">> {lblByAuthors} {project.data.author} <<\n\n"
|
||||||
|
|
||||||
aDoc = project.storage.getDocument(hTitlePage)
|
aDoc = project.storage.getDocument(hTitlePage)
|
||||||
aDoc.writeDocument(titlePage)
|
aDoc.writeDocument(titlePage)
|
||||||
|
|||||||
@@ -565,22 +565,6 @@ class NWProject(QObject):
|
|||||||
return self._lockedBy
|
return self._lockedBy
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def getFormattedAuthors(self):
|
|
||||||
"""Return a formatted string of authors.
|
|
||||||
"""
|
|
||||||
authors = self._data.authors
|
|
||||||
nAuth = len(authors)
|
|
||||||
|
|
||||||
result = ""
|
|
||||||
if nAuth == 1:
|
|
||||||
result = authors[0]
|
|
||||||
elif nAuth > 1:
|
|
||||||
result = "%s %s %s" % (
|
|
||||||
", ".join(authors[0:-1]), self.tr("and"), authors[-1]
|
|
||||||
)
|
|
||||||
|
|
||||||
return result
|
|
||||||
|
|
||||||
def getCurrentEditTime(self):
|
def getCurrentEditTime(self):
|
||||||
"""Get the total project edit time, including the time spent in
|
"""Get the total project edit time, including the time spent in
|
||||||
the current session.
|
the current session.
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ class NWProjectData:
|
|||||||
self._uuid = ""
|
self._uuid = ""
|
||||||
self._name = ""
|
self._name = ""
|
||||||
self._title = ""
|
self._title = ""
|
||||||
self._authors = []
|
self._author = ""
|
||||||
self._saveCount = 0
|
self._saveCount = 0
|
||||||
self._autoCount = 0
|
self._autoCount = 0
|
||||||
self._editTime = 0
|
self._editTime = 0
|
||||||
@@ -97,8 +97,8 @@ class NWProjectData:
|
|||||||
return self._title
|
return self._title
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def authors(self):
|
def author(self):
|
||||||
return self._authors
|
return self._author
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def saveCount(self):
|
def saveCount(self):
|
||||||
@@ -160,13 +160,6 @@ class NWProjectData:
|
|||||||
# Methods
|
# Methods
|
||||||
##
|
##
|
||||||
|
|
||||||
def addAuthor(self, value):
|
|
||||||
"""Add an author to the authors list.
|
|
||||||
"""
|
|
||||||
self._authors.append(simplified(str(value)))
|
|
||||||
self.theProject.setProjectChanged(True)
|
|
||||||
return
|
|
||||||
|
|
||||||
def incSaveCount(self):
|
def incSaveCount(self):
|
||||||
"""Increment the save count by one.
|
"""Increment the save count by one.
|
||||||
"""
|
"""
|
||||||
@@ -226,20 +219,12 @@ class NWProjectData:
|
|||||||
self.theProject.setProjectChanged(True)
|
self.theProject.setProjectChanged(True)
|
||||||
return
|
return
|
||||||
|
|
||||||
def setAuthors(self, value):
|
def setAuthor(self, value):
|
||||||
"""Set the list of authors from either a string with one author
|
"""Set the author value.
|
||||||
per line, or a list of authors.
|
|
||||||
"""
|
"""
|
||||||
self._authors = []
|
if value != self._title:
|
||||||
self.theProject.setProjectChanged(True)
|
self._author = simplified(str(value))
|
||||||
if isinstance(value, str):
|
|
||||||
for author in value.splitlines():
|
|
||||||
author = simplified(author)
|
|
||||||
if author:
|
|
||||||
self._authors.append(author)
|
|
||||||
self.theProject.setProjectChanged(True)
|
self.theProject.setProjectChanged(True)
|
||||||
elif isinstance(value, list):
|
|
||||||
self._authors = value
|
|
||||||
return
|
return
|
||||||
|
|
||||||
def setSaveCount(self, value):
|
def setSaveCount(self, value):
|
||||||
|
|||||||
@@ -246,7 +246,7 @@ class ProjectXMLReader:
|
|||||||
elif xItem.tag == "title":
|
elif xItem.tag == "title":
|
||||||
projData.setTitle(xItem.text)
|
projData.setTitle(xItem.text)
|
||||||
elif xItem.tag == "author":
|
elif xItem.tag == "author":
|
||||||
projData.addAuthor(xItem.text)
|
projData.setAuthor(xItem.text)
|
||||||
else:
|
else:
|
||||||
logger.warning("Ignored <root/project/%s> in XML", xItem.tag)
|
logger.warning("Ignored <root/project/%s> in XML", xItem.tag)
|
||||||
|
|
||||||
@@ -518,7 +518,7 @@ class ProjectXMLWriter:
|
|||||||
xProject = etree.SubElement(xRoot, "project", attrib=projAttr)
|
xProject = etree.SubElement(xRoot, "project", attrib=projAttr)
|
||||||
self._packSingleValue(xProject, "name", projData.name)
|
self._packSingleValue(xProject, "name", projData.name)
|
||||||
self._packSingleValue(xProject, "title", projData.title)
|
self._packSingleValue(xProject, "title", projData.title)
|
||||||
self._packListValue(xProject, "author", projData.authors)
|
self._packSingleValue(xProject, "author", projData.author)
|
||||||
|
|
||||||
# Save Project Settings
|
# Save Project Settings
|
||||||
xSettings = etree.SubElement(xRoot, "settings")
|
xSettings = etree.SubElement(xRoot, "settings")
|
||||||
@@ -591,14 +591,6 @@ class ProjectXMLWriter:
|
|||||||
xItem.text = str(value) or ""
|
xItem.text = str(value) or ""
|
||||||
return
|
return
|
||||||
|
|
||||||
def _packListValue(self, xParent, name, data):
|
|
||||||
"""Pack a list of values into an XML element.
|
|
||||||
"""
|
|
||||||
for value in data:
|
|
||||||
xItem = etree.SubElement(xParent, name)
|
|
||||||
xItem.text = str(value) or ""
|
|
||||||
return
|
|
||||||
|
|
||||||
def _packDictKeyValue(self, xParent, name, data):
|
def _packDictKeyValue(self, xParent, name, data):
|
||||||
"""Pack the entries of a dictionary into an XML element.
|
"""Pack the entries of a dictionary into an XML element.
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -262,7 +262,7 @@ class ToOdt(Tokenizer):
|
|||||||
|
|
||||||
if self._headerText == "":
|
if self._headerText == "":
|
||||||
theTitle = self.theProject.data.title
|
theTitle = self.theProject.data.title
|
||||||
theAuth = self.theProject.getFormattedAuthors()
|
theAuth = self.theProject.data.author
|
||||||
self._headerText = f"{theTitle} / {theAuth} /"
|
self._headerText = f"{theTitle} / {theAuth} /"
|
||||||
|
|
||||||
# Create Roots
|
# Create Roots
|
||||||
|
|||||||
@@ -174,9 +174,7 @@ class GuiProjectDetailsMain(QWidget):
|
|||||||
self.projName.setAlignment(Qt.AlignHCenter)
|
self.projName.setAlignment(Qt.AlignHCenter)
|
||||||
self.projName.setWordWrap(True)
|
self.projName.setWordWrap(True)
|
||||||
|
|
||||||
self.bookAuthors = QLabel(self.tr("By {0}").format(
|
self.bookAuthors = QLabel(self.tr("By {0}").format(self.theProject.data.author))
|
||||||
self.theProject.getFormattedAuthors()
|
|
||||||
))
|
|
||||||
authFont = self.bookAuthors.font()
|
authFont = self.bookAuthors.font()
|
||||||
authFont.setPointSizeF(1.2*fPt)
|
authFont.setPointSizeF(1.2*fPt)
|
||||||
self.bookAuthors.setFont(authFont)
|
self.bookAuthors.setFont(authFont)
|
||||||
|
|||||||
@@ -29,9 +29,8 @@ import novelwriter
|
|||||||
from PyQt5.QtGui import QIcon, QPixmap, QColor, QBrush
|
from PyQt5.QtGui import QIcon, QPixmap, QColor, QBrush
|
||||||
from PyQt5.QtCore import Qt, QLocale
|
from PyQt5.QtCore import Qt, QLocale
|
||||||
from PyQt5.QtWidgets import (
|
from PyQt5.QtWidgets import (
|
||||||
QHBoxLayout, QVBoxLayout, QLineEdit, QPlainTextEdit, QLabel, QWidget,
|
QColorDialog, QComboBox, QDialogButtonBox, QHBoxLayout, QLabel, QLineEdit,
|
||||||
QDialogButtonBox, QPushButton, QColorDialog, QTreeWidget, QTreeWidgetItem,
|
QPushButton, QTreeWidget, QTreeWidgetItem, QVBoxLayout, QWidget
|
||||||
QComboBox
|
|
||||||
)
|
)
|
||||||
|
|
||||||
from novelwriter.enum import nwAlert
|
from novelwriter.enum import nwAlert
|
||||||
@@ -108,15 +107,15 @@ class GuiProjectSettings(PagedDialog):
|
|||||||
def _doSave(self):
|
def _doSave(self):
|
||||||
"""Save settings and close dialog.
|
"""Save settings and close dialog.
|
||||||
"""
|
"""
|
||||||
projName = self.tabMain.editName.text()
|
projName = self.tabMain.editName.text()
|
||||||
bookTitle = self.tabMain.editTitle.text()
|
bookTitle = self.tabMain.editTitle.text()
|
||||||
bookAuthors = self.tabMain.editAuthors.toPlainText()
|
bookAuthor = self.tabMain.editAuthor.text()
|
||||||
spellLang = self.tabMain.spellLang.currentData()
|
spellLang = self.tabMain.spellLang.currentData()
|
||||||
doBackup = not self.tabMain.doBackup.isChecked()
|
doBackup = not self.tabMain.doBackup.isChecked()
|
||||||
|
|
||||||
self.theProject.data.setName(projName)
|
self.theProject.data.setName(projName)
|
||||||
self.theProject.data.setTitle(bookTitle)
|
self.theProject.data.setTitle(bookTitle)
|
||||||
self.theProject.data.setAuthors(bookAuthors)
|
self.theProject.data.setAuthor(bookAuthor)
|
||||||
self.theProject.data.setDoBackup(doBackup)
|
self.theProject.data.setDoBackup(doBackup)
|
||||||
|
|
||||||
# Remember this as updating spell dictionary can be expensive
|
# Remember this as updating spell dictionary can be expensive
|
||||||
@@ -204,7 +203,6 @@ class GuiProjectEditMain(QWidget):
|
|||||||
self.mainForm.addGroupLabel(self.tr("Project Settings"))
|
self.mainForm.addGroupLabel(self.tr("Project Settings"))
|
||||||
|
|
||||||
xW = self.mainConf.pxInt(250)
|
xW = self.mainConf.pxInt(250)
|
||||||
xH = round(4.8*self.mainGui.mainTheme.fontPixelSize)
|
|
||||||
|
|
||||||
self.editName = QLineEdit()
|
self.editName = QLineEdit()
|
||||||
self.editName.setMaxLength(200)
|
self.editName.setMaxLength(200)
|
||||||
@@ -226,14 +224,14 @@ class GuiProjectEditMain(QWidget):
|
|||||||
self.tr("Change whenever you want!")
|
self.tr("Change whenever you want!")
|
||||||
)
|
)
|
||||||
|
|
||||||
self.editAuthors = QPlainTextEdit()
|
self.editAuthor = QLineEdit()
|
||||||
self.editAuthors.setMaximumHeight(xH)
|
self.editAuthor.setMaxLength(200)
|
||||||
self.editAuthors.setMaximumWidth(xW)
|
self.editAuthor.setMaximumWidth(xW)
|
||||||
self.editAuthors.setPlainText("\n".join(self.theProject.data.authors))
|
self.editAuthor.setText(self.theProject.data.author)
|
||||||
self.mainForm.addRow(
|
self.mainForm.addRow(
|
||||||
self.tr("Author(s)"),
|
self.tr("Author(s)"),
|
||||||
self.editAuthors,
|
self.editAuthor,
|
||||||
self.tr("One name per line.")
|
self.tr("Change whenever you want!")
|
||||||
)
|
)
|
||||||
|
|
||||||
self.spellLang = QComboBox(self)
|
self.spellLang = QComboBox(self)
|
||||||
|
|||||||
@@ -1419,7 +1419,7 @@ class GuiMain(QMainWindow):
|
|||||||
projData = {
|
projData = {
|
||||||
"projName": newProj.field("projName"),
|
"projName": newProj.field("projName"),
|
||||||
"projTitle": newProj.field("projTitle"),
|
"projTitle": newProj.field("projTitle"),
|
||||||
"projAuthors": newProj.field("projAuthors"),
|
"projAuthor": newProj.field("projAuthor"),
|
||||||
"projPath": newProj.field("projPath"),
|
"projPath": newProj.field("projPath"),
|
||||||
"popSample": newProj.field("popSample"),
|
"popSample": newProj.field("popSample"),
|
||||||
"popMinimal": newProj.field("popMinimal"),
|
"popMinimal": newProj.field("popMinimal"),
|
||||||
|
|||||||
@@ -968,9 +968,9 @@ class GuiBuildNovel(QDialog):
|
|||||||
elif theFmt == self.FMT_JSON_H or theFmt == self.FMT_JSON_M:
|
elif theFmt == self.FMT_JSON_H or theFmt == self.FMT_JSON_M:
|
||||||
jsonData = {
|
jsonData = {
|
||||||
"meta": {
|
"meta": {
|
||||||
"workingTitle": self.theProject.data.name,
|
"projectName": self.theProject.data.name,
|
||||||
"novelTitle": self.theProject.data.title,
|
"novelTitle": self.theProject.data.title,
|
||||||
"authors": self.theProject.data.authors,
|
"novelAuthor": self.theProject.data.author,
|
||||||
"buildTime": self.buildTime,
|
"buildTime": self.buildTime,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,9 +29,8 @@ import novelwriter
|
|||||||
|
|
||||||
from PyQt5.QtCore import Qt
|
from PyQt5.QtCore import Qt
|
||||||
from PyQt5.QtWidgets import (
|
from PyQt5.QtWidgets import (
|
||||||
QWizard, QWizardPage, QLabel, QVBoxLayout, QLineEdit, QPlainTextEdit,
|
QFileDialog, QFormLayout, QGridLayout, QHBoxLayout, QLabel, QLineEdit,
|
||||||
QPushButton, QFileDialog, QHBoxLayout, QRadioButton, QFormLayout,
|
QPushButton, QRadioButton, QSpinBox, QVBoxLayout, QWizard, QWizardPage
|
||||||
QGridLayout, QSpinBox
|
|
||||||
)
|
)
|
||||||
|
|
||||||
from novelwriter.common import makeFileNameSafe
|
from novelwriter.common import makeFileNameSafe
|
||||||
@@ -111,7 +110,6 @@ class ProjWizardIntroPage(QWizardPage):
|
|||||||
self.imgCredit.setFont(lblFont)
|
self.imgCredit.setFont(lblFont)
|
||||||
|
|
||||||
xW = self.mainConf.pxInt(300)
|
xW = self.mainConf.pxInt(300)
|
||||||
xH = self.mainConf.pxInt(100)
|
|
||||||
vS = self.mainConf.pxInt(12)
|
vS = self.mainConf.pxInt(12)
|
||||||
fS = self.mainConf.pxInt(4)
|
fS = self.mainConf.pxInt(4)
|
||||||
|
|
||||||
@@ -126,20 +124,20 @@ class ProjWizardIntroPage(QWizardPage):
|
|||||||
self.projTitle.setFixedWidth(xW)
|
self.projTitle.setFixedWidth(xW)
|
||||||
self.projTitle.setPlaceholderText(self.tr("Optional"))
|
self.projTitle.setPlaceholderText(self.tr("Optional"))
|
||||||
|
|
||||||
self.projAuthors = QPlainTextEdit()
|
self.projAuthor = QLineEdit()
|
||||||
self.projAuthors.setFixedHeight(xH)
|
self.projAuthor.setMaxLength(200)
|
||||||
self.projAuthors.setFixedWidth(xW)
|
self.projAuthor.setFixedWidth(xW)
|
||||||
self.projAuthors.setPlaceholderText(self.tr("Optional. One name per line."))
|
self.projAuthor.setPlaceholderText(self.tr("Optional"))
|
||||||
|
|
||||||
self.mainForm = QFormLayout()
|
self.mainForm = QFormLayout()
|
||||||
self.mainForm.addRow(self.tr("Project Name"), self.projName)
|
self.mainForm.addRow(self.tr("Project Name"), self.projName)
|
||||||
self.mainForm.addRow(self.tr("Novel Title"), self.projTitle)
|
self.mainForm.addRow(self.tr("Novel Title"), self.projTitle)
|
||||||
self.mainForm.addRow(self.tr("Author(s)"), self.projAuthors)
|
self.mainForm.addRow(self.tr("Author(s)"), self.projAuthor)
|
||||||
self.mainForm.setVerticalSpacing(fS)
|
self.mainForm.setVerticalSpacing(fS)
|
||||||
|
|
||||||
self.registerField("projName*", self.projName)
|
self.registerField("projName*", self.projName)
|
||||||
self.registerField("projTitle", self.projTitle)
|
self.registerField("projTitle", self.projTitle)
|
||||||
self.registerField("projAuthors", self.projAuthors, "plainText")
|
self.registerField("projAuthor", self.projAuthor)
|
||||||
|
|
||||||
# Assemble
|
# Assemble
|
||||||
self.outerBox = QVBoxLayout()
|
self.outerBox = QVBoxLayout()
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
%%~kind: NOVEL/DOCUMENT
|
%%~kind: NOVEL/DOCUMENT
|
||||||
#! My Novel
|
#! My Novel
|
||||||
|
|
||||||
>> **By Jane Doh** <<
|
>> **By Jane Smith** <<
|
||||||
|
|
||||||
>> This is the title page. <<
|
>> This is the title page. <<
|
||||||
>> It should be the first document of the project. <<
|
>> It should be the first document of the project. <<
|
||||||
@@ -1,10 +1,9 @@
|
|||||||
<?xml version='1.0' encoding='utf-8'?>
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
<novelWriterXML appVersion="2.0-rc2" hexVersion="0x020000c2" fileVersion="1.5" timeStamp="2022-11-17 16:28:09">
|
<novelWriterXML appVersion="2.0-rc2" hexVersion="0x020000c2" fileVersion="1.5" timeStamp="2022-11-27 16:39:07">
|
||||||
<project id="e2be99af-f9bf-4403-857a-c3d1ac25abea" saveCount="1453" autoCount="237" editTime="69933">
|
<project id="e2be99af-f9bf-4403-857a-c3d1ac25abea" saveCount="1455" autoCount="237" editTime="70027">
|
||||||
<name>Sample Project</name>
|
<name>Sample Project</name>
|
||||||
<title>Sample Project</title>
|
<title>Sample Project</title>
|
||||||
<author>Jane Smith</author>
|
<author>Jane Smith</author>
|
||||||
<author>Jay Doh</author>
|
|
||||||
</project>
|
</project>
|
||||||
<settings>
|
<settings>
|
||||||
<doBackup>no</doBackup>
|
<doBackup>no</doBackup>
|
||||||
@@ -50,7 +49,7 @@
|
|||||||
<name status="sc24b8f" import="ia857f0">Novel</name>
|
<name status="sc24b8f" import="ia857f0">Novel</name>
|
||||||
</item>
|
</item>
|
||||||
<item handle="53b69b83cdafc" parent="7031beac91f75" root="7031beac91f75" order="0" type="FILE" class="NOVEL" layout="DOCUMENT">
|
<item handle="53b69b83cdafc" parent="7031beac91f75" root="7031beac91f75" order="0" type="FILE" class="NOVEL" layout="DOCUMENT">
|
||||||
<meta expanded="no" heading="H1" charCount="93" wordCount="19" paraCount="2" cursorPos="119"/>
|
<meta expanded="no" heading="H1" charCount="95" wordCount="19" paraCount="2" cursorPos="31"/>
|
||||||
<name status="sc24b8f" import="ia857f0" active="yes">Title Page</name>
|
<name status="sc24b8f" import="ia857f0" active="yes">Title Page</name>
|
||||||
</item>
|
</item>
|
||||||
<item handle="974e400180a99" parent="7031beac91f75" root="7031beac91f75" order="1" type="FILE" class="NOVEL" layout="DOCUMENT">
|
<item handle="974e400180a99" parent="7031beac91f75" root="7031beac91f75" order="1" type="FILE" class="NOVEL" layout="DOCUMENT">
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
<name>Sample Project</name>
|
<name>Sample Project</name>
|
||||||
<title>Sample Project</title>
|
<title>Sample Project</title>
|
||||||
<author>Jane Smith</author>
|
<author>Jane Smith</author>
|
||||||
<author>Jay Doh</author>
|
|
||||||
</project>
|
</project>
|
||||||
<settings>
|
<settings>
|
||||||
<doBackup>yes</doBackup>
|
<doBackup>yes</doBackup>
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
<?xml version='1.0' encoding='utf-8'?>
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
<novelWriterXML appVersion="2.0-rc1" hexVersion="0x020000c1" fileVersion="1.5" timeStamp="2022-11-07 13:05:22">
|
<novelWriterXML appVersion="2.0-rc2" hexVersion="0x020000c2" fileVersion="1.5" timeStamp="2022-11-27 16:39:14">
|
||||||
<project id="d0f3fe10-c6e6-4310-8bfd-181eb4224eed" saveCount="1" autoCount="0" editTime="0">
|
<project id="d0f3fe10-c6e6-4310-8bfd-181eb4224eed" saveCount="1" autoCount="0" editTime="0">
|
||||||
<name>Test Custom</name>
|
<name>Test Custom</name>
|
||||||
<title>Test Novel</title>
|
<title>Test Novel</title>
|
||||||
<author>Jane Doe</author>
|
<author>Jane Doe</author>
|
||||||
<author>John Doh</author>
|
|
||||||
</project>
|
</project>
|
||||||
<settings>
|
<settings>
|
||||||
<doBackup>yes</doBackup>
|
<doBackup>yes</doBackup>
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
<?xml version='1.0' encoding='utf-8'?>
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
<novelWriterXML appVersion="2.0-rc1" hexVersion="0x020000c1" fileVersion="1.5" timeStamp="2022-11-07 13:05:22">
|
<novelWriterXML appVersion="2.0-rc2" hexVersion="0x020000c2" fileVersion="1.5" timeStamp="2022-11-27 16:39:14">
|
||||||
<project id="d0f3fe10-c6e6-4310-8bfd-181eb4224eed" saveCount="1" autoCount="0" editTime="0">
|
<project id="d0f3fe10-c6e6-4310-8bfd-181eb4224eed" saveCount="1" autoCount="0" editTime="0">
|
||||||
<name>Test Custom</name>
|
<name>Test Custom</name>
|
||||||
<title>Test Novel</title>
|
<title>Test Novel</title>
|
||||||
<author>Jane Doe</author>
|
<author>Jane Doe</author>
|
||||||
<author>John Doh</author>
|
|
||||||
</project>
|
</project>
|
||||||
<settings>
|
<settings>
|
||||||
<doBackup>yes</doBackup>
|
<doBackup>yes</doBackup>
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
<?xml version='1.0' encoding='utf-8'?>
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
<novelWriterXML appVersion="2.0-rc1" hexVersion="0x020000c1" fileVersion="1.5" timeStamp="2022-11-07 13:05:22">
|
<novelWriterXML appVersion="2.0-rc2" hexVersion="0x020000c2" fileVersion="1.5" timeStamp="2022-11-27 16:39:14">
|
||||||
<project id="d0f3fe10-c6e6-4310-8bfd-181eb4224eed" saveCount="1" autoCount="0" editTime="0">
|
<project id="d0f3fe10-c6e6-4310-8bfd-181eb4224eed" saveCount="1" autoCount="0" editTime="0">
|
||||||
<name>New Project</name>
|
<name>New Project</name>
|
||||||
<title>New Project</title>
|
<title>New Project</title>
|
||||||
|
<author></author>
|
||||||
</project>
|
</project>
|
||||||
<settings>
|
<settings>
|
||||||
<doBackup>yes</doBackup>
|
<doBackup>yes</doBackup>
|
||||||
|
|||||||
@@ -1,11 +1,9 @@
|
|||||||
{
|
{
|
||||||
"meta": {
|
"meta": {
|
||||||
"workingTitle": "Lorem Ipsum",
|
"projectName": "Lorem Ipsum",
|
||||||
"novelTitle": "Lorem Ipsum",
|
"novelTitle": "Lorem Ipsum",
|
||||||
"authors": [
|
"novelAuthor": "lipsum.com",
|
||||||
"lipsum.com"
|
"buildTime": 1669563813
|
||||||
],
|
|
||||||
"buildTime": 1627336583
|
|
||||||
},
|
},
|
||||||
"text": {
|
"text": {
|
||||||
"css": [
|
"css": [
|
||||||
|
|||||||
@@ -1,11 +1,9 @@
|
|||||||
{
|
{
|
||||||
"meta": {
|
"meta": {
|
||||||
"workingTitle": "Lorem Ipsum",
|
"projectName": "Lorem Ipsum",
|
||||||
"novelTitle": "Lorem Ipsum",
|
"novelTitle": "Lorem Ipsum",
|
||||||
"authors": [
|
"novelAuthor": "lipsum.com",
|
||||||
"lipsum.com"
|
"buildTime": 1669563891
|
||||||
],
|
|
||||||
"buildTime": 1627867578
|
|
||||||
},
|
},
|
||||||
"text": {
|
"text": {
|
||||||
"nwd": [
|
"nwd": [
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
<project id="d0f3fe10-c6e6-4310-8bfd-181eb4224eed" saveCount="0" autoCount="0" editTime="1000">
|
<project id="d0f3fe10-c6e6-4310-8bfd-181eb4224eed" saveCount="0" autoCount="0" editTime="1000">
|
||||||
<name>Sample Project</name>
|
<name>Sample Project</name>
|
||||||
<title>Sample Project</title>
|
<title>Sample Project</title>
|
||||||
<author>Jane Smith</author>
|
|
||||||
<author>Jay Doh</author>
|
<author>Jay Doh</author>
|
||||||
</project>
|
</project>
|
||||||
<settings>
|
<settings>
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
<project id="d0f3fe10-c6e6-4310-8bfd-181eb4224eed" saveCount="5" autoCount="10" editTime="1000">
|
<project id="d0f3fe10-c6e6-4310-8bfd-181eb4224eed" saveCount="5" autoCount="10" editTime="1000">
|
||||||
<name>Sample Project</name>
|
<name>Sample Project</name>
|
||||||
<title>Sample Project</title>
|
<title>Sample Project</title>
|
||||||
<author>Jane Smith</author>
|
|
||||||
<author>Jay Doh</author>
|
<author>Jay Doh</author>
|
||||||
</project>
|
</project>
|
||||||
<settings>
|
<settings>
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
<project id="d0f3fe10-c6e6-4310-8bfd-181eb4224eed" saveCount="5" autoCount="10" editTime="1000">
|
<project id="d0f3fe10-c6e6-4310-8bfd-181eb4224eed" saveCount="5" autoCount="10" editTime="1000">
|
||||||
<name>Sample Project</name>
|
<name>Sample Project</name>
|
||||||
<title>Sample Project</title>
|
<title>Sample Project</title>
|
||||||
<author>Jane Smith</author>
|
|
||||||
<author>Jay Doh</author>
|
<author>Jay Doh</author>
|
||||||
</project>
|
</project>
|
||||||
<settings>
|
<settings>
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
<project id="d0f3fe10-c6e6-4310-8bfd-181eb4224eed" saveCount="5" autoCount="10" editTime="1000">
|
<project id="d0f3fe10-c6e6-4310-8bfd-181eb4224eed" saveCount="5" autoCount="10" editTime="1000">
|
||||||
<name>Sample Project</name>
|
<name>Sample Project</name>
|
||||||
<title>Sample Project</title>
|
<title>Sample Project</title>
|
||||||
<author>Jane Smith</author>
|
|
||||||
<author>Jay Doh</author>
|
<author>Jay Doh</author>
|
||||||
</project>
|
</project>
|
||||||
<settings>
|
<settings>
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
<project id="d0f3fe10-c6e6-4310-8bfd-181eb4224eed" saveCount="5" autoCount="10" editTime="1000">
|
<project id="d0f3fe10-c6e6-4310-8bfd-181eb4224eed" saveCount="5" autoCount="10" editTime="1000">
|
||||||
<name>Sample Project</name>
|
<name>Sample Project</name>
|
||||||
<title>Sample Project</title>
|
<title>Sample Project</title>
|
||||||
<author>Jane Smith</author>
|
|
||||||
<author>Jay Doh</author>
|
<author>Jay Doh</author>
|
||||||
</project>
|
</project>
|
||||||
<settings>
|
<settings>
|
||||||
|
|||||||
@@ -308,7 +308,7 @@ def testCoreTools_NewCustomA(monkeypatch, fncPath, tstPaths, mockGUI, mockRnd):
|
|||||||
projData = {
|
projData = {
|
||||||
"projName": "Test Custom",
|
"projName": "Test Custom",
|
||||||
"projTitle": "Test Novel",
|
"projTitle": "Test Novel",
|
||||||
"projAuthors": "Jane Doe\nJohn Doh\n",
|
"projAuthor": "Jane Doe",
|
||||||
"projPath": fncPath,
|
"projPath": fncPath,
|
||||||
"popSample": False,
|
"popSample": False,
|
||||||
"popMinimal": False,
|
"popMinimal": False,
|
||||||
@@ -346,7 +346,7 @@ def testCoreTools_NewCustomB(monkeypatch, fncPath, tstPaths, mockGUI, mockRnd):
|
|||||||
projData = {
|
projData = {
|
||||||
"projName": "Test Custom",
|
"projName": "Test Custom",
|
||||||
"projTitle": "Test Novel",
|
"projTitle": "Test Novel",
|
||||||
"projAuthors": "Jane Doe\nJohn Doh\n",
|
"projAuthor": "Jane Doe",
|
||||||
"projPath": fncPath,
|
"projPath": fncPath,
|
||||||
"popSample": False,
|
"popSample": False,
|
||||||
"popMinimal": False,
|
"popMinimal": False,
|
||||||
@@ -378,7 +378,7 @@ def testCoreTools_NewSample(monkeypatch, fncPath, tmpConf, tmpPath, mockGUI):
|
|||||||
projData = {
|
projData = {
|
||||||
"projName": "Test Sample",
|
"projName": "Test Sample",
|
||||||
"projTitle": "Test Novel",
|
"projTitle": "Test Novel",
|
||||||
"projAuthors": "Jane Doe\nJohn Doh\n",
|
"projAuthor": "Jane Doe",
|
||||||
"projPath": fncPath,
|
"projPath": fncPath,
|
||||||
"popSample": True,
|
"popSample": True,
|
||||||
"popMinimal": False,
|
"popMinimal": False,
|
||||||
|
|||||||
@@ -480,25 +480,9 @@ def testCoreProject_Methods(monkeypatch, mockGUI, fncPath, mockRnd):
|
|||||||
theProject.data.setTitle(" A Title ")
|
theProject.data.setTitle(" A Title ")
|
||||||
assert theProject.data.title == "A Title"
|
assert theProject.data.title == "A Title"
|
||||||
|
|
||||||
# Project Authors
|
# Project Author
|
||||||
# Check that the list is cleaned up and that it can be extracted as
|
theProject.data.setAuthor(" Jane\tDoe ")
|
||||||
# a properly formatted string, depending on number of names
|
assert theProject.data.author == "Jane Doe"
|
||||||
theProject.data.setAuthors([])
|
|
||||||
assert theProject.data.authors == []
|
|
||||||
theProject.data.setAuthors(" Jane Doe \n John Doh \n ")
|
|
||||||
assert theProject.data.authors == ["Jane Doe", "John Doh"]
|
|
||||||
|
|
||||||
theProject.data.setAuthors("")
|
|
||||||
assert theProject.getFormattedAuthors() == ""
|
|
||||||
|
|
||||||
theProject.data.setAuthors("Jane Doe")
|
|
||||||
assert theProject.getFormattedAuthors() == "Jane Doe"
|
|
||||||
|
|
||||||
theProject.data.setAuthors("Jane Doe\nJohn Doh")
|
|
||||||
assert theProject.getFormattedAuthors() == "Jane Doe and John Doh"
|
|
||||||
|
|
||||||
theProject.data.setAuthors("Jane Doe\nJohn Doh\nBod Owens")
|
|
||||||
assert theProject.getFormattedAuthors() == "Jane Doe, John Doh and Bod Owens"
|
|
||||||
|
|
||||||
# Edit Time
|
# Edit Time
|
||||||
theProject.data.setEditTime(1234)
|
theProject.data.setEditTime(1234)
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ def testCoreProjectXML_ReadCurrent(monkeypatch, tstPaths, fncPath):
|
|||||||
# Check loaded data
|
# Check loaded data
|
||||||
assert data.name == "Sample Project"
|
assert data.name == "Sample Project"
|
||||||
assert data.title == "Sample Project"
|
assert data.title == "Sample Project"
|
||||||
assert data.authors == ["Jane Smith", "Jay Doh"]
|
assert data.author == "Jane Smith"
|
||||||
assert data.saveCount == 5
|
assert data.saveCount == 5
|
||||||
assert data.autoCount == 10
|
assert data.autoCount == 10
|
||||||
assert data.editTime == 1000
|
assert data.editTime == 1000
|
||||||
@@ -269,7 +269,7 @@ def testCoreProjectXML_ReadLegacy10(tstPaths, fncPath, mockRnd):
|
|||||||
# Check loaded data
|
# Check loaded data
|
||||||
assert data.name == "Sample Project"
|
assert data.name == "Sample Project"
|
||||||
assert data.title == "Sample Project"
|
assert data.title == "Sample Project"
|
||||||
assert data.authors == ["Jane Smith", "Jay Doh"]
|
assert data.author == "Jay Doh" # Only last author is preserved
|
||||||
assert data.saveCount == 0 # Doesn't exist in 1.0
|
assert data.saveCount == 0 # Doesn't exist in 1.0
|
||||||
assert data.autoCount == 0 # Doesn't exist in 1.0
|
assert data.autoCount == 0 # Doesn't exist in 1.0
|
||||||
assert data.editTime == 0 # Doesn't exist in 1.0
|
assert data.editTime == 0 # Doesn't exist in 1.0
|
||||||
@@ -411,7 +411,7 @@ def testCoreProjectXML_ReadLegacy11(tstPaths, fncPath, mockRnd):
|
|||||||
# Check loaded data
|
# Check loaded data
|
||||||
assert data.name == "Sample Project"
|
assert data.name == "Sample Project"
|
||||||
assert data.title == "Sample Project"
|
assert data.title == "Sample Project"
|
||||||
assert data.authors == ["Jane Smith", "Jay Doh"]
|
assert data.author == "Jay Doh" # Only last author is preserved
|
||||||
assert data.saveCount == 5
|
assert data.saveCount == 5
|
||||||
assert data.autoCount == 10
|
assert data.autoCount == 10
|
||||||
assert data.editTime == 1000
|
assert data.editTime == 1000
|
||||||
@@ -553,7 +553,7 @@ def testCoreProjectXML_ReadLegacy12(tstPaths, fncPath, mockRnd):
|
|||||||
# Check loaded data
|
# Check loaded data
|
||||||
assert data.name == "Sample Project"
|
assert data.name == "Sample Project"
|
||||||
assert data.title == "Sample Project"
|
assert data.title == "Sample Project"
|
||||||
assert data.authors == ["Jane Smith", "Jay Doh"]
|
assert data.author == "Jay Doh" # Only last author is preserved
|
||||||
assert data.saveCount == 5
|
assert data.saveCount == 5
|
||||||
assert data.autoCount == 10
|
assert data.autoCount == 10
|
||||||
assert data.editTime == 1000
|
assert data.editTime == 1000
|
||||||
@@ -698,7 +698,7 @@ def testCoreProjectXML_ReadLegacy13(tstPaths, fncPath, mockRnd):
|
|||||||
# Check loaded data
|
# Check loaded data
|
||||||
assert data.name == "Sample Project"
|
assert data.name == "Sample Project"
|
||||||
assert data.title == "Sample Project"
|
assert data.title == "Sample Project"
|
||||||
assert data.authors == ["Jane Smith", "Jay Doh"]
|
assert data.author == "Jay Doh" # Only last author is preserved
|
||||||
assert data.saveCount == 5
|
assert data.saveCount == 5
|
||||||
assert data.autoCount == 10
|
assert data.autoCount == 10
|
||||||
assert data.editTime == 1000
|
assert data.editTime == 1000
|
||||||
@@ -843,7 +843,7 @@ def testCoreProjectXML_ReadLegacy14(tstPaths, fncPath, mockRnd):
|
|||||||
# Check loaded data
|
# Check loaded data
|
||||||
assert data.name == "Sample Project"
|
assert data.name == "Sample Project"
|
||||||
assert data.title == "Sample Project"
|
assert data.title == "Sample Project"
|
||||||
assert data.authors == ["Jane Smith", "Jay Doh"]
|
assert data.author == "Jay Doh" # Only last author is preserved
|
||||||
assert data.saveCount == 5
|
assert data.saveCount == 5
|
||||||
assert data.autoCount == 10
|
assert data.autoCount == 10
|
||||||
assert data.editTime == 1000
|
assert data.editTime == 1000
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ def testDlgProjSettings_Main(qtbot, monkeypatch, nwGUI, fncPath, projPath, mockR
|
|||||||
# Set some values
|
# Set some values
|
||||||
theProject = nwGUI.theProject
|
theProject = nwGUI.theProject
|
||||||
theProject.data.setSpellLang("en")
|
theProject.data.setSpellLang("en")
|
||||||
theProject.data.setAuthors("Jane Smith\nJohn Smith")
|
theProject.data.setAuthor("Jane Smith")
|
||||||
theProject.data.setAutoReplace({"A": "B", "C": "D"})
|
theProject.data.setAutoReplace({"A": "B", "C": "D"})
|
||||||
|
|
||||||
# Create Dialog
|
# Create Dialog
|
||||||
@@ -111,7 +111,7 @@ def testDlgProjSettings_Main(qtbot, monkeypatch, nwGUI, fncPath, projPath, mockR
|
|||||||
|
|
||||||
assert tabMain.editName.text() == "New Project"
|
assert tabMain.editName.text() == "New Project"
|
||||||
assert tabMain.editTitle.text() == "New Novel"
|
assert tabMain.editTitle.text() == "New Novel"
|
||||||
assert tabMain.editAuthors.toPlainText() == "Jane Smith\nJohn Smith"
|
assert tabMain.editAuthor.text() == "Jane Smith"
|
||||||
assert tabMain.spellLang.currentData() == "en"
|
assert tabMain.spellLang.currentData() == "en"
|
||||||
assert tabMain.doBackup.isChecked() is False
|
assert tabMain.doBackup.isChecked() is False
|
||||||
|
|
||||||
@@ -122,23 +122,19 @@ def testDlgProjSettings_Main(qtbot, monkeypatch, nwGUI, fncPath, projPath, mockR
|
|||||||
for c in "Project Title":
|
for c in "Project Title":
|
||||||
qtbot.keyClick(tabMain.editTitle, c, delay=KEY_DELAY)
|
qtbot.keyClick(tabMain.editTitle, c, delay=KEY_DELAY)
|
||||||
|
|
||||||
tabMain.editAuthors.clear()
|
tabMain.editAuthor.clear()
|
||||||
for c in "Jane Doe":
|
for c in "Jane Doe":
|
||||||
qtbot.keyClick(tabMain.editAuthors, c, delay=KEY_DELAY)
|
qtbot.keyClick(tabMain.editAuthor, c, delay=KEY_DELAY)
|
||||||
qtbot.keyClick(tabMain.editAuthors, Qt.Key_Return, delay=KEY_DELAY)
|
|
||||||
for c in "John Doh":
|
|
||||||
qtbot.keyClick(tabMain.editAuthors, c, delay=KEY_DELAY)
|
|
||||||
qtbot.keyClick(tabMain.editAuthors, Qt.Key_Return, delay=KEY_DELAY)
|
|
||||||
|
|
||||||
assert tabMain.editName.text() == "Project Name"
|
assert tabMain.editName.text() == "Project Name"
|
||||||
assert tabMain.editTitle.text() == "Project Title"
|
assert tabMain.editTitle.text() == "Project Title"
|
||||||
assert tabMain.editAuthors.toPlainText() == "Jane Doe\nJohn Doh\n"
|
assert tabMain.editAuthor.text() == "Jane Doe"
|
||||||
assert projSettings.spellChanged is False
|
assert projSettings.spellChanged is False
|
||||||
|
|
||||||
projSettings._doSave()
|
projSettings._doSave()
|
||||||
assert theProject.data.name == "Project Name"
|
assert theProject.data.name == "Project Name"
|
||||||
assert theProject.data.title == "Project Title"
|
assert theProject.data.title == "Project Title"
|
||||||
assert theProject.data.authors == ["Jane Doe", "John Doh"]
|
assert theProject.data.author == "Jane Doe"
|
||||||
|
|
||||||
# Clean up
|
# Clean up
|
||||||
projSettings._doClose()
|
projSettings._doClose()
|
||||||
|
|||||||
@@ -205,7 +205,7 @@ def testGuiMain_Editing(qtbot, monkeypatch, nwGUI, projPath, tstPaths, mockRnd):
|
|||||||
assert nwGUI.theProject.tree.trashRoot() is None
|
assert nwGUI.theProject.tree.trashRoot() is None
|
||||||
assert nwGUI.theProject.data.name == ""
|
assert nwGUI.theProject.data.name == ""
|
||||||
assert nwGUI.theProject.data.title == ""
|
assert nwGUI.theProject.data.title == ""
|
||||||
assert nwGUI.theProject.data.authors == []
|
assert nwGUI.theProject.data.author == ""
|
||||||
assert nwGUI.theProject.data.spellCheck is False
|
assert nwGUI.theProject.data.spellCheck is False
|
||||||
|
|
||||||
# Check the files
|
# Check the files
|
||||||
@@ -225,7 +225,7 @@ def testGuiMain_Editing(qtbot, monkeypatch, nwGUI, projPath, tstPaths, mockRnd):
|
|||||||
assert nwGUI.theProject.tree.trashRoot() is None
|
assert nwGUI.theProject.tree.trashRoot() is None
|
||||||
assert nwGUI.theProject.data.name == "New Project"
|
assert nwGUI.theProject.data.name == "New Project"
|
||||||
assert nwGUI.theProject.data.title == "New Novel"
|
assert nwGUI.theProject.data.title == "New Novel"
|
||||||
assert nwGUI.theProject.data.authors == ["Jane Doe"]
|
assert nwGUI.theProject.data.author == "Jane Doe"
|
||||||
assert nwGUI.theProject.data.spellCheck is False
|
assert nwGUI.theProject.data.spellCheck is False
|
||||||
|
|
||||||
# Check that tree items have been created
|
# Check that tree items have been created
|
||||||
|
|||||||
@@ -216,14 +216,14 @@ def testToolBuild_Main(qtbot, monkeypatch, nwGUI, prjLipsum, tstPaths):
|
|||||||
testFile = tstPaths.outDir / "guiBuild_Tool_Step4H_Lorem_Ipsum.json"
|
testFile = tstPaths.outDir / "guiBuild_Tool_Step4H_Lorem_Ipsum.json"
|
||||||
compFile = tstPaths.refDir / "guiBuild_Tool_Step4H_Lorem_Ipsum.json"
|
compFile = tstPaths.refDir / "guiBuild_Tool_Step4H_Lorem_Ipsum.json"
|
||||||
copyfile(projFile, testFile)
|
copyfile(projFile, testFile)
|
||||||
assert cmpFiles(testFile, compFile, [8])
|
assert cmpFiles(testFile, compFile, [6])
|
||||||
|
|
||||||
assert nwBuild._saveDocument(nwBuild.FMT_JSON_M)
|
assert nwBuild._saveDocument(nwBuild.FMT_JSON_M)
|
||||||
projFile = prjLipsum / "Lorem Ipsum.json"
|
projFile = prjLipsum / "Lorem Ipsum.json"
|
||||||
testFile = tstPaths.outDir / "guiBuild_Tool_Step4M_Lorem_Ipsum.json"
|
testFile = tstPaths.outDir / "guiBuild_Tool_Step4M_Lorem_Ipsum.json"
|
||||||
compFile = tstPaths.refDir / "guiBuild_Tool_Step4M_Lorem_Ipsum.json"
|
compFile = tstPaths.refDir / "guiBuild_Tool_Step4M_Lorem_Ipsum.json"
|
||||||
copyfile(projFile, testFile)
|
copyfile(projFile, testFile)
|
||||||
assert cmpFiles(testFile, compFile, [8])
|
assert cmpFiles(testFile, compFile, [6])
|
||||||
|
|
||||||
# Since odt and fodt is built by the same code, we don't check the
|
# Since odt and fodt is built by the same code, we don't check the
|
||||||
# output. but just that the different format can be written as well
|
# output. but just that the different format can be written as well
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ def testToolProjectWizard_Run(qtbot, monkeypatch, nwGUI, fncPath, prjType):
|
|||||||
|
|
||||||
introPage.projName.setText("Test Wizard")
|
introPage.projName.setText("Test Wizard")
|
||||||
introPage.projTitle.setText("My Novel")
|
introPage.projTitle.setText("My Novel")
|
||||||
introPage.projAuthors.setPlainText("Jane Doe")
|
introPage.projAuthor.setText("Jane Doe")
|
||||||
|
|
||||||
# Setting projName should activate the button
|
# Setting projName should activate the button
|
||||||
assert nwWiz.button(QWizard.NextButton).isEnabled()
|
assert nwWiz.button(QWizard.NextButton).isEnabled()
|
||||||
@@ -214,7 +214,7 @@ def testToolProjectWizard_Run(qtbot, monkeypatch, nwGUI, fncPath, prjType):
|
|||||||
projData = nwGUI._assembleProjectWizardData(nwWiz)
|
projData = nwGUI._assembleProjectWizardData(nwWiz)
|
||||||
assert projData["projName"] == "Test Wizard"
|
assert projData["projName"] == "Test Wizard"
|
||||||
assert projData["projTitle"] == "My Novel"
|
assert projData["projTitle"] == "My Novel"
|
||||||
assert projData["projAuthors"] == "Jane Doe"
|
assert projData["projAuthor"] == "Jane Doe"
|
||||||
assert projData["projPath"] == str(projPath)
|
assert projData["projPath"] == str(projPath)
|
||||||
assert projData["popMinimal"] == prjType.startswith("minimal")
|
assert projData["popMinimal"] == prjType.startswith("minimal")
|
||||||
assert projData["popCustom"] == prjType.startswith("custom")
|
assert projData["popCustom"] == prjType.startswith("custom")
|
||||||
|
|||||||
+1
-1
@@ -174,7 +174,7 @@ def buildTestProject(theObject, projPath):
|
|||||||
theProject.data.setUuid("d0f3fe10-c6e6-4310-8bfd-181eb4224eed")
|
theProject.data.setUuid("d0f3fe10-c6e6-4310-8bfd-181eb4224eed")
|
||||||
theProject.data.setName("New Project")
|
theProject.data.setName("New Project")
|
||||||
theProject.data.setTitle("New Novel")
|
theProject.data.setTitle("New Novel")
|
||||||
theProject.data.setAuthors("Jane Doe")
|
theProject.data.setAuthor("Jane Doe")
|
||||||
|
|
||||||
# Creating a minimal project with a few root folders and a
|
# Creating a minimal project with a few root folders and a
|
||||||
# single chapter folder with a single file.
|
# single chapter folder with a single file.
|
||||||
|
|||||||
Reference in New Issue
Block a user