Fork me on GitHub
#perun
<
2017-02-09
>
podviaznikov17:02:10

For some reason getting clj file in my fileset.

clojure boot build
[yaml-metadata] - parsed 1 files
[markdown] - parsed 1 markdown files
({:extension "clj",
  :filename "post.clj",
  :full-path "/Users/podviaznikov/.boot/cache/tmp/Users/podviaznikov/meetups/clojure/oom/-grrwi1/demo/blog/post.clj",
  :parent-path "demo/blog/",
  :path "demo/blog/post.clj",
  :permalink "/demo/blog/post.clj",
  :short-filename "post",
  :slug "post"}
 {:extension "html",
  :filename "2017-02-09-hello-world.html",
  :full-path "/Users/podviaznikov/.boot/cache/tmp/Users/podviaznikov/meetups/clojure/oom/f0sqpx/public/2017-02-09-hello-world.html",
  :include-atom true,
  :include-rss true,
  :original-path "2017-02-09-hello-world.md",
  :out-dir "public",
  :parent-path "public/",
  :path "public/2017-02-09-hello-world.html",
  :permalink "/2017-02-09-hello-world.html",
  :short-filename "2017-02-09-hello-world",
  :slug "2017-02-09-hello-world",
  :title "hello world",
  :io.perun/trace [:io.perun/yaml-metadata :io.perun/markdown]}
 {:extension "md",
  :filename "2017-02-09-hello-world.md",
  :full-path "/Users/podviaznikov/.boot/cache/tmp/Users/podviaznikov/meetups/clojure/oom/f0sqpx/2017-02-09-hello-world.md",
  :include-atom true,
  :include-rss true,
  :original true,
  :original-path "2017-02-09-hello-world.md",
  :parent-path "",
  :parsed "<h2><a href=\"#hello\" name=\"hello\"></a>Hello</h2>\n<p>Welcome to the Perun Hello World Demo</p>",
  :path "2017-02-09-hello-world.md",
  :permalink "/2017-02-09-hello-world.md",
  :short-filename "2017-02-09-hello-world",
  :slug "2017-02-09-hello-world",
  :title "hello world",
  :io.perun/trace [:io.perun/yaml-metadata :io.perun/markdown]})
[render] - rendered 1 pages
Writing target dir(s)…
My boot file looks like this
(set-env!
  :source-paths #{"src"}
  :resource-paths #{"resources"}
  :dependencies '[[perun "0.4.2-SNAPSHOT"]
                  [hiccup "1.0.5"]
                  [pandeiro/boot-http "0.6.3-SNAPSHOT"]])


(require '[clojure.string :as str]
         '[io.perun :refer :all]
         '[ :as post-view]
         '[pandeiro.boot-http :refer [serve]])


(deftask build
  "Build personal site"
  []
  (comp
    (markdown)
    (print-meta)
    (render :renderer ')
    (target)
    ))
Was it always like that or is it just me doing something different?

bhagany18:02:48

@podviaznikov it's a result of making the base task obsolete

bhagany18:02:18

I added filterer and extensions to print-meta so that you could only print the things you're interested in

bhagany18:02:54

Perhaps we should discuss this a little, actually. One of the things I changed was that some tasks would use boot/output-files to get the initial list of files before filtering, and now it uses boot/ls to get all files instead. I did this because I wanted it to be as flexible as possible, and for many use cases, only using a portion of the fileset limits what you can do.

bhagany18:02:38

For instance, I wanted someone to be able to put an HTML file in resources and use it as input to render, but this wouldn't be possible with boot/output-files

bhagany18:02:19

It did, however have this side effect where you see all files in your fileset when you do print-meta. A few options to make that better:

bhagany18:02:20

- use a default for print-meta's extensions that excludes clj files. Might be hard to whitelist though, so I think it'd be better have to have an extension blacklist for this case.

bhagany18:02:00

- establish a convention for what files Perun will consider that excludes boot/input-files (because this is where the clj files are)

podviaznikov18:02:15

got it. No worries, was just curious if we had that for a long time. I also do see now that print-meta supports bunch of options. So it’s definitely not a problem for me

podviaznikov18:02:23

maybe having both whitelist and backlist options is a good idea for the future, but don’t think it’s super important for now. filterer option is there and it can be filtered any way

bhagany19:02:28

okay, sounds good to me