powered by
Ingest content into a pensar vault. Ingest content into the vault
Writes content to raw/{type}/, generates a filename from source and date, adds YAML frontmatter, updates index.md, and appends to log.md.
raw/{type}/
index.md
log.md
ingest(content, type = c("articles", "chats", "briefings", "matrix"), source, title = NULL, tags = NULL, vault = default_vault())
The path to the written file, invisibly.
Character string or character vector (lines) of content.
Content type: "articles", "chats", "briefings", or "matrix".
"articles"
"chats"
"briefings"
"matrix"
Short identifier for the content source (e.g., URL, session ID, project name).
Optional title. If NULL, derived from source.
NULL
Optional character vector of tags.
Path to the vault directory.
v <- tempfile("vault-") init_vault(v, rproj = FALSE, agent_instructions = FALSE) ingest("Hello, world.", type = "articles", source = "demo", vault = v) status(v) unlink(v, recursive = TRUE)
Run the code above in your browser using DataLab