 (ns r6p3.core
-
   (:use clojure.pprint)
-
-
   (:import [org.imgscalr Scalr])
-
   (:require [clojure.data :as clojure-data]
             [korma.db :as kdb]
             [korma.core :as kc]


            [cemerick.friend :as friend]
            (cemerick.friend [workflows :as workflows]
                             [credentials :as creds])
            )
  )


(declare print-debug->>>)

                          (.setOmitComments true)))


(defn html-clean-tags
  "clean and replace string of html spec tags"
  [s]
  (when s
    (reduce

     (fn [s [m rs]]
       (clojure.string/replace s m rs))
     
     (-> (org.htmlcleaner.HtmlCleaner. html-cleaner-props)
         (.clean s)
         .getText
         str)

     (list [#"&nbsp;", " "]
           [#"&pound;", "£"]
           [#"&euro;", "€"]
           [#"&para;", "¶"]
           [#"&sect;", "§"]
           [#"&copy;", "©"]
           [#"&reg;", "®"]
           [#"&trade;", "™"]
           [#"&deg;", "°"]
           [#"&plusmn;", "±"]
           [#"&times;", "×"]
           [#"&divide;", "÷"]
           [#"&fnof;", "ƒ"]
           [#"&quot;", "\""]
           [#"&amp;", "&"]
           [#"&lt;", "<"]
           [#"&gt;", ">"]
           [#"&hellip;", "…"]
           [#"&prime;", "′"]
           [#"&Prime;", "″"]
           [#"&ndash;", "–"]
           [#"&mdash;", "—"]
           [#"&lsquo;", "‘"]
           [#"&rsquo;", "’"]
           [#"&sbquo;", "‚"]
           [#"&ldquo;", "“"]
           [#"&rdquo;", "”"]
           [#"&bdquo;", "„"]
           [#"&laquo;", "«"]
           [#"&raquo;", "»"]))))


;; END html to text tools
