From 60736ce04c25fdbb265b75235baaec22192fd159 Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Tue, 25 May 2021 19:23:34 +0200 Subject: [PATCH 1/3] Update readme --- README.md | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index af613ee4..2e97c112 100644 --- a/README.md +++ b/README.md @@ -18,8 +18,8 @@ for comments, synopsis, and cross-referencing. It's designed to be a simple text for easy organisation of text and notes, using human readable text files as storage for robustness. The project storage is suitable for version control software, and also well suited for file -synchronisation tools. All text is saved as plain text files with a meta data header, the core -project structure is stored in a single project XML file, and other meta data is primarily saved as +synchronisation tools. All text is saved as plain text files with a meta data header. The core +project structure is stored in a single project XML file. Other meta data is primarily saved as JSON files. The full documentation is available on [readthedocs.io](https://novelwriter.readthedocs.io). @@ -32,13 +32,16 @@ met. It is regularly tested on Debian and Ubuntu Linux, Windows, and macOS. ## Project Contributions -Contributions to this project are welcome. However, please read the -[Contributing Guide](https://github.com/vkbo/novelWriter/blob/main/CONTRIBUTING.md) before -submitting larger additions or changes. +The project isn't taking feature contributions at the moment. If you have an idea, please make a +feature request in the issue tracker. Fixes and patches are welcome. So are new translations. +Contributions related to packaging and installing novelWriter will also be appreciated. If you want to help translating novelWriter into another language, please see the [README](https://github.com/vkbo/novelWriter/blob/main/i18n/README.md) in the `nw/assets/i18n` -folder. +folder for further details. + +Before contributing any code, please read the full +[Contributing Guide](https://github.com/vkbo/novelWriter/blob/main/CONTRIBUTING.md). ## Key Features From 2c1e1b94e763ad0997fd06a03a0f89705662638b Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Sun, 30 May 2021 11:55:56 +0200 Subject: [PATCH 2/3] Fix split tool dropping last line (#795) --- nw/dialogs/docsplit.py | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/nw/dialogs/docsplit.py b/nw/dialogs/docsplit.py index da5b27f0..74848870 100644 --- a/nw/dialogs/docsplit.py +++ b/nw/dialogs/docsplit.py @@ -53,6 +53,7 @@ class GuiDocSplit(QDialog): self.theProject = theProject self.optState = self.theProject.optState self.sourceItem = None + self.sourceText = [] self.outerBox = QVBoxLayout() self.setWindowTitle(self.tr("Split Document")) @@ -127,11 +128,7 @@ class GuiDocSplit(QDialog): ) return - theDoc = NWDoc(self.theProject, self.theParent) - theText = theDoc.openDocument(self.sourceItem, False) - theLines = theText.splitlines() - nLines = len(theLines) - theLines.insert(0, "%Split Doc") + nLines = len(self.sourceText) logger.debug( "Splitting document %s with %d lines" % (self.sourceItem, nLines) ) @@ -186,6 +183,7 @@ class GuiDocSplit(QDialog): logger.verbose("Creating folder %s" % fHandle) # Loop through, and create the files + theDoc = NWDoc(self.theProject, self.theParent) for wTitle, iStart, iEnd in finalOrder: itemLayout = nwItemLayout.NOTE @@ -208,11 +206,11 @@ class GuiDocSplit(QDialog): newItem.setStatus(srcItem.itemStatus) logger.verbose( "Creating new document %s with text from line %d to %d" % ( - nHandle, iStart, iEnd-1 + nHandle, iStart+1, iEnd ) ) - theText = "\n".join(theLines[iStart:iEnd]) + theText = "\n".join(self.sourceText[iStart:iEnd]) theText = theText.rstrip("\n") + "\n\n" theDoc.openDocument(nHandle, False) theDoc.saveDocument(theText) @@ -265,12 +263,10 @@ class GuiDocSplit(QDialog): "Scanning document %s for headings level <= %d" % (self.sourceItem, spLevel) ) - lineNo = 0 - for aLine in theText.splitlines(): - - lineNo += 1 - onLine = 0 + self.sourceText = theText.splitlines() + for lineNo, aLine in enumerate(self.sourceText): + onLine = -1 if aLine.startswith("# ") and spLevel >= 1: onLine = lineNo elif aLine.startswith("## ") and spLevel >= 2: @@ -280,7 +276,7 @@ class GuiDocSplit(QDialog): elif aLine.startswith("#### ") and spLevel >= 4: onLine = lineNo - if onLine > 0: + if onLine >= 0: newItem = QListWidgetItem() newItem.setText(aLine.strip()) newItem.setData(Qt.UserRole, onLine) From 577a3c6c6ab3ae86cfe9d849800788e4be11aed6 Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Sun, 30 May 2021 12:14:41 +0200 Subject: [PATCH 3/3] Bump version to 1.3.2 and update changelog --- CHANGELOG.md | 29 +++++++++++++++++++++++++++++ docs/source/conf.py | 4 ++-- nw/__init__.py | 6 +++--- nw/assets/text/release_notes.htm | 13 +++++++++++-- sample/nwProject.nwx | 6 +++--- 5 files changed, 48 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 12b3dc92..ab89e762 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,34 @@ # novelWriter Changelog +## Version 1.3.2 [2021-05-30] + +### Release Notes + +This is a patch release that fixes some minor issues. One issue was with the split tool, which +would drop the last line from the source document during a split if it was missing a final line +break. A minor issue with the display of word counts on the details panel under the project tree +has also been fixed. In addition, the setup script commands for Linux have been improved a bit. + +### Detailed Changelog + +**Bugfixes** + +* The details panel under the tree would sometimes show character, word and paragraph counts even + when there was no document selected. This has now been fixed. Issue #781. PR #782. +* The split document tool would drop the last line of the source document. This is generally not a + problem if the last line has a line break after it, but if it doesn't, it is lost in the split. + This was caused by an offset error when calculating the split positions in the file and has been + resolved. Issue #795. PR #796. + +**Installation** + +* Due to an error in the setup script in the past, a desktop icon was created for novelWriter when + running the `xdg-install` command. This is no longer the case, but the old icon was still left on + some user's desktops. The setup script will now remove that icon if it exists when the + `xdg-install` or `xdg-uninstall` commands are run. PR #784. + +---- + ## Version 1.3.1 [2021-05-06] ### Release Notes diff --git a/docs/source/conf.py b/docs/source/conf.py index f96cf403..aa04ace8 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -25,9 +25,9 @@ copyright = "2018–2021, Veronica Berglyd Olsen" author = "Veronica Berglyd Olsen" # The short X.Y version -version = "1.3.1" +version = "1.3.2" # The full version, including alpha/beta/rc tags -release = "1.3.1" +release = "1.3.2" # -- General configuration --------------------------------------------------- diff --git a/nw/__init__.py b/nw/__init__.py index 2e2db40b..a129828e 100644 --- a/nw/__init__.py +++ b/nw/__init__.py @@ -62,9 +62,9 @@ __license__ = "GPLv3" __author__ = "Veronica Berglyd Olsen" __maintainer__ = "Veronica Berglyd Olsen" __email__ = "code@vkbo.net" -__version__ = "1.3.1" -__hexversion__ = "0x010301f0" -__date__ = "2021-05-06" +__version__ = "1.3.2" +__hexversion__ = "0x010302f0" +__date__ = "2021-05-30" __status__ = "Stable" __domain__ = "novelwriter.io" __url__ = "https://novelwriter.io" diff --git a/nw/assets/text/release_notes.htm b/nw/assets/text/release_notes.htm index 76fd6df0..8ee9b560 100644 --- a/nw/assets/text/release_notes.htm +++ b/nw/assets/text/release_notes.htm @@ -2,6 +2,17 @@ +

Release Notes for 1.3.2

+

Released on 30 May 2021

+

This is a patch release that fixes some minor issues. One issue was with the split tool, which +would drop the last line from the source document during a split if it was missing a final line +break. A minor issue with the display of word counts on the details panel under the project tree +has also been fixed. In addition, the setup script commands for Linux have been improved a bit.

+ +

See also the Releases page.

+ +
+

Release Notes for 1.3.1

Released on 6 May 2021

This is a patch release primarily to fix a problem with the Qt translation library used to make @@ -10,8 +21,6 @@ added recently, in Qt 5.15, which many users on Linux will not have installed on issue could be resolved by updating the library, but it's an unnecessary and inconvenient restriction.

-

See also the Releases page.

-

Release Notes for 1.3

diff --git a/sample/nwProject.nwx b/sample/nwProject.nwx index 8310806e..fe3bcc24 100644 --- a/sample/nwProject.nwx +++ b/sample/nwProject.nwx @@ -1,13 +1,13 @@ - + Sample Project Sample Project Jane Smith Jay Doh - 1061 + 1062 166 - 49821 + 49870 False