diff --git a/CHANGELOG.md b/CHANGELOG.md index 462dc91d..56c45a0c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,8 @@ * Dropped the usage of .bak copies of document files. This was the old method to ensure the document data was written successfully, but it uses twice the storage space. Instead, writing via a temp file is the safe way to save files. PR #248. -## Not Yet Released + +## Version 0.6.2 [2020-xx-xx] **Bugfixes** @@ -17,11 +18,14 @@ * Renamed the "Generate Preview" button on the "Build Novel Project" tool to "Build Novel Project". You must actually click this to be able to export or print. Issue #237, PR #238. * Added font family and font size selectors to the "Build Novel Project" tool. You may want a different print font than used in the editor itself. Issue #230, PR #238. +* Removed the "Help" feature in "Build Novel Project" and instead written detailed tooltips. Issue #250, PR #249. +* Changed the title formnatting codes for "Build Novel Project" to something less verbose. The old codes are translated automatically. Issue #247, PR #249. * A margin of the viewport (outside the document) has been added to the document editor and viewer to make room for the document title bar. Previously, the title bar would sit on top of the document top margin, which would sometimes hide text that would otherwise be visible. PR #236. * Fixed some alignment issue for the status icon on the project tree details panel. Mentioned in #235, PR #239. * Removed the `Xo` icon for NO_LAYOUT in the project tree details panel. Mentioned in #235, PR #239. * Added a Details tab to the Project Settings dialog, which also lists the project path. Issue #242, PR #239. + ## Version 0.6.1 [2020-05-25] **Bugfixes** diff --git a/docs/source/export.txt b/docs/source/export.txt index 0cb9d05b..62e81e2f 100644 --- a/docs/source/export.txt +++ b/docs/source/export.txt @@ -13,12 +13,12 @@ This is done through a series of keyword-replace steps. The keyword ``%title%`` will always be replaced by the text you put after the ``#`` characters in your document. -The keywords ``%chnum%`` and ``%chnumword%`` is replaced by a number, or a number word, respectively. +The keywords ``%ch%`` and ``%chw%`` is replaced by a number, or a number word, respectively. The number is incremented by one each time the build tool sees a new heading of level two in a file with layout "Chapter". If the file has layout "Unnumbered", the counter is not incremented. the latter is useful for for instance Prologue and Epilogue chapters. -Likewise, the keywords ``%scnum%`` and ``%scabsnum%`` are number counters for scene files. +Likewise, the keywords ``%sc%`` and ``%sca%`` are number counters for scene files. These are incremented each time a heading of level three is encountered. The former keyword is reset to one for each new chapter, while the latter is not reset but counts from first scene encountered. diff --git a/nw/assets/text/exportHelp_en.htm b/nw/assets/text/exportHelp_en.htm deleted file mode 100644 index e921f05d..00000000 --- a/nw/assets/text/exportHelp_en.htm +++ /dev/null @@ -1,49 +0,0 @@ -
A brief guide to make the most out of the Build Novel Project tool.
- -The format of the various title levels in the files under the Novel folder can be customised in - these settings. The actual title given in the headings of your files will for instance replace - all occurrences of the keyword %title%. Any static text will be left as-is in the - final title. An empty field means the title isn't written out at all.
-The available formatting keywords are:
-%title% – This is replaced with the text you put in your headings in your - documents
-%chnum% – This is replaced with the chapter number of your chapter type - headings. These are generated automaticall starting from 1, but ignoring chapter headings in - files with "Unnumbered" layout.
-%chnumword% – This is replaced with the chapter number, but instead of an - arabic number, the word for it is used, e.g. One, Two, Fifteen, Twenty-Five, etc.
-%scnum% – This is replaced with the scene number. The number is reset to one - for each new chapter, so it is the scene number within the current chapter.
-%scabsnum% – This is replaced with the absolute scene number. That is, the - number is counted from the first scene in the novel, and not reset for each chapter.
-\\ – Two backslashes are replaced by a line break.
-Note: The Scene and Section formats are treated slightly differently than the other title - formats. If the format is a constant text, that is, contains no %keyword% tags, it - will be treated as a separator instead. Scene and Section separators are centred, and for - scenes, not shown if placed directly after the chapter heading. For instance, it you want the - classic three asterisk * * * separator between scenes, just put that into the - scene format box, and nothing else.
- -Novel Outline Mode: This option will build an outline version of the novel rather than the - full thing. It overrides the title format settings without changing them. Each title will be - written out, and the synopsis text will appear instead of the body text of the files. Some of - the other options are still available in Outline Mode.
- -Include Synopsis: This will add the synopsis comment as the first paragraph after each - heading.
-Include Comments: This will include any comments as additional paragraphs in the text.
-Include Keywords: This will include any keywords and tags as clickable links after each - heading.
- -Include Novel Files: This means all files that don't have a layout of type "Note" will be - included. This is the normal mode when exporting the novel itself without the notes.
-Include Note Files: This means all files with a layout of type "Note" will be - included. Titles in note files are always left as they appear.
-Ignore Export Flag: Each file in the project tree has an "Include when building project" - option set, which is indicated by a little check mark in the "Flags" column. Files without This - tick will normally be skipped during build, but can be included if this option is enabled.
diff --git a/nw/core/tokenizer.py b/nw/core/tokenizer.py index 2fa784f5..8de64118 100644 --- a/nw/core/tokenizer.py +++ b/nw/core/tokenizer.py @@ -566,10 +566,10 @@ class Tokenizer(): """Replaces the %keyword% strings. """ theTitle = theTitle.replace(r"%title%", theText) - theTitle = theTitle.replace(r"%chnum%", str(self.numChapter)) - theTitle = theTitle.replace(r"%scnum%", str(self.numChScene)) - theTitle = theTitle.replace(r"%scabsnum%", str(self.numAbsScene)) - theTitle = theTitle.replace(r"%chnumword%", numberToWord(self.numChapter,"en")) + theTitle = theTitle.replace(r"%ch%", str(self.numChapter)) + theTitle = theTitle.replace(r"%sc%", str(self.numChScene)) + theTitle = theTitle.replace(r"%sca%", str(self.numAbsScene)) + theTitle = theTitle.replace(r"%chw%", numberToWord(self.numChapter,"en")) return theTitle # END Class Tokenizer diff --git a/nw/gui/build.py b/nw/gui/build.py index 7e5c00c8..6a7c99cc 100644 --- a/nw/gui/build.py +++ b/nw/gui/build.py @@ -39,7 +39,7 @@ from PyQt5.QtGui import ( from PyQt5.QtWidgets import ( QDialog, QVBoxLayout, QHBoxLayout, QTextBrowser, QPushButton, QLabel, QLineEdit, QGroupBox, QGridLayout, QProgressBar, QMenu, QAction, - QFileDialog, QFontComboBox, QSpinBox + QFileDialog, QFontComboBox, QSpinBox, QDialogButtonBox ) from nw.gui.additions import QSwitch @@ -75,11 +75,11 @@ class GuiBuildNovel(QDialog): self.nwdText = [] # List of markdown documents self.setWindowTitle("Build Novel Project") - self.setMinimumWidth(800) + self.setMinimumWidth(900) self.setMinimumHeight(800) self.resize( - self.optState.getInt("GuiBuildNovel", "winWidth", 800), + self.optState.getInt("GuiBuildNovel", "winWidth", 900), self.optState.getInt("GuiBuildNovel", "winHeight", 800) ) @@ -95,30 +95,61 @@ class GuiBuildNovel(QDialog): self.titleForm = QGridLayout(self) self.titleGroup.setLayout(self.titleForm) + fmtHelp = ( + r"Formatting Codes: