Fork me on GitHub
#docs
<
2018-01-11
>
martinklepsch10:01:58

can someone think of a project that makes exemplary use of codox (i.e. usage of doc/) and also tags releases on github?

genmeblog11:01:09

why tags are needed?

martinklepsch11:01:13

@tsulej I’m working on a tool that may utilise tags — unfortunately tagging releases doesn’t seem to be a very common thing 😕

martinklepsch11:01:39

(which I believe is unfortunate on it’s own, not just because I need it 🙂)

genmeblog19:01:21

I don't tag releases too... still working on snapshots. However I started to enhance my documentation with examples in metatags. Examples can be run during doc generation. I can also generate images from examples. Since in codox I can't run my code snippets all process looks like: metadata -> alter :doc tag from info (examples) in tags -> image generation -> codox

genmeblog19:01:01

whole examples part is generated from metadata

genmeblog19:01:31

(defn point
  "Draw point at `x`,`y` or `^Vec2` position.
  It's implemented as very short line. Consider using `(rect x y 1 1)` for speed when `x` and `y` are integers."
  {:examples [(ex/example-gen-image "Sequence of points."
                (doseq [x (range 10 159 10)] (point canvas x x)))
              (ex/example-gen-image "Magnified point can look differently when different stroke settings are used."
                (-> canvas
                    (scale 80.0)
                    (set-stroke 0.5)
                    (point 0.5 0.5)
                    (set-stroke 0.5 BasicStroke/CAP_SQUARE BasicStroke/JOIN_MITER)
                    (point 1.5 1.5)))]}
  ([canvas ^double x ^double y]
   (line canvas x y (+ x 10.0e-6) (+ y 10.0e-6))
   canvas)
  ([canvas ^Vec2 vec]
   (point canvas (.x vec) (.y vec))))

genmeblog19:01:20

it's just poc

martinklepsch20:01:30

@tsulej that’s interesting to see, thanks for sharing!