perun 2017-10-09

@bhagany Thx. This looks promising. I'll give it a try.

Oh - it just occurred to me that you could call get-global-meta right in your custom grouper function, and that way you wouldn’t need a separate task.

@branch14 ^ (sorry, I’m a little rusty)

Ah... nope, that would require access to the fileset. Disregard that last thing.

@branch14 I would define your own task using assortment-task, like so:

(deftask global-assortment
  "Renders an assortment using global metadata"
  []
  (with-pre-wrap fileset
    (let [global-meta (io.perun.meta/get-global-meta fileset)]
      (io.perun/assortment-task {:task-name "global-assortment"
                                 :tracer :your.ns/global-assortment
                                 :grouper (fn [entries] (do-something-with global-meta))}))))