lambda-blog.generator

Filesystem utilities used in the generation pipeline.

clean-dir!

(clean-dir! {:keys [output-dir], :as ent})

Cleans the configured output-dir. Returns unmoified entity, but interacts with the filesystem.

copy-dir!

(copy-dir! {:keys [output-dir], :as ent} what where)

Copies what to where inside of the configured output-dir. Returns unmodified entity, but interacts with the filesystem.

generate!

(generate! entity key template & args)

Transforms a part of an entity under key into an HTML page using template with extra args. Returns unmodified entity, but interacts with the filesystem.

generate-all!

(generate-all! entity key template & args)

Transforms a sequence of values of an entity under key into HTML pages using template with extra args. Returns entity unmodified, but interacts with the filesystem.

read-dir

(read-dir entity key path)

Reads a directory under path. Returns entity with file contents sequence stored under key.

update

(update entity key & funs)

Returns entity with value under key modified by succesively applying funs.

update-all

(update-all entity key & funs)

Returns entity with sequence under key modified by succesively applying funs to each of the elements.

whenever

(whenever entity predicate? & funs)

Returns entity modified by succesively applying funs if (predicate? entity) is true.