ManuskriptImport.h header
#include <ew/app/ManuskriptImport.h>
Namespace ew::app
ManuskriptFile struct
struct ew::app::ManuskriptFile
One file read from a Manuskript project's outline/ tree: its path relative to that folder (with '/' separators) and its raw content. A scene is a {number}-{slug}.md file; a chapter/group is a folder holding a folder.txt (its own metadata) plus nested scenes and sub-folders.
Members
QString ew::app::ManuskriptFile::relativePath
The file's path relative to the project's outline/ folder, e.g. "1-Act One/1-Scene.md".
QString ew::app::ManuskriptFile::content
The file's raw content: a multimarkdown metadata header (Field: value lines) then, after a blank line, the Markdown body.
Functions
ImportedManuscript ew::app::buildManuskriptDocuments(const std::vector< ManuskriptFile > &outlineFiles, const QString &projectTitle)
Turns the files of a Manuskript outline/ tree into an importable manuscript rooted at projectTitle. Mirrors the tree: a root Document (kind Note, titled projectTitle) holds a container Document per folder (titled from its folder.txt metadata Title, or the folder's slug), and each scene .md file becomes a Document under its folder's container. Each file's multimarkdown header is parsed: its Title becomes the document title (falling back to the file's number-stripped slug) and its summary the synopsis; the body after the header is the document body. Documents are returned by pointer (content objects are non-copyable), root first. Pure and deterministic given outlineFiles.
ImportedManuscript ew::app::importManuskript(const QString &projectDir)
Reads a Manuskript project folder projectDir (identified by its MANUSKRIPT marker file) and imports it: the outline/ tree becomes the manuscript (via buildManuskriptDocuments, titled from infos.txt), each characters/ file becomes a Note document under a "Characters" container, and the world.opml hierarchy becomes Note documents under a "World" container. Returns an empty result if projectDir is not a Manuskript project or cannot be read.