Better title page
This commit is contained in:
+7
-2
@@ -255,6 +255,11 @@ class NWProject():
|
|||||||
self.setBookTitle(projTitle)
|
self.setBookTitle(projTitle)
|
||||||
self.setBookAuthors(projAuthors)
|
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)
|
aDoc = NWDoc(self, self.theParent)
|
||||||
|
|
||||||
if popMinimal:
|
if popMinimal:
|
||||||
@@ -273,7 +278,7 @@ class NWProject():
|
|||||||
self.projTree.setFileItemLayout(cHandle, nwItemLayout.CHAPTER)
|
self.projTree.setFileItemLayout(cHandle, nwItemLayout.CHAPTER)
|
||||||
|
|
||||||
aDoc.openDocument(tHandle, showStatus=False)
|
aDoc.openDocument(tHandle, showStatus=False)
|
||||||
aDoc.saveDocument("# %s\n\n" % projName)
|
aDoc.saveDocument(titlePage)
|
||||||
aDoc.clearDocument()
|
aDoc.clearDocument()
|
||||||
|
|
||||||
aDoc.openDocument(cHandle, showStatus=False)
|
aDoc.openDocument(cHandle, showStatus=False)
|
||||||
@@ -300,7 +305,7 @@ class NWProject():
|
|||||||
self.projTree.setFileItemLayout(tHandle, nwItemLayout.TITLE)
|
self.projTree.setFileItemLayout(tHandle, nwItemLayout.TITLE)
|
||||||
|
|
||||||
aDoc.openDocument(tHandle, showStatus=False)
|
aDoc.openDocument(tHandle, showStatus=False)
|
||||||
aDoc.saveDocument("# %s\n\n" % projName)
|
aDoc.saveDocument(titlePage)
|
||||||
aDoc.clearDocument()
|
aDoc.clearDocument()
|
||||||
|
|
||||||
# Create chapters and scenes
|
# Create chapters and scenes
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
<?xml version='1.0' encoding='utf-8'?>
|
<?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>
|
<project>
|
||||||
<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>
|
<author>Jay Doh</author>
|
||||||
<saveCount>675</saveCount>
|
<saveCount>676</saveCount>
|
||||||
<autoCount>122</autoCount>
|
<autoCount>122</autoCount>
|
||||||
<editTime>32866</editTime>
|
<editTime>32870</editTime>
|
||||||
</project>
|
</project>
|
||||||
<settings>
|
<settings>
|
||||||
<doBackup>False</doBackup>
|
<doBackup>False</doBackup>
|
||||||
|
|||||||
Reference in New Issue
Block a user