项目作者: slerpyyy

项目描述 :
Command Line Data Visualizer
高级语言: C
项目地址: git://github.com/slerpyyy/vscope.git
创建时间: 2019-07-09T20:27:11Z
项目社区:https://github.com/slerpyyy/vscope

开源协议:

下载


vscope

Command Line Data Visualizer

vscope is a small data visualizer for safe and quick cassification of unknown datasets. It generates a 2D histogram, which is specific to the internal structure of the input data and displays it right inside the terminal.

Usage

  1. Usage: cat [FILE] | ./vscope [OPTION]...
  2. Visualizes STDIN by writing a 2D histogram to STDOUT.
  3. Useful for classifing unknown datasets.
  4. Options:
  5. -h, --help Shows this message and exits.
  6. -s, --size=NUM Changes the size of the heatmap. If this flag is not set,
  7. the map will be sized to fit the terminal window.
  8. -b, --bytes=NUM Only reads the first NUM bytes from STDIN.
  9. -c, --color Colors the heatmap using ANSI escape codes. This might
  10. not look as intendet, depending on your terminal.
  11. -g, --gray Enables a gray-scale version of --color. This flag
  12. cannot be set in combination with --color.
  13. -p, --picture Write pgm image data directly to STDOUT.
  14. -t, --thold=[NUM] Checks if the value is higher than the threshold and
  15. outputs either 00 or ff. If no NUM is defined, the
  16. threshold will be set to 0.

Example

This is what you get, when you feed the source code of the visualizer into the visualizer itself:

  1. $ cat vscope.c | ./vscope -s 32
  2. ----------------------------------------------------------------
  3. --ff----0f1a--48--------01----30--------------------------------
  4. ----------------------------------------------------------------
  5. ----------------------------------------------------------------
  6. --16----a5610b400106--035b404b17--------------------------------
  7. --01----522c1b010402031b481c3e08--------------------------------
  8. --------1e0a1214----0106------05--------------------------------
  9. --------36341014------011a0e0404--------------------------------
  10. --------060401--06040905----------------------------------------
  11. --------08----020d0c0906----------------------------------------
  12. --------0e01----02120e01----------------------------------------
  13. --------080c06020502060108131f02--------------------------------
  14. --1f----54290401--02--015a93ac23--------------------------------
  15. --22----352301010403042c92b47804--------------------------------
  16. --19----5527--08--0104019b906505--------------------------------
  17. --30----13--06--------0613210308--------------------------------
  18. ----------------------------------------------------------------
  19. ----------------------------------------------------------------
  20. ----------------------------------------------------------------
  21. ----------------------------------------------------------------
  22. ----------------------------------------------------------------
  23. ----------------------------------------------------------------
  24. ----------------------------------------------------------------
  25. ----------------------------------------------------------------
  26. ----------------------------------------------------------------
  27. ----------------------------------------------------------------
  28. ----------------------------------------------------------------
  29. ----------------------------------------------------------------
  30. ----------------------------------------------------------------
  31. ----------------------------------------------------------------
  32. ----------------------------------------------------------------
  33. ----------------------------------------------------------------

Build

I included a makefile, so this part shouldn’t be too difficult.

Compile the program:

  1. make

Install the program:

  1. make install

Extra Credit

This project is inspired by the works of Christopher Domas: https://github.com/xoreaxeaxeax