 (deftask rss
   "Generate RSS feed"
   [f filename    FILENAME    str  "generated RSS feed filename"
-   _ filterer    FILTER      code "filter function"
+   _ filterer    FILTER      code "predicate to use for selecting entries (default: `:content`)"
    o target      OUTDIR      str  "the output directory"
    t title       TITLE       str  "feed title"
    p description DESCRIPTION str  "feed description"

   :filterer :content})

(deftask render
  "Render pages.

   If permalink is set for the file, it is used as the filepath.
   If permalink ends in slash, index.html is used as filename.
   If permalink is not set, the original filename is used with file extension set to html."
  [o out-dir  OUTDIR   str  "the output directory"
   _ filterer FILTER   code "filter function"
   r renderer RENDERER sym  "page renderer (fully qualified symbol which resolves to a function)"]
  (let [pods    (wrap-pool (pod/pod-pool (boot/get-env)))
        tmp     (boot/tmp-dir!)

   :comparator (fn [i1 i2] (compare i2 i1))})

(deftask collection
  "Render single file for a collection of entries
  The symbol supplied as `renderer` should resolve to a function
  which will be called with a map containing the following keys:
   - `:meta`, global perun metadata
   - `:entries`, all entries

  Entries can optionally be filtered by supplying a function
  to the `filterer` option.

  The `sortby` and `groupby` functions can be used for ordering entries
  before rendering as well as rendering groups of entries to different pages."
  [o out-dir    OUTDIR     str  "the output directory"
   r renderer   RENDERER   sym  "page renderer (fully qualified symbol resolving to a function)"
   _ filterer   FILTER     code "predicate to use for selecting entries (default: `:content`)"
   s sortby     SORTBY     code "sort entries by function"
   g groupby    GROUPBY    code "group posts by function, keys are filenames, values are to-be-rendered entries"
   c comparator COMPARATOR code "sort by comparator function"
   p page       PAGE       str  "collection result page path"]
  (let [pods      (wrap-pool (pod/pod-pool (boot/get-env)))
