SDML(1)

πŸ“¦
version 0.3.2+20250310 Β· 3 versions
, in ubuntu resolute, ubuntu stonking

okay so bestie πŸ’– you just opened SDML(1) β€” that's section 1 of the User Commands manual β€” and this whole page is about sdml deps, aka the subcommand that spills the entire tea on what a module imports. no cap, it's giving detective energy πŸ•΅οΈβ™€οΈβœ¨


πŸŽ€ NAME πŸŽ€

sdml deps β€” Show a module's imported dependencies. that's it, that's the whole assignment πŸ’…

🌈 SYNOPSIS 🌈

sdml deps [OPTIONS] [MODULE]

πŸ‘‘ DESCRIPTION πŸ‘‘

okay so, sdml deps shows a module's imported dependencies πŸ’–

what it's actually doing: it generates a representation of the transitive closure of dependencies for a given module. like, not just your module's bestie β€” everybody downstream too, fr fr πŸ”₯

you get three flavours:

  • Tree (the default, obviously ✨) β€” shows the dependencies as a text tree, with the original module as the root, main character energy only.
$ sdml deps sdml
sdml
????????? owl ???   ????????? rdf ???   ???   ????????? rdfs ???   ???       ????????? rdf ???   ????????? rdfs ???   ????????? xsd ???       ????????? rdf ???       ????????? rdfs ????????? rdf ????????? rdfs ????????? skos ???   ????????? rdf ???   ????????? rdfs ?????????  xsd
ngl, the box-drawing glyphs in that example got their whole life eaten by an encoding situation in the source page 😭 every module name is still in there though β€” owl, rdf, rdfs, skos, xsd β€” so you can absolutely clock the shape: your module at the root, its imports branching out underneath.
  • Graph β€” creates an SVG representation of the dependency graph using GraphViz 🎨
$ sdml deps --output-format graph -o sdml-deps.svg sdml
$ open -a Safari sdml-deps.svg
  • RDF β€” creates a set of RDF statements, as N-Triples, that represent the individual OWL import relationships πŸ¦‹
$ sdml deps --depth 1 --output-format rdf sdml
<http://sdml.io/sdml-owl.ttl#> <http://www.w3.org/2002/07/owl#imports> <http://www.w3.org/2002/07/owl#> .
<http://sdml.io/sdml-owl.ttl#> <http://www.w3.org/2002/07/owl#imports> <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
<http://sdml.io/sdml-owl.ttl#> <http://www.w3.org/2002/07/owl#imports> <http://www.w3.org/2000/01/rdf-schema#> .
<http://sdml.io/sdml-owl.ttl#> <http://www.w3.org/2002/07/owl#imports> <http://www.w3.org/2004/02/skos/core#> .
<http://sdml.io/sdml-owl.ttl#> <http://www.w3.org/2002/07/owl#imports> <http://www.w3.org/2001/XMLSchema#> .

and sometimes you truly do not need the entire set, and that's so valid πŸ™ˆ β€” in that case you can add the --depth argument to only show a number of levels of import from the root. the depth argument tells the command to stop after that many dependencies away from the original module. setting depth to 1 will only show the direct dependencies of the original. iconic behaviour, honestly.

$ sdml deps --depth 1 sdml
sdml
????????? owl
????????? rdf
????????? rdfs
????????? skos
????????? xsd

(same deal as above β€” those ????????? are the tree-drawing chars that did not survive the encoding πŸ’€ the five direct imports are all right there though.)

🌸 Arguments 🌸

  • [MODULE] β€” an SDML module, loaded using the standard resolver. yes bestie, the normal one, no special tricks 🫢

✨ OPTIONS ✨

  • -f, --output-format <OUTPUT_FORMAT> β€” pick your format, bestie. possible values:
    • graph: GraphViz DOT format
    • rdf: As RDF/OWL import triples
    • tree: A hierarchical tree format

[default: tree] β€” because tree is the moment πŸ’…

  • -d, --depth <DEPTH> β€” depth to traverse imports, 0 implies all of them. [default: 0]
  • -o, --output <OUTPUT> β€” file name to write to, or - to write to stdout. [default: -]
  • -i, --input <INPUT> β€” input SDML file name to read from, or - to read from stdin. [default: -]
  • -h, --help β€” Print help (see a summary with -h). the shorter -h gives you the quick version, iykyk πŸŽ€
  • -V, --version β€” Print version. gotta know what you're running, periodt πŸ”₯

that's the whole page, bestie, and you ate it 🫢 this was sdml deps version 0.3.2+20250310, dated October 2025, living its best life as page SDML(1) in the User Commands manual. go forth and map some dependencies πŸ’œπŸŒˆβœ¨

πŸ“¦ where this page comes from