CodexExport.h header
#include <ew/app/CodexExport.h>
Namespace ew::app
CodexEntry struct
struct ew::app::CodexEntry
One codex entity compiled for export: its content id, the name of the category it belongs to, its own display name, and its populated field values as (label, value) pairs in the category's field order.
Members
ew::core::ContentId ew::app::CodexEntry::id
The entity's content id, so an export can give it a stable per-entity page ("<id>.html") that map regions and cross-references link to.
QString ew::app::CodexEntry::categoryName
The display name of the entity's category ("Uncategorized" when it has none).
QString ew::app::CodexEntry::name
The entity's display name.
std::vector<std::pair<QString, QString> > ew::app::CodexEntry::fields
The entity's populated fields, each a (label, value) pair, in the category's field order. Fields with no value are omitted.
CodexExportOptions struct
struct ew::app::CodexExportOptions
Options controlling a codex (world-bible) export.
Members
QString ew::app::CodexExportOptions::audience
When non-empty, only entities visible to this audience are included (see ContentObject::isVisibleTo) – so a world bible can be produced for a specific readership. Empty includes every entity.
Functions
QString ew::app::codexToMarkdown(const std::vector< CodexEntry > &entries)
Renders compiled codex entries as Markdown: each category as an H2 heading, each entity under it as an H3 heading followed by a bulleted list of its labelled field values. An empty entry list yields an empty string.
std::vector< CodexEntry > ew::app::compileCodex(const ew::core::Project &project, const CodexExportOptions &options)
Compiles project's codex entities into world-bible entries, grouped for a stable read: sorted by category name, then entity name. Each entry carries its field values labelled by the category's schema (its own and inherited fields, in order). An entity not visible to options.audience is skipped, so an audience export never leaks a hidden entity.