ExOKF.Log (ex_okf v0.1.0)

Copy Markdown View Source

An OKF log.md reserved document (OKF ยง7).

Logs record the history of changes for a directory scope as a flat list of date-grouped entries, newest first. Date headings must use ISO 8601 YYYY-MM-DD form.

Fields

FieldTypeDescription
pathString.t()Bundle-relative path. Example: "log.md" or "tables/log.md".
directoryString.t()Parent directory ("" for bundle root).
bodyString.t()Full markdown content of the log file.
entries[t:entry/0]Flattened date-grouped bullets parsed from body.

Example

%ExOKF.Log{
  path: "log.md",
  directory: "",
  body: """
  # Directory Update Log

  ## 2026-05-28
  * **Update**: Added customers table documentation.

  ## 2026-05-22
  * **Creation**: Established sales dataset.
  """,
  entries: [
    %{date: "2026-05-28", text: "**Update**: Added customers table documentation."},
    %{date: "2026-05-22", text: "**Creation**: Established sales dataset."}
  ]
}

Summary

Types

A single log bullet under a date heading.

t()

An OKF log document.

Types

entry()

@type entry() :: %{date: String.t(), text: String.t()}

A single log bullet under a date heading.

  • :date (String.t()) โ€” ISO 8601 date from the ## YYYY-MM-DD heading
  • :text (String.t()) โ€” bullet body, often starting with **Update** / **Creation**

t()

@type t() :: %ExOKF.Log{
  body: String.t(),
  directory: String.t(),
  entries: [entry()],
  path: String.t()
}

An OKF log document.

See the module documentation for field meanings and a full example.