Pkg.add("Hiccup")
Hiccup.jl is a super-simple library designed to make making HTML easy in Julia. It's heavily inspired by Clojure's Hiccup DSL.
julia> using Hiccup
julia> Hiccup.div("#foo.bar", "hi")
HTML nodes are stored as the Node{T}
type which renders itself smartly.
julia> Node(:img, "#id.class1.class2", Dict(:src=>"http://www.com"))
julia> tag(ans)
:img
A bunch of utility functions, with the names of tags, are provided which make this a bit more legible. You can import more with @tags
:
julia> @tags img, svg
julia> svg("#id.class1.class2", Dict(:src=>"http://www.com"))
And that's basically it.
03/18/2015
8 months ago
57 commits