Visitors ======== The 'visitors' tool, at http://www.hping.org/visitors/ can be used to process web logs and provide a great analysis of the paths that are commonly used to access a site. The descriptions of the paths are generated in graphviz format, for use with 'dot'. I found that these weren't always appropriate for the site, so I made some modifications. Initially I used sed: sed -i s/rankdir=LR/rankdir=TB/ $OUTDIR/visitors.dot Changes the ordering to be vertical, rather than horizontal. This looks better for sites which are linear, rather than all stemming from a root node. sed -i 's!\("/riscos[^ ]*"\)\( \[.*\)!\1\2\n\1 [color="#ffddff"]!' \ $OUTDIR/visitors.dot Make all the nodes in the '/riscos' section of the site a pink, rather than the default blue. This makes it easier to locate different parts of the site. sed -i 's!\("/riscos/ramble/\([^ ]*\)"\)\( \[.*\)!\1\3\n\1 [color="#ffddff" label="\2"]!' \ $OUTDIR/visitors.dot Make all the nodes in the '/risos/ramble/' section of the site coloured pink, and change their text to only use the tail of the path. This reduces the amount of space used by those parts of the site. However, these replacements became a little unwieldy as more were added, and I wanted more control over the graphs. widen-lines.pl Performs any of the above operations, and also allows you to make the lines thicker based on how common the paths are. This makes the common paths thicken up, and so look much clearer in the graph. Additionally it is possible to use the 'weighted' option for graphviz, which forces the higher weights (the common lines) to be more linear than the other lines. This can force a complex graph to have simpler lines. original.{png,dot} processed.{png,dot} An graph produced by visitors, and its associated PNG generated from the graph file by 'dot', and the same graph after processing by the widen-lines.pl script. Specifically the following command: ./widen-lines.pl -toptobottom \ -colour /riscos/=#ffddff \ -label '/riscos/ramble/(.*)=$1' \ -i visitors.dot -- Justin Fletcher