[Standards] XEP Dependencies

Sam Whited sam at samwhited.com
Thu Feb 8 22:21:19 UTC 2018

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:


It's fun to play with if nothing else. Maybe it will be useful to

Sam Whited
sam at samwhited.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.jabber.org/pipermail/standards/attachments/20180208/00e9dd5d/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xep-0163.svg.png
Type: image/png
Size: 197324 bytes
Desc: not available
URL: <http://mail.jabber.org/pipermail/standards/attachments/20180208/00e9dd5d/attachment-0001.png>

More information about the Standards mailing list