On 8 Feb 2018, at 22:21, Sam Whited <s...@samwhited.com> wrote:
> 
> After the email earlier about XEP dependencies I added a quick command to my 
> XEP tool (https://bitbucket.org/mellium/xep/src) that would parse 
> dependencies out of XEPs recursively and print them, optionally applying a 
> template.
> 
> While exploring the dependencies of several XEPs I decided it might be nifty 
> to visualize them and added a (slighly confusing) rule to the xeps repo 
> makefile to do just that:
> 
> xep-%.svg: xep-%.xml
> (   echo "digraph G {"; \
> xep list -f '{{range .XEP}}{{printf ` "XEP-%04d" -> %q;\n` $$.Number 
> .}}{{end}}' \
> $$(xep list -f '{{range .Deps}}{{lower . | printf "%s.xml "}}{{end}}' $<) $<; 
> \
> xep list -f '{{range .Other}}{{printf ` "XEP-%04d" -> %q;\n` $$.Number 
> .}}{{end}}' \
> $$(xep list -f '{{range .Deps}}{{lower . | printf "%s.xml "}}{{end}}' $<) $<; 
> \
> echo "}"; \
> ) | dot -Tsvg -o $@
> 
> The TL;DR is that when my xep tool is installed the rule above spits out a 
> dependency tree for any xep, eg. make xep-0163.svg produces:
> 
> 
> <xep-0163.svg.png>
> (https://imgur.com/a/FNLt5)
> 
> 
> It's fun to play with if nothing else. Maybe it will be useful to someone?

Thanks Sam. I think that might be interesting enough to include in the HTML 
rendering of the XEPs (probably inside a css-hidden element), or linked to, or 
something? I don’t know. I suppose the one for some things might look large 
enough to be offputting :)

/K
_______________________________________________
Standards mailing list
Info: https://mail.jabber.org/mailman/listinfo/standards
Unsubscribe: standards-unsubscr...@xmpp.org
_______________________________________________

Reply via email to