hara.lang.library-snapshot

*parent*

dynamic

add-book

added in 4.0

(add-book snapshot {:keys [lang], :as book})

adds a book to a snapshot

delete-entries

added in 4.0

(delete-entries snapshot entries)

delete entries from the snapshot

delete-entry

added in 4.0

(delete-entry snapshot {:keys [lang module section id]})

deletes an entry from the snapshot

delete-module

added in 4.0

(delete-module snapshot lang module-id)

deletes a module in the snapshot

delete-modules

added in 4.0

(delete-modules snapshot lang module-ids)

deletes a bunch of modules in the snapshot

get-book

added in 4.0

(get-book snapshot lang)

gets the merged book for a given language

get-book-raw

added in 4.0

(get-book-raw snapshot lang)

gets the raw book

get-deps

added in 4.0

(get-deps snapshot id)

gets a dependency chain

install-book

added in 4.0

(install-book snapshot {:keys [lang parent], :as new-book})

adds a new book or updates grammar if exists

install-book-update

added in 4.0

(install-book-update snapshot {:keys [lang grammar parent meta]})

updates the book grammar, meta and parent

install-check-merged

added in 4.0

(install-check-merged book & [module-id])

checks that the book is not merged (used to check mutate)

install-module

added in 4.0

(install-module snapshot lang module-id options)

adds an new module or update fields if exists

install-module-specialized

added in 4.1

(install-module-specialized snapshot lang source-id module-id options)

clones a source module under a new module id with rewritten links

install-module-update

added in 4.0

(install-module-update book {module-id :id, :as module})

updates the book module

list-entries

added in 4.0

(list-entries snapshot lang)(list-entries snapshot lang module-id)(list-entries snapshot lang module-id section)

lists entries for a snapshot

list-modules

added in 4.0

(list-modules snapshot lang)

list modules for a snapshot

set-entries

added in 4.0

(set-entries snapshot entries & [opts])

sets an entry in the snapshot

set-entry

added in 4.0

(set-entry snapshot entry & [mopts])

sets an entry in the snapshot

set-module

added in 4.0

(set-module snapshot module)

sets a module in the snapshot

snapshot

added in 4.0

(snapshot m)

creates a snapshot

snapshot-merge

added in 4.0

(snapshot-merge parent child)

a rough merge of only the modules from the child to the parent

snapshot-reset

added in 4.0

(snapshot-reset snapshot)(snapshot-reset snapshot ks)

resets a snapshot to it’s blanked modules

snapshot-string

added in 4.0

(snapshot-string snapshot)

gets the snapshot string

snapshot?

added in 4.0

(snapshot? obj)

checks if object is a snapshot