Skip to content

Instantly share code, notes, and snippets.

View steveroush's full-sized avatar

steveroush

  • nope
  • colorado, usa
View GitHub Profile
@steveroush
steveroush / unix.gv
Created July 24, 2024 20:27
testing
// SOURCE: Graphviz Source ./tests/graphs/unix.gv
/* courtesy Ian Darwin and Geoff Collyer, Softquad Inc. */
digraph unix {
size="6,6";
"5th Edition" -> "6th Edition";
"5th Edition" -> "PWB 1.0";
"6th Edition" -> "LSX";
"6th Edition" -> "1 BSD";
"6th Edition" -> "Mini Unix";
"6th Edition" -> "Wollongong";
@steveroush
steveroush / junk.md
Last active July 24, 2024 20:13
magic marker

look at me

again

oh yes

  1. one thing
  2. another
  3. the last
  • pow
@steveroush
steveroush / gist:0e1a541f79135f368d042bee13bc2601
Created July 16, 2024 00:16
Transforming a Graphviz graph to 3 swimlanes
The video is in the 1st comment
@steveroush
steveroush / swimlane.gvpr
Last active July 17, 2024 21:38
a GVPR program that adds a swimlane feature to Graphviz (dot)
/*************************************************************************
swimlanes
- for more info on swim lanes: https://en.wikipedia.org/wiki/Swim_lane
- new attributes, all at the parent cluster-level:
- swimlanePool=true/false/[0-9]+ - turns on swimlane algorithm
- if having nested swimlanes is desirable, true/false is
insufficient. Instead, use swimlane=someuniquename
- swimlaneequalSize=true/false all lanes given same width, or width determined "naturally" by dot
@steveroush
steveroush / swapTailHead.gvpr
Created May 31, 2024 19:32
Graphviz - a program to swap head & tail of edges
/****************************************************************
swapHeadTail.gvpr - swap tail & head of edge(s)
(only seems to have "real" effect when using dot)
replaces edges with tail & head swapped
and (unless using -a0 option) "fixes" all the attribures that are associated with head or tail
to swap ALL edges, either add
- edge [swap=1] to your myFile.gv, then
@steveroush
steveroush / gvlint.gvpr
Last active June 1, 2024 00:44
gvlint - a "lint" program for Graphviz files
/********************************************************************
gvlint.gvpr - lint program for Graphviz input
USAGE:
gvpr -f gvlint.gvpr # just produces a "report" (assumes dot)
gvpr -cf gvlint.gvpr # report & reformatted input
gvpr -a neato -f gvlint.gvpr # report assuming neato attributes
gvpr -a S -f gvlint.gvpr myfile.gv # skip "pos not defined ..."
gvpr -a "neato A" -f gvlint.gvpr # report assuming neato attributes
# and show all attributes used
@steveroush
steveroush / gvstats.gvpr
Created February 17, 2024 02:10
A GVPR program that reports information about Graphviz files
BEGIN{
int clusterCnt, cHtmlCnt;
graph_t aGraph;
string printBuf;
//////////////// help /////////////////////////////////////////////
string help="
gvstats.gvpr :
a GVPR program that provides information about Graphviz input files
- the file name
- the layout engine (if set)
@steveroush
steveroush / fixOrtho.gvpr
Last active June 19, 2024 05:42
Graphviz: fixOrtho - a work-around to allow ortho edges to connect to ports
/*
neato complains about overlapping nodes, kicks out warning message (see below),
and uses splines=false.
"Warning: the bounding boxes of some nodes touch - falling back to straight
line edges"
dot bug work-around:
- check each edge
@steveroush
steveroush / alter_archive.sh
Last active November 18, 2023 03:08
Graphviz post-processor to customize edges
#!/bin/sh
cat <<QUitquIT
# This is a shell archive.
#
# to execute this file, type: sh alter_archive.sh
#
# On Linux/UNIX/MacOS(?) systems it is an executable program that will create
# a subdirectory (named alter.d) in the currect directory and then
# install multiple (text) files in that directory.
# This shell archive and all contents are humanly readable - no binary files.
@steveroush
steveroush / socioGram.d_archive.sh
Created July 21, 2023 01:50
a radial sociogram shell archive - 3 sociogram creators
#!/bin/sh
cat <<QUitquIT
# This is a shell archive.
#
# to execute this file, type: sh socioGram.d_archive.sh
#
# On Linux/UNIX/MacOS(?) systems it is an executable program that will create
# a subdirectory (named socioGram.d) in the currect directory and then
# install multiple (text) files in that directory.
# This shell archive and all contents are humanly readable - no binary files.