BOTCH-EXTRACT-SCC(1)

πŸ’… BOTCH-EXTRACT-SCC(1) β€” botch tools ✨

okay bestie, welcome to botch-extract-scc, a little tool from the botch toolbox that pulls every strongly connected component out of a graph and gives each one its own cute lil file πŸŽ€


✨ NAME ✨

botch-extract-scc β€” extract all strongly connected components πŸ¦‹


🌸 SYNOPSIS 🌸

botch-extract-scc [options] graph.xml [prefix]

πŸ’– DESCRIPTION πŸ’–

so basically, this extracts the strongly connected components (SCC) from an input graph. the graph can be in GraphML or dot format, and honestly? iconic of it.

Each strongly connected component gets stored as one file each, either right in the current directory or in the directory you tell it about with the --outdir option. you choose, queen πŸ‘‘

The file names that were generated for them get printed on standard output. so you'll literally see every file it made, no cap.

By default, that filename is of the format:

PREFIX_VERTEX_SIZE.EXT

where:

  • PREFIX β€” can be set on the command line (that's the [prefix] argument, bestie)
  • VERTEX β€” defaults to the vertex ID chosen by network
  • SIZE β€” the size of the SCC
  • EXT β€” is xml by default, but you can change it with the --extension option

The whole point of this naming scheme is to reduce the possibility that two output graph files happen to have the same name. smart, honestly. and if you want them even more unique, you can use the --outfnamevert and --outfnameattr options, which refine the string that will be printed for VERTEX. slay πŸ”₯


πŸŽ€ OPTIONS πŸŽ€

  • -h, --help β€” show help. bestie behavior fr fr πŸ™ˆ
  • --outdir=DIR β€” output directory. the default is the current directory.
  • --outfnamevert=VERT β€” this option picks the set of vertices from which the smallest one (by string comparison of the attribute determined by the --outfnameattr option) will be chosen to be stored in place of VERTEX in the output file name. the VERT argument is a key/value pair (separated by a colon) of a graph attribute and its value. by default (so, without this option), all vertices of the graph are considered.

The special key "__ID__" allows one to select the unique vertex identifier. πŸ’«

This option can be specified more than once. The final set of vertices is chosen such that all vertices match all key/value pairs. Multiple --outfnamevert options thus form a logical conjunction (they are AND-ed together). 🫢

  • --outfnameattr=attribute β€” this option picks the vertex attribute that is to be printed in VERTEX in the output file name.
  • --extension=EXT β€” output files have extension EXT. default is xml. this option also governs the output format! the xml extension saves in GraphML format, while the dot extension saves in the dot format. two jobs, one flag, she's versatile πŸ’…
  • -v, --verbose β€” be verbose. say more. spill the tea β˜•

🌈 EXAMPLE 🌈

Extract the strongly connected components of a buildgraph and store them in the directory "out", prefixing each filename with "cyclic", and let the VERTEX value be the cudfname field of source packages only.

botch-extract-scc --verbose --outdir=out --outfnameattr=cudfname --outfnamevert type:src buildgraph.xml cyclic

look at that command. she ate and left no crumbs πŸ‘‘


πŸ’€ BUGS πŸ’€

See <http://bugs.debian.org/botch>.

(yes bestie, bugs happen, go report them, it's giving community service ✨)


πŸ¦‹ SEE ALSO πŸ¦‹

Debian doc-base Manual /usr/share/doc/botch/wiki/Home.html


πŸ‘‘ AUTHOR πŸ‘‘

This man page was written by Johannes Schauer. Botch is written by Johannes Schauer and Pietro Abate.


Copyright 2012-2014 Johannes Schauer, Pietro Abate

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. A special linking exception to the GNU Lesser General Public License applies to this library, see the COPYING file for more information.


⚠️ real talk: that license text is legal, so it stays exactly as-is. no remixing the LGPL, bestie, that's not the vibe πŸ™ˆ

okay that's the whole page!! this was documented with perl v5.36.0 and dated 2023-02-17, and honestly? iconic energy. go extract some strongly connected components, bestie, you got this πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from