ManuscriptExport.h header
#include <ew/app/ManuscriptExport.h>
Namespace ew::app
ManuscriptExportOptions struct
struct ew::app::ManuscriptExportOptions
Options controlling a manuscript compile/export.
Members
ew::core::ContentId ew::app::ManuscriptExportOptions::root
The subtree to export: the document whose branch to compile. A null id compiles the whole manuscript (every top-level document and its descendants).
QString ew::app::ManuscriptExportOptions::audience
When non-empty, only documents visible to this audience are included (see ContentObject::isVisibleTo) – so an export can be produced for a specific readership. A hidden document is skipped together with its whole subtree. Empty includes everything.
bool ew::app::ManuscriptExportOptions::includeSynopses = false
Whether to emit each document's synopsis before its body.
bool ew::app::ManuscriptExportOptions::expandEmbeds = false
When true, each visible ![[…]] block-embed marker in a body is replaced by a Markdown rendering of the embedded object (expandEmbedsToMarkdown), so a book export shows the transcluded content inline instead of a literal marker. The website generator leaves this false and expands embeds to rich HTML at page-render time (renderEmbeddedBodyHtml) instead. Runs after audience embed stripping (a hidden callout is removed, not expanded).
const MountedLibraries* ew::app::ManuscriptExportOptions::libraries = nullptr
Optional mounted libraries; when set (and expandEmbeds is true) an embed naming a shared-library object is resolved and expanded too. Null resolves embeds within the project only. Not owned.
ManuscriptSection struct
struct ew::app::ManuscriptSection
One compiled section of a manuscript: a document rendered at a heading level (1 for a top-level document, deeper for nested ones), with its title, synopsis, and body (as stored, Markdown), in reading order.
Members
int ew::app::ManuscriptSection::level = 1
The heading depth: 1 for a top-level document, +1 per level of nesting.
QString ew::app::ManuscriptSection::title
The document's title (its heading text).
QString ew::app::ManuscriptSection::synopsis
The document's synopsis (empty unless requested and set).
QString ew::app::ManuscriptSection::body
The document's body, as stored (Markdown).
Functions
std::vector< ManuscriptSection > ew::app::compileManuscript(const ew::core::Project &project, const ManuscriptExportOptions &options)
Walks the manuscript from options.root (or the whole manuscript when it is null) in reading order – depth-first, each document before its children, siblings in manuscript order – and returns a section per document. A document not visible to options.audience is skipped along with its entire subtree, so an audience export never leaks a hidden branch. Non-document objects and missing ids are ignored.
QString ew::app::manuscriptToMarkdown(const std::vector< ManuscriptSection > §ions)
Renders compiled sections as one Markdown manuscript: each section's title as an ATX heading at its level (clamped to 1–6), its synopsis (when present) as a blockquote, then its body, separated by blank lines. An empty section list yields an empty string.