Skip to content

Commit

Permalink
Added animated gif examples
Browse files Browse the repository at this point in the history
  • Loading branch information
ESultanik committed Nov 28, 2018
1 parent 70796d1 commit d9d17ef
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 45 deletions.
48 changes: 3 additions & 45 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,52 +3,10 @@
A utility for finding the largest directories and/or files in a given
directory hierarchy. Biggest supports pretty printed and colorized
output to the terminal:
```
[38125] /tmp/biggest
├── [34522] LICENSE
├── [21514] .git/objects/pack/pack-d1412b54468648284c5681066c09b1ede986d24c.pack
├── [18848] .git/hooks
│ ├── [4898] pre-rebase.sample
│ ├── [3610] update.sample
│ ├── [3327] fsmonitor-watchman.sample
│ ├── [1642] pre-commit.sample
│ ├── [1492] prepare-commit-msg.sample
│ ├── [1348] pre-push.sample
│ ├── [896] commit-msg.sample
│ ├── [544] pre-receive.sample
│ ├── [478] applypatch-msg.sample
│ └── [424] pre-applypatch.sample
├── [13822] .git/objects/ba/e94e189e62df1b8d5bd11435d954b25bee9d7b
├── [13236] biggest
│ ├── [12444] __pycache__
│ │ ├── [6069] biggest.cpython-37.pyc
│ │ ├── [4118] heap.cpython-37.pyc
│ │ └── [2257] tree.cpython-37.pyc
│ ├── [6117] biggest.py
│ ├── [6069] __pycache__/biggest.cpython-37.pyc
│ ├── [4118] __pycache__/heap.cpython-37.pyc
│ ├── [3186] heap.py
│ ├── [2775] tree.py
│ ├── [2257] __pycache__/tree.cpython-37.pyc
│ ├── [1158] __main__.py
│ └── [0] __init__.py
├── [6954] .git/logs/HEAD
└── [6451] .git/gitk.cache
```
![Example of Biggest being run](docs/images/example.gif)

All pretty printing and ANSI color codes are printed to STDERR, while the actual file paths are printed to STDOUT. Therefore, suppressing STDERR output will only print the file paths with no ANSI escape sequences, pretty printing, or file sizes, which can be used for scripting:
```
$ biggest /tmp/biggest 2>/dev/null
/tmp/biggest/LICENSE
/tmp/biggest/.git/objects/pack/pack-d1412b54468648284c5681066c09b1ede986d24c.pack
/tmp/biggest/.git/hooks
/tmp/biggest/.git/objects/ba/e94e189e62df1b8d5bd11435d954b25bee9d7b
/tmp/biggest/biggest
/tmp/biggest/biggest/__pycache__
/tmp/biggest/biggest/__pycache__/biggest.cpython-37.pyc
/tmp/biggest/biggest/biggest.py
/tmp/biggest/.git/logs/HEAD
/tmp/biggest/.git/gitk.cache
```
![Use Biggest in scripts by suppressing STDERR](docs/images/raw.gif)

## Installation

Expand Down
Binary file added docs/images/example.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/raw.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d9d17ef

Please sign in to comment.