peter88213/novelyst

novelyst 5

peter88213 opened this issue · 1 comments

New features

New .novx XML data format

novelyst 4 uses yWriter's .yw7 file format, tweaking it in a compatible way to add novelyst specific data. This limits the range of novelyst's features. Besides, the .yw7 file format, yet flexible and easy to figure out, hasn't the potential of a "neat" XML standard. Therefore, a new XML data format is defined. The focus is on the good readability of the file content even without special software (apart from a css stylesheet for the web browser), and the capability of extracting documents of all kinds using standard XSL transformations.

  • Provide a versioned Document Type Definition.
  • Provide a css style sheet for conveniently viewing the project and reading the novel with a web browser.
  • Provide a Windows registry script for file icon/"open file" assignment and MIME type registration.
  • Provide a plugin for .yw7 file import and export.
  • Get rid of CDATA passages. Instead, use XHTML-like elements such as <p>, <em>, and <strong> for the content formatting.
  • Define new elements, reflecting the changes in the data model.
  • Collections use the new .nvcx XML format that is easy to transform with XSLT.
  • Provide tools for .yw7 and .pwc file conversion.

Data model

For historical reasons, novelyst 4 has an internal data model that is close to the yWriter 7 file format. It is easy to extend the data model, but the handling of these extensions is cumbersome, and the software architecture is subject to limitations. A revised data model in novelyst 5 enables clearer program code and an overall more powerful software architecture.

  • Rewording: Section replaces Scene, since Scene actually has a specific meaning.
  • Provide a Stage data type, replacing the "stage" tagged todo-scenes in novelyst 4.
  • Provide an Arc data type, replacing the todo-chapters with arc names assigned in novelyst 4.
  • Provide a Turning point data type, replacing the todo-scenes assigned to "Arc chapters" in novelyst 4.
  • Characters are given birth and death dates.
  • The project has a default date to which sections with an unspecified date/time refer. This allows synchronization with timelines.
  • Allow an unlimited number of file links for characters/locations/items. This replaces the yWriter-like image link.

Usability

Document editing workflow

With novelyst 4, you export ODF documents for editing, and have a LibreOffice/OpenOffice extension write back the changes to the .yw7 project file. Then you have novelyst reload the project file. This works very well, but be aware of newly created chapters and scenes in the ODT manuscript. After updating novelyst, the ODT manuscript must be deleted manually and re-exported for the next editing cycle. With novelyst 5, you just save the edited documents, which are considered temporary, and close LibreOffice/OpenOffice. Then have novelyst do the synchronization and delete the temporary files automatically.

  • Exported ODF documents are re-imported from within novelyst, so there is no need for a LibreOffice extension.
  • For re-import, there is a file picker menu showing all exported documents with their file date. Documents that are newer than the novelyst project are highlighted.
  • To avoid confusion, edited ODF documents are automatically deleted after re-importing.
  • New file name suffixes are given to exported ODF documents, indicating their temporary status.
  • Use native footnotes and endnotes in the manuscript (instead of comments with special markup).
  • Export native lists (instead of - prefixed paragraphs).
  • Allow the partial nesting of formatting.

Tree view

  • Part elements are placed on chapter level. This makes it way easier to move the part boundaries.
  • Provide a Plot menu for plot elements like stages, arcs, and turning points.
  • New child elements are appended at the end rather than inserted at the beginning, if the parent is selected.
  • No longer redraw the tree after making changes (e.g. type).
  • Drop the Research and Planning branches. Provide an Arcs branch instead.

Properties view

  • Display the week day with the section date.
  • Convert specific section date to day and vice versa, if the reference date is set.
  • Provide pick lists for assigning arcs/characters/locations/items to sections.
  • Display the age of characters assigned to dated sections.

Matrix plugin

  • Changes in the table immediately take effect on the other views, and vice versa.
  • Improve the start up speed. This could result in a new appearance.

Setup/installation

  • novelyst 5 and its plugins are installed in another directory (~/.novelyst instead of ~/.pywriter/novelyst). Thus it can be installed in parallel with novelyst 4 and all the PyWriter based tools that use the .yw7 file format. On the other hand, you can remove programs easily if you decide to abandon the compatibility with yWriter.

Code

Since novelyst 5 has is own file format, the PyWriter library that supports .yw7 is replaced by the new novxlib library. novxlib has about the same range of features as pywriter, but defines the new novelyst 5 data model and supports the .novx file format.

  • Implement the Model-View-Controller design pattern.
  • Use a replaceable "tree" class with a ttk.Treeview interface for the relationships of the model elements (thus applying the Strategy pattern). This allows the model to be seamlessly linked to the tree view.
  • Use properties with getters and setters for the model classes' instance variables. The setter methods trigger an "element has changed" callback routine.
  • Replace the model classes' keyword variables with properties.
  • Use keyword arguments for the initialization of the properties.