This Python script generates a novelWriter project from a work in progress written with e.g. LibreOffice. It converts three levels of the novel structure: Parts, chapters, and scenes.
- Python version 3.6+.
https://raw.githubusercontent.com/peter88213/odt2nw/main/odt2nw.py
You can either
- launch the program on the command line passing the .odt file as an argument, or
- launch the program via a batch file.
usage: odt2nw.py [-h] [--silent] Sourcefile
Sourcefile
The path of the .odt file.
-h, --help
show this help message and exit
--silent
suppress error messages and the request to confirm overwriting
It is assumed that very few types of text markup are needed for a fictional text:
- Emphasized (usually shown as italics).
- Strongly emphasized (usually shown as capitalized).
- Citation (paragraph visually distinguished from body text).
A work in progress has no third level heading.
- Heading 1 → New Part title.
- Heading 2 → New chapter title.
* * *
→ Scene divider (not needed for the first scenes in a chapter).- Comments right at the scene beginning are considered scene titles.
- All other text is considered scene content.
- Text markup: Bold and italics are supported. Other highlighting such as underline and strikethrough are lost.
- Paragraphs formatted as Quote start with
"> "
in novelWriter.
- Frederik Lundh published the xml pretty print algorithm.
odt2nw is distributed under the MIT License.
Create a cross reference table with novelWriter metadata.
Generate a novelWriter project from a FreeMind/Freeplane outline.
Generate a novelWriter project from a work in progress written with any text editor or Markdown word processor.
Converter between yWriter and novelWriter.