Skip to content

Commit

Permalink
Updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
soxofaan committed Jan 5, 2018
1 parent cc69c23 commit 9f66ad8
Showing 1 changed file with 31 additions and 20 deletions.
51 changes: 31 additions & 20 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
What is duviz?
--------------

``duviz.py`` is a simple command line utility written in Python to visualize disk space usage.
``duviz`` is a simple command line utility written in Python to visualize disk space usage.

It's like the plethora of desktop applications and widgets
(e.g. Filelight, DaisyDisk, WinDirStat, JDiskReport, TreeSize, SpaceSniffer, ...),
but instead of a fancy GUI with animated pie charts and shaded boxes
you get a funky "ASCII art style hierarchical tree of bars".
If that didn't make a lot of sense to you, look at this example of my ``/opt`` folder::
If that didn't make a lot of sense to you, look at this example of this ``/opt`` folder::

$ duviz.py /opt
$ duviz /opt
________________________________________________________________________________
[ /opt ]
[____________________________________3.30GB____________________________________]
Expand All @@ -30,36 +30,47 @@ If that didn't make a lot of sense to you, look at this example of my ``/opt`` f

Instead of size in bytes, you can also get inode usage: just use the option ``-i``.

How does it work?
-----------------

The script ``duviz.py`` dispatches the heavy work to the UNIX utility ``du`` to gather disk space statistics,
parses its output and renders this information in an easily understandable ASCII-art image.

For inode counting a recursive ``ls -i`` is used instead of ``du``.

Installation
------------

Dependencies
``duviz.py`` is designed to run on UNIX platforms (like Linux and OS X),
where its dependencies (a Python 2.x or 3.x interpreter and the ``du`` utility)
are typically available out of the box, so nothing to do on this front. Yay.
On Windows you'll be sad probably.
``duviz`` is designed to run on Unix platforms (like Linux and OS X).
It just requires the ``du`` command line utility to collect disk usage information (and ``ls`` for file counting).
Apart from that it doesn't require anything outside of the Python standard library.
These things are typically available out of the box on a standard Unix-like system.

Run it
``duviz.py`` is a standalone script, you can store it and run it from where ever you want.

Installation
To have it easily at your service (without having to remember the script's full path):
copy or symlink the script to a folder in your ``$PATH``.
If you don't know what this means, ask a UNIX guru near you.
``duviz`` can be installed through ``pip`` (e.g. in a virtual env)::

pip install duviz

which will install the ``duviz`` utility to the corresponding ``bin`` folder.

Without installation
The file ``duviz.py`` is also intended to be usable as a standalone Python script,
without having to install it.
Download ``duviz.py`` to some location of your liking and run it::

python path/to/duviz.py



Usage
-----

If you run ``duviz.py`` without arguments, it will render the disk usage of the current working folder.
If you run ``duviz`` without arguments, it will render the disk usage of the current working folder.

If you specify one or more directories, it will render the usage of those directories, how intuitive is that!

Run it with option ``--help`` for more options.


How does it work?
-----------------

``duviz`` dispatches the heavy work to the UNIX utility ``du`` to gather disk space statistics,
parses its output and renders this information in an easily understandable ASCII-art image.

For inode counting a recursive ``ls -i`` is used instead of ``du``.

0 comments on commit 9f66ad8

Please sign in to comment.