clj -X:goldlyb
. Open Browser on Port 8000->scratchpad
sends the vizualisation to the browser.demo/goldly-reval.edn
:goldlyb
{:extra-paths ["demo" "test"] ; to show static files (not auto generated ones)
:extra-deps {org.pinkgorilla/goldly-bundel {:mvn/version "0.3.45"
:exclusions [org.pinkgorilla/ui-site]}
org.pinkgorilla/ui-site {:mvn/version "0.0.12"}}
:exec-fn goldly-server.app/goldly-server-run!
:exec-args {:profile "jetty"
:config "demo/goldly-reval.edn"}}
(reval.config/set-config!
{:storage-root "demo/rdocument/"
:url-root "/api/rdocument/file/"})
By default storage root is "/tmp/rdocument/".
Example
Lets evaluate two namespaces:
(eval-notebook "demo.notebook.apple)
(eval-notebook "demo.notebook.banana)
Now say demo.notebook.banana includes a BufferedImage, then upon then the reproduceable document folder will look like this
rdocument/demo/notebook/apple/notebook.edn
rdocument/demo/notebook/banana/notebook.edn
rdocument/demo/notebook/banana/67770344-1424-4803-a9aa-01e21cb4ce39.png
clj -M:test
If some of the types cannot be found do rm .cpcache -r
. Multimethods and
protocols sometimes are a little tricky.
cljc: (defn notebook [nb] ; nb format to hiccup )
cljs: (defn show-hiccup [h] ; shows hiccup in browser. ; do pinkie tag replacement. ; input: [:vega vega-spec] ; output: [vega-fn vega-spec] )
(defn notebook-page [] ; get lists of notebooks
; show notebook ; -> get-edn (rdoc/link ns "notebook")
)
(defn calculate-notebook [nb-ns] (-> nbns
)
) clj-ns -> [get-ns-forms-as-src] (seq src) -> [eval-src] (seq of eval-result)
s
demo.apple.nb.clj => is this clojure ns a notebook? => should this namespace be shown in a notebook list?
WE HAVE:
(defn demo-notebooks [] (-> all namespaces (filter (str/starts-with "demo.")))
(defn user-notebooks [] (-> all namespaces (filter (str/starts-with "test-notebook.")))
(defn my-collection [] ["demo.apple"] )
(:p/notebook)
fn => pinkie-hiccup => atom => lister => websocket => browser.
fn => pinkie-hiccup
SRC-CODE OUT ERR
(ns algo.demo)
(defn show-correlation-table []
)
[:div [:h1 "correlation table"] (algo.correlation/table ["MSFT" "GOOG" "AAPL"]) (code algo.demo/show-correlation-table) (with-code ) ]
[:p/code ]
]
von goldly: rewrite, explore picasso: kernel, nb executor trateg: persist.
Can you improve this documentation?Edit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close