Fork me on GitHub
#perun
<
2017-10-09
>
bhagany00:10:26

@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))}))))

branch1412:10:59

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

bhagany18:10:25

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.

bhagany18:10:48

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

bhagany19:10:42

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