peter88213 / odt2nw

Create a novelWriter project from an ODT document

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

odt2nw

Generate a novelWriter project from a work in progress written with e.g. LibreOffice.

Features

  • Converts three levels of the novel structure: Parts, chapters, and scenes.

Requirements

Download link

https://raw.githubusercontent.com/peter88213/odt2nw/main/odt2nw.py

Instructions for use

Command line usage

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

positional arguments:

Sourcefile

The path of the .odt file.

optional arguments:

-h, --help

show this help message and exit

--silent

suppress error messages and the request to confirm overwriting

How to set up a work in progress for conversion

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.

Example document


Credits

License

odt2nw is distributed under the MIT License.

About

Create a novelWriter project from an ODT document

License:MIT License


Languages

Language:Python 100.0%