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::VaultNote::relativePath
The note's path relative to the vault root, e.g. "Characters/Alice.md".
QString ew::app::VaultNote::content
The note's raw Markdown content.
Functions
ImportedManuscript ew::app::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. Documents are returned by pointer (content objects are non-copyable), root first. Pure and deterministic given notes.
ImportedManuscript ew::app::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.