Skip to content

Create a novelWriter project from an ODT document

License

Notifications You must be signed in to change notification settings

peter88213/odt2nw

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

odt2nw

Features

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.

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.


See also

nw_metadata

Create a cross reference table with novelWriter metadata.

nw_metadata

mm2nw

Generate a novelWriter project from a FreeMind/Freeplane outline.

mm2nw

md2nw

Generate a novelWriter project from a work in progress written with any text editor or Markdown word processor.

md2nw

yw2nw

Converter between yWriter and novelWriter.

yw2nw

About

Create a novelWriter project from an ODT document

Topics

Resources

License

Stars

Watchers

Forks

Languages