Guest User

Untitled

a guest
Jul 19th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. #!/usr/bin/env cake
  2.  
  3. (use 'clojure.java.shell '[clojure.string :only [join]] 'cake)
  4.  
  5. (def parent "/home/rayne/meet-clojure")
  6.  
  7. (defn chapter-sort [item] (->> item (re-seq #"\d+") first Integer/parseInt))
  8.  
  9. (->> (java.io.File. parent ".") file-seq (map str)
  10. (filter #(.endsWith % ".markdown")) (sort-by chapter-sort)
  11. (apply sh "markdown2pdf" "-o"
  12. (str parent "/" (second (:run *opts*))) "--toc"
  13. "--xetex" "--number-sections" "--template" (str parent "/mc.template"))
  14. :err println)
Add Comment
Please, Sign In to add comment