Better title page
This commit is contained in:
+7
-2
@@ -255,6 +255,11 @@ class NWProject():
|
||||
self.setBookTitle(projTitle)
|
||||
self.setBookAuthors(projAuthors)
|
||||
|
||||
titlePage = "# %s\n\n" % (self.bookTitle if self.bookTitle else self.projName)
|
||||
if self.bookAuthors:
|
||||
titlePage = "%sBy %s\n" % (titlePage, ", ".join(self.bookAuthors))
|
||||
|
||||
# Document object for writing files
|
||||
aDoc = NWDoc(self, self.theParent)
|
||||
|
||||
if popMinimal:
|
||||
@@ -273,7 +278,7 @@ class NWProject():
|
||||
self.projTree.setFileItemLayout(cHandle, nwItemLayout.CHAPTER)
|
||||
|
||||
aDoc.openDocument(tHandle, showStatus=False)
|
||||
aDoc.saveDocument("# %s\n\n" % projName)
|
||||
aDoc.saveDocument(titlePage)
|
||||
aDoc.clearDocument()
|
||||
|
||||
aDoc.openDocument(cHandle, showStatus=False)
|
||||
@@ -300,7 +305,7 @@ class NWProject():
|
||||
self.projTree.setFileItemLayout(tHandle, nwItemLayout.TITLE)
|
||||
|
||||
aDoc.openDocument(tHandle, showStatus=False)
|
||||
aDoc.saveDocument("# %s\n\n" % projName)
|
||||
aDoc.saveDocument(titlePage)
|
||||
aDoc.clearDocument()
|
||||
|
||||
# Create chapters and scenes
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<novelWriterXML appVersion="0.11.1" hexVersion="0x001101f0" fileVersion="1.2" timeStamp="2020-08-09 15:42:40">
|
||||
<novelWriterXML appVersion="0.11.1" hexVersion="0x001101f0" fileVersion="1.2" timeStamp="2020-08-10 20:03:56">
|
||||
<project>
|
||||
<name>Sample Project</name>
|
||||
<title>Sample Project</title>
|
||||
<author>Jane Smith</author>
|
||||
<author>Jay Doh</author>
|
||||
<saveCount>675</saveCount>
|
||||
<saveCount>676</saveCount>
|
||||
<autoCount>122</autoCount>
|
||||
<editTime>32866</editTime>
|
||||
<editTime>32870</editTime>
|
||||
</project>
|
||||
<settings>
|
||||
<doBackup>False</doBackup>
|
||||
|
||||
Reference in New Issue
Block a user