• Stars
    star
    311
  • Rank 134,521 (Top 3 %)
  • Language
    C
  • License
    BSD 3-Clause "New...
  • Created over 10 years ago
  • Updated almost 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Streaming bar graphs. For stats and stuff.

STAG

Stag Progress

DESCRIPTION

Stag generates a streaming bar graph inside the terminal from the data (newline separated floats) passed through stdin.

SYNOPSIS

stag [-t TITLE] [-m MARGIN] [-s SCALE_MODE] [-w BAR_WIDTH] [-y Y_SPLITS]

OPTIONS

   -t, --title=TITLE
          Set the title displayed above the graph.

   -m, --margin=T,R,B,L
          Set the margin around the edge of the graph, defined as a comma 
          delimited list of 4 integers: top,right,bottom,left.

   -s, --scale=SCALE_MODE
          Choose how to scale the y-axis of the graph.
          dynamic: update the max using the values currently on the graph
          global: update the max to be the global maximum of all data seen
          min,max: specify the max and min using two integers

   -w, --width=BAR_WIDTH
          Set the width of the bars.

   -y, --split=Y_SPLITS
          Set the number of intermediate y-axis ticks between the min and max.

For unicode support (8x better resolution on the graph using the bar characters) install from the unicode feature branch and then use -u.

EXAMPLES

Trivial example:

  echo -e "1\n2\n3" | ./stag

See examples/ directory for more.

AUTHOR

Seena Burns (nnkd)

Stag 1.0 August 26, 2014