CSV Import for Scene Lists
Description:
It would be helpful if novelWriter allowed users to create and manage scene lists externally (using tools like spreadsheets) and later import them via CSV. Currently, writers may struggle with scene organization within the app. Allowing an import feature would save time, especially for users who prefer to organize their scenes outside of novelWriter. Alternatively, if a scene plotting feature is implemented within the app, integrating that with the CSV import could enhance productivity.
Expected Outcome:
- Users can import scene lists through CSV files.
- If implemented, a scene plotting feature in novelWriter could complement the import functionality.
We all use (or used) spreadsheet software at some point during development of a story. It's straight-forward to think of scenes or chapters as rows, and properties of these items as columns. Unfortunately this is the point were consensus ends.
I think you need to answer these questions (this is an incomplete list only):
- What would you wish to import (type, order, status, title, or everything in Novelwriter's Outline View)?
- Should this feature complement the 'Export CSV' action in Novelwriter's Outline View?
- What happens to items not in the imported CSV that exist in the novelwriter project?
- What happens to items in the imported CSV that do not exist in the novelwriter project?
- Does this feature request touch on the discussions in #1784 and #1769?
We all use (or used) spreadsheet software at some point during development of a story. It's straight-forward to think of scenes or chapters as rows, and properties of these items as columns. Unfortunately this is the point were consensus ends.
Actually, I never use spreadsheets for this. I plan my story from the beginning in the Plot folder in novelWriter, then create a document per act where I use meta tags and comments to spec out my key scenes.
In any case, this tool can become rather extensive so it really needs to be well planned before anything like this can be added.
Python has built-in CSV support, so the import is fairly straightforward. A pre-import step could list all columns in the CSV and the user could select what each column means, or which are to be ignored. At least that should allow for speccing out scene titles and POV characters, and even scene characters, locations and whatever else it's desirable to import.
The data in each column can be matched for uniqueness, so say you have the following in two rows:
| Chapter | Scene | POV | Chars | Location |
|---|---|---|---|---|
| Chapter 1 | Opening Scene | Jane | John, Bob | Jane's House |
| Chapter 1 | Dinner Scene | Jane | Bob, John, Sarah | Restaurant |
From this, the importer could generate a document called "Chapter 1" with two sub documents "Opening Scene" and "Dinner Scene", with POV, char and location tags set. It would also generate the character notes Jane, John, Bob and Sara, and the two location notes.
The character and location columns would be considered comma-separated tags like they are in novelWriter, and only missing tags would generate a new note. The chapter and scene documents could check against existing document labels.
Most of this is fairly easy, and the code to generate the documents already exists. To be on the safe side, a list of the documents the importer plans to generate could be provided before it is executed, so it's possible to cancel and fix things before they are added.
As a bonus feature, it could also allow to select templates for generating the documents, but those would need to be present in the project already. A template import/export feature may be a useful (but separate) feature too.
It would be helpful if novelWriter allowed users to create and manage scene lists externally (using tools like spreadsheets)
If you use either the FreeMind or the Freeplane mind mapper, you might want to take a look at my mm2nw.py Python script, It can create a novelWriter project with a novel structure and some character/world/plot/research data, though no relationships between them.
We all use (or used) spreadsheet software at some point during development of a story.
The other way round: the nw_meta.py Python script can be used to export such a table from an existing novelWriter project (if this feature has not been implemented in the meantime). I don't think it would be too difficult to reverse this conversion process if you know a bit about Python.
I forgot that you created all these great tools. I need to add them to the documentation.
I forgot that you created all these great tools.
Well, these scripts have been available for quite some time, and I really don't know if they have found any users at all. As I now have other priorities, I won't be developing them any further. For what it's worth, my most sophisticated novelWriter utility is the ODT manuscript converter.