;; Copyright (c) 2011-2016 Juan Pedro Bolivar Puente <raskolnikov@gnu.org>
;;
;; This file is part of Sinusoid.es.
;;
;; Sinusoid.es is free software: you can redistribute it and/or modify
;; it under the terms of the GNU Affero General Public License as
;; published by the Free Software Foundation, either version 3 of the
;; License, or (at your option) any later version.
;;
;; Sinusoid.es is distributed in the hope that it will be useful, but
;; WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
;; Affero General Public License for more details.
;;
;; You should have received a copy of the GNU Affero General Public
;; License along with Sinusoid.es.  If not, see
;; <http://www.gnu.org/licenses/>.

(ns sinusoides.util
  (:require [pl.danieljanus.tagsoup :as tagsoup]))

(defmacro embed-svg [svg-file]
  (let [hiccup (tagsoup/parse-string (slurp svg-file))]
    `~hiccup))

;; Copyright (c) 2011-2016 Juan Pedro Bolivar Puente <raskolnikov@gnu.org>
;;
;; This file is part of Sinusoid.es.
;;
;; Sinusoid.es is free software: you can redistribute it and/or modify
;; it under the terms of the GNU Affero General Public License as
;; published by the Free Software Foundation, either version 3 of the
;; License, or (at your option) any later version.
;;
;; Sinusoid.es is distributed in the hope that it will be useful, but
;; WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
;; Affero General Public License for more details.
;;
;; You should have received a copy of the GNU Affero General Public
;; License along with Sinusoid.es.  If not, see
;; <http://www.gnu.org/licenses/>.

(ns sinusoides.util
  (:require [pl.danieljanus.tagsoup :as tagsoup]))

(defmacro dbg [x]
  `(let [x# ~x]
     (println '~x "=" x#)
     x#))

(defmacro embed-svg [svg-file]
  (let [hiccup (tagsoup/parse-string (slurp svg-file))]
    `~hiccup))

Add `dbg` macro, like `trace`, but better
Add `dbg` macro, like `trace`, but better

Credit:
  http://www.learningclojure.com/2010/09/clojure-macro-tutorial-part-i-getting.html

arximboldi/sinusoides,arximboldi/sinusoides,arximboldi/sinusoides