ObsidianImport.h header
#include <ew/app/ObsidianImport.h>
Namespace ew::app
VaultNote struct
struct ew::app::VaultNote
One note read from an Obsidian/Markdown vault: its path relative to the vault root (with '/' separators) and its Markdown content.
Members
QString ew::app::import::VaultNote::relativePath
The note's path relative to the vault root, e.g. "Characters/Alice.md".
QString ew::app::import::VaultNote::content
The note's raw Markdown content.
Functions
ImportedManuscript ew::app::import::buildVaultDocuments(const std::vector< VaultNote > ¬es, const QString &vaultName)
Turns a set of vault notes into an importable manuscript rooted at vaultName. Mirrors the vault's folder tree: a root Document (kind Note, titled vaultName) holds a container Document per subfolder, and each note becomes a Document under its folder's container. Each note's leading YAML front-matter block is stripped from the body, and Obsidian [[wikilinks]] (with optional |alias, #heading, or ^block parts) are rewritten to project links – [display](ewriter:// object/<uuid>) – when the target resolves to another note by file base name (case-insensitively); unresolved links are left as literal [[...]] text so nothing is lost. An embed (![[…]]) is handled separately, because that is this product's own transclusion syntax: one naming an imported note stays an embed of that note (with its #section, if any), so it keeps working natively; one naming an attachment – which the vault scan does not import – becomes a plain  image reference, since a bare ![[…]] pointing at nothing would draw an "unresolved embed" card in the middle of the prose. Documents are returned by pointer (content objects are non-copyable), root first. Pure and deterministic given notes.
ImportedManuscript ew::app::import::importObsidianVault(const QString &vaultDir)
Reads the Obsidian/Markdown vault directory vaultDir recursively (every *.md file) and imports it via buildVaultDocuments(), naming the root after the directory. Returns an empty result if the directory has no Markdown files or cannot be read.