stevedlawrence commented on code in PR #1340:
URL: https://github.com/apache/daffodil/pull/1340#discussion_r1803248974
##########
build.sbt:
##########
@@ -481,6 +489,99 @@ lazy val unidocSettings =
(JavaUnidoc / unidoc / unidocAllSources).value.map(apiDocSourceFilter)
)
+lazy val genTunablesDocSettings = Seq(
+ Compile / genTunablesDoc := {
+ val dafExtFile =
+ (propgen / Compile / resources).value.filter(_.getName ==
"dafext.xsd").head
+ val outputDocFile = (Compile / target).value / "tunables.md"
+ // parse xsd file
+ val dafExtXml = scala.xml.XML.loadFile(dafExtFile)
+ // extract information
+ val tunablesSeq = (dafExtXml \ "element" \\ "element")
+ // build documentation
+ val sectionsSeq = tunablesSeq.flatMap { ele =>
+ val subtitle = ele \@ "name"
+ val documentation = (ele \ "annotation" \ "documentation").text
+ val sections =
+ if (documentation.nonEmpty &&
!documentation.trim.startsWith("Deprecated")) {
+ val s =
+ s"""
+ |#### $subtitle
+ |$documentation
Review Comment:
I noticed in the daffodil-site PR that $documentation includes indentation
from the dafext.xsd, which makes it show up as code. We probably want to strip
that off so it shows up as normal text.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]