membrane-term

phronmophobic 2021-12-01T00:00:22.163900Z

ok, just pushed com.phronemophobic/vt and pushed an update to membrane.term. I might as well go ahead and push membrane.term to clojars as well. I think we decided to hold off on version 1.0 for now, so maybe start with 0.9.0?

phronmophobic 2021-12-01T01:27:19.164300Z

ok, membrane.term is now on clojars, https://clojars.org/com.phronemophobic/membrane.term

🎉 1
lread 2021-12-01T17:54:09.171200Z

Heya @smith.adriane do you prefer GitHub markdown over AsciiDoc? I’ve developed a preference for adoc and am wondering if a convert to that format would work for you for membrane.term? If not that’s fine too. Why do I ask for membrane.term? Other than it being my personal preference, I like that: • it generates a table of contents • it includes user attributes (replacement variables), this can make things like updates for release easier • and it might make reusing some code I have for changelog updating-on-release easier

phronmophobic 2021-12-01T17:59:06.172600Z

I do prefer github markdown over asciidoc, but that's only because I don't know AsciiDoc. I'm not opposed to checking out alternatives. Let me read up on asciidoc and see what it's like!

lread 2021-12-01T18:49:03.173800Z

It’s really not important. But… if it satisfies a curiosity, by all means! I am guessing that you will like it.

phronmophobic 2021-12-01T18:55:25.174500Z

how does the substitution work? do you have a source file and an output file? what's the format for the output file?

lread 2021-12-01T19:02:28.177300Z

It happens at render time. https://raw.githubusercontent.com/lread/test-doc-blocks/main/doc/01-user-guide.adoc. At the top I have the doc title, some adoc attributes, and then user attributes :clojure-version: and :lib-version:

= User Guide
:toclevels: 5
:toc:
:clojure-version: 1.10.3
// NOTE: lib-version is automatically updated by release workflow
:lib-version: 1.0.166-alpha
Then later in the doc I can use those attributes, for example:
[source,clojure,subs="attributes+"]
----
  :gen-doc-tests {:replace-deps {org.clojure/clojure {:mvn/version "{clojure-version}"}
                                 com.github.lread/test-doc-blocks {:mvn/version "{lib-version}"}}
                  ;; for -X syntax support specify exec-fn
                  :exec-fn lread.test-doc-blocks/gen-tests
                  ;; for -M syntax support specify main-opts
                  :main-opts ["-m" "lread.test-doc-blocks" "gen-tests"]}
----

lread 2021-12-01T19:03:48.178500Z

I have a release workflow that updates :lib-version: within this file (and commits that change) when I do a release.

phronmophobic 2021-12-01T19:04:04.178700Z

ah. ok, and github supports rendering like this?

phronmophobic 2021-12-01T19:04:39.179600Z

or is there another step [to view the substituted version on github]?

lread 2021-12-01T19:09:14.183900Z

the only way to not view substituted is to view raw version

lread 2021-12-01T19:05:06.180100Z

GitHub replaces attributes at render time.

👍 1
lread 2021-12-01T19:06:01.181300Z

Cljdoc does this too.

lread 2021-12-01T19:07:44.183100Z

The only thing I don’t really like about GitHub treatment of adoc is that it does not honor the richness of adoc. It converts all elements but does not beautifully style all elements. Nothing is broken. Just stuff looks a bit rough sometimes.

lread 2021-12-01T19:08:21.183600Z

No worse that CommonMark styling really, but adoc has a much richer set of elements.

lread 2021-12-01T19:11:04.184400Z

Got a fresh snowfall here. Gonna go for a walk and enjoy it! Later!

👍 1
❄️ 1
lread 2021-12-01T19:14:03.185900Z

Before I trod off: cljdoc does a bit of a better job at adoc styling, but I feel it should do more and I will eventually get back to working on that. FWIW, https://cljdoc.org/d/lread/cljdoc-exerciser/1.0.57/doc/document-tests/asciidoctor-features.