Skip to main content

A markdown-like document editor for writing novels

Project description

novelWriter

Linux (3.6) Linux (3.7) Linux (3.8) Linux (3.9) Windows (3.9) macOS (3.9) flake8 codecov docs release pypi python

novelWriter is a Markdown-like text editor designed for writing novels assembled from many smaller text documents. It uses a minimal formatting syntax inspired by Markdown, and adds a meta data syntax for comments, synopsis, and cross-referencing between files. It's designed to be a simple text editor that allows for easy organisation of text files and notes, built on plain text files for robustness.

The plain text files are suitable for version control software, and also well suited for file synchronisation tools. The core project structure is stored in a single project XML file. Other meta data is primarily saved in JSON files.

The full documentation is available on readthedocs.io.

Implementation

The application is written in Python 3 using Qt5 via PyQt5. It is developed on Linux, but it should in principle work fine on other operating systems as well, as long as dependencies are met. It is regularly tested on Ubuntu Linux, Windows, and macOS.

Project Contributions

Contributions to this project are welcome. However, please read the Contributing Guide before submitting larger additions or changes to this project.

Key Features

Some key features of novelWriter are listed below. Consult the documentation for more information.

Markdown Flavour

novelWriter is not a full-feature Markdown editor. It is a plain text editor that uses Markdown-like syntax to allow for a minimal set of formatting that is useful for the specific task of writing novels. The formatting is currently limited to:

  • Headings levels 1 to 4 using the # syntax only.
  • Emphasised and strongly emphasised text. These are rendered as italicised and bold text.
  • Strikethrough text.
  • Hard line breaks using two or more spaces at the end of a line.

That is it. Features not supported in the editor are also not exported when using the export tool.

In addition, novelWriter adds the following, which is otherwise not supported by Markdown:

  • A line starting with % is treated as a comment and not rendered on exports unless requested. Comments do not count towards the word count.
  • If the first word of the comment is synopsis:, the comment is indexed and treated as the synopsis for the section of text under the same header. These synopsis comments can be used to build an outline and exported to external documents.
  • A set of meta data keyword/values starting with the character @. This is used for tagging and inter-linking documents, and can also be included when generate a project outline.
  • A variety of thin and non-breaking spaces are supported. Some of them depend on the system running at least Qt 5.9. Earlier versions of Qt will unfortunately strip them out when saving.
  • Tabs can be used in the text, and should be properly aligned in both editor and viewer. This can be used to make simple tables and lists. Full Markdown tables and lists are not supported. Note that for HTML exports, most browsers will treat a tab as a space, so it may not show up like expected. Open Document exports should produce the expected result.

The core export formats of novelWriter are Open Document and HTML5. Open Document is an open standard for office type documents that is supported by most office applications. See Open Document > Application Support for more details.

You can also export the entire project as a single novelWriter Markdown-flavour document. These can later be imported again into novelWriter. In addition, printing and export to PDF is offered through the Qt library, although with limitations to formatting.

Colour Themes

The editor has syntax highlighting for the features it supports, and includes a set of different syntax highlighting themes. Optional GUI themes are also available, including dark themes.

Easy Organising of Project Files

The structure of the project is shown on the left hand side of the main window. Project files are organised into root folders, indicating what class of file they are. The most important root folder is the Novel folder, which contains all of the files that make up the finished novel. Each root folder can have subfolders. Subfolders have no impact on the final project structure, they are there for you to organise your files in whatever way you want.

The editor supports four levels of headings, which determines what level the following text belongs to. Headings of level one signify a book or partition title. Headings of level two signify the start of a new chapter. Headings of level three signify the start of a new scene. Headings of level four can be used internally in each scene to separate sections.

Each novel file can be assigned a layout format, which shows up as a flag next to the item in the project tree. These are mostly to help the user track what they contain, but they also have some impact on the format of the exported document. See the documentation for further details.

Project Notes

Supporting note files can be added for the story plot, characters, locations, story timeline, etc. These have their separate root folders. These are optional files.

Visualisation of Story Elements

The different notes can be assigned tags, which other files can refer back to using @-prefixed meta keywords. This information can be used to display an outline of the story, showing where each scene connects to the plot, and which characters, etc. occur in them. In addition, the tags themselves are clickable in the document view pane, and control-clickable in the editor. They make it possible to quickly navigate between the documents while editing.

Standard Installation

For a regular installation, it is recommended that you download one of the minimal zip files from the Releases page or the novelwriter.io website. The documentation has detailed install instructions for Linux, Windows, and macOS. They are pretty straightforward.

Running from Source

If you want to run novelWriter directly from the source code, you must run the novelWriter.py file from command line.

Note: You may need to replace python with python3 and pip with pip3 in the instructions below on some systems. You may also want to add the --user flag for pip to install in your user space only.

Dependencies

Dependencies can generally be installed from PyPi with:

pip install pyqt5 lxml pyenchant

Additional Steps for Linux

On Linux, you can most likely find the dependencies in your distribution's repository. On Ubuntu and Debian, run:

sudo apt install python3-pyqt5 python3-lxml python3-enchant

If you want to set up a launcher on Linux, you can run:

python setup.py xdg-install

Additional Steps for macOS

First, make sure you have properly set up Python3 with Homebrew. If not, check their documentation. In addition, the following steps are necessary to install all dependencies:

brew install enchant
pip3 install --user -r requirements.txt
pip3 install --user pyobjc

Additional Steps for Windows

Windows doesn't by default come with Python installed. If you haven't installed it already, get it from python.org/downloads. Remember to select "Add Python to PATH" during the installation.

The script setup_windows.bat can be used to create desktop and start menu icons for novelWriter. The script will also install dependencies for you from PyPi.

Debugging

If you need to debug novelWriter, you must run it from the command line. It takes a few parameters, which can be listed with the switch --help. The --info, --debug or --verbose flags are particularly useful for increasing logging output for debugging.

Licenses

This is Open Source software, and novelWriter is licensed under GPLv3. See the GNU General Public License website for more details, or consult the LICENSE file.

Bundled assets have the following licenses:

Screenshots

novelWriter with default system theme: Screenshot 1

novelWriter with dark theme: Screenshot 2

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

novelWriter-1.2.3.tar.gz (3.1 MB view hashes)

Uploaded Source

Built Distribution

novelWriter-1.2.3-py3-none-any.whl (2.9 MB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page