Re: [netmod] looking for practical advice on managing YANG source in XML format RFCs

2021-06-14 Thread Ladislav Lhotka
Hi Michael,

you can check my project YANG-I-D [1] for some ideas.

The most elegant way of including YANG modules in RFCs would be to treat the 
RFC source as a compound XML document combining xml2rfc with YANG modules in 
the YIN syntax - if only xml2rfc could process it.

Lada

[1] https://github.com/llhotka/YANG-I-D

Michael Richardson  writes:

> Hi, I'm not a regular netmod reader.
> I subscribe via IMAP to look into what's going on.  If I'm asking a FAQ, I
> appologize as I didn't find anything in the 25K messages archived.
> I saw Christian's message in 2019 about org-rfc-export.
> I'm not sure if I should Reply-To: tools or netmod.
>
> I'm looking for advice on how to manage things.
> A summary of my questions:
>
> 1) how to process yang files with -DD-MM into XML.
> 2) how to generate yang tree files.
> 3) how do I get my YANG includes downloaded, and do I put them into my repo?
> 4) how to do this with MT Makefiles?
>
> When we were working on RFC8995 and RFC8366, in the days before Martin
> Thompson's makefile was around, I just put pyang processing into my simple
> Makefile.  It's here:  
> https://github.com/anima-wg/anima-bootstrap/blob/master/Makefile
>
> The perl script at: 
> https://github.com/anima-wg/anima-bootstrap/blob/master/insert-figures
> was then developed to insert stuff into the XML.  It's rather hacky in some 
> ways.
> It started it's life as just something to find the latest @-MM-DD yang
> file which the Makefile created. (Kent wrote that sed line three quarters of
> a decade ago, and the sed line now is old enough to trick-or-treat)
> Over time, it grew the ability to insert other bits of code or diagrams.
> I keep using it, even when I've moved to Markdown because it inserts the
> right artwork stuff, and knows to deal with YANG stuff.  I also keep using my
> Makefile, because except for the simplest uses, the MT ones are too
> complicated for me to hack.
>
> With kramdown source, I can mostly just add stuff to the MT Makefile to
> generate the files I need, and then mostly (without insert-figures), I can
> use the ::include mechanism in kramdown to get the right things.  But, no
> magic -MM-DD stuff.
>
> So now I am collaborating with some co-authors which want to stick to XMLv3
> rather than kramdown, and whose understanding of Makefiles is poor.  I want
> to stick with the normal stuff so that all the github/etc. tooling works for
> everyone involved.
>
> I'm looking for advice on how do this this?
>
> --
> Michael Richardson. o O ( IPv6 IøT consulting )
>Sandelman Software Works Inc, Ottawa and Worldwide
>
>
>
>
> ___
> netmod mailing list
> netmod@ietf.org
> https://www.ietf.org/mailman/listinfo/netmod

-- 
Ladislav Lhotka
Head, CZ.NIC Labs
PGP Key ID: 0xB8F92B08A9F76C67

___
netmod mailing list
netmod@ietf.org
https://www.ietf.org/mailman/listinfo/netmod


[netmod] looking for practical advice on managing YANG source in XML format RFCs

2021-06-13 Thread Michael Richardson

Hi, I'm not a regular netmod reader.
I subscribe via IMAP to look into what's going on.  If I'm asking a FAQ, I
appologize as I didn't find anything in the 25K messages archived.
I saw Christian's message in 2019 about org-rfc-export.
I'm not sure if I should Reply-To: tools or netmod.

I'm looking for advice on how to manage things.
A summary of my questions:

1) how to process yang files with -DD-MM into XML.
2) how to generate yang tree files.
3) how do I get my YANG includes downloaded, and do I put them into my repo?
4) how to do this with MT Makefiles?

When we were working on RFC8995 and RFC8366, in the days before Martin
Thompson's makefile was around, I just put pyang processing into my simple
Makefile.  It's here:  
https://github.com/anima-wg/anima-bootstrap/blob/master/Makefile

The perl script at: 
https://github.com/anima-wg/anima-bootstrap/blob/master/insert-figures
was then developed to insert stuff into the XML.  It's rather hacky in some 
ways.
It started it's life as just something to find the latest @-MM-DD yang
file which the Makefile created. (Kent wrote that sed line three quarters of
a decade ago, and the sed line now is old enough to trick-or-treat)
Over time, it grew the ability to insert other bits of code or diagrams.
I keep using it, even when I've moved to Markdown because it inserts the
right artwork stuff, and knows to deal with YANG stuff.  I also keep using my
Makefile, because except for the simplest uses, the MT ones are too
complicated for me to hack.

With kramdown source, I can mostly just add stuff to the MT Makefile to
generate the files I need, and then mostly (without insert-figures), I can
use the ::include mechanism in kramdown to get the right things.  But, no
magic -MM-DD stuff.

So now I am collaborating with some co-authors which want to stick to XMLv3
rather than kramdown, and whose understanding of Makefiles is poor.  I want
to stick with the normal stuff so that all the github/etc. tooling works for
everyone involved.

I'm looking for advice on how do this this?

--
Michael Richardson. o O ( IPv6 IøT consulting )
   Sandelman Software Works Inc, Ottawa and Worldwide






signature.asc
Description: PGP signature
___
netmod mailing list
netmod@ietf.org
https://www.ietf.org/mailman/listinfo/netmod