Skip to main content

Visual treeview utility

Project description

Gimi9 Tree View

Improved version of the Linux tree utility.

Includes features useful for big data analysis and documentation.

Written for Python 3.12.3, works on Python 3.10 and above. It is expected to work on Python 3.2 and above.

Features

  • Tree structure output

  • Size: human-readable

  • File count

  • File list limit

  • Pretty diretory emoji ๐Ÿ“‚

  • Note: Automatically excludes hidden files.

Installation

$ pip install gimi9_tree_view

Usage

Print help

$ treeview -h

usage: treeview [-h] [-d] [-L LEVEL] [-n MAX_FILES] [-f] directory

List directory contents.

positional arguments:
  directory             Directory to read

options:
  -h, --help            show this help message and exit
  -d                    List directories only
  -L LEVEL, --level LEVEL
                        Descend only level directories deep
  -n MAX_FILES, --max-files MAX_FILES
                        Print only N files in each directory
  -f, --files-first     Print files before directories

github: https://github.com/gisman/tree-view

Default

Full depth directory listing, 4 files per directory by default.

$ treeview gimi9_tree_view

 ๐Ÿ“‚ gimi9_tree_view                          [70MB, 9 Files]
    โ”œโ”€โ”€ ๐Ÿ“‚ build                             [12KB]
    โ”‚   โ”œโ”€โ”€ ๐Ÿ“‚ bdist.linux-x86_64            [0B]
    โ”‚   โ””โ”€โ”€ ๐Ÿ“‚ lib                           [12KB]
    โ”‚       โ””โ”€โ”€ ๐Ÿ“‚ gimi9_tree_view           [12KB, 3 Files]
    โ”‚           โ”œโ”€โ”€ ๐Ÿ“„ __init__.py           [0B]
    โ”‚           โ”œโ”€โ”€ ๐Ÿ“„ tree.py               [5KB]
    โ”‚           โ””โ”€โ”€ ๐Ÿ“„ treeview.py           [7KB]
    โ”œโ”€โ”€ ๐Ÿ“‚ dist                              [19KB, 2 Files]
    โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ gimi9_tree_view-0.5.3-py3-none-any.whl [10KB]
    โ”‚   โ””โ”€โ”€ ๐Ÿ“„ gimi9_tree_view-0.5.3.tar.gz  [8KB]
    โ”œโ”€โ”€ ๐Ÿ“‚ gimi9_tree_view                   [15KB, 2 Files]
    โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ __init__.py                   [0B]
    โ”‚   โ””โ”€โ”€ ๐Ÿ“„ treeview.py                   [7KB]
    โ”œโ”€โ”€ ๐Ÿ“‚ gimi9_tree_view.egg-info          [5KB, 6 Files]
    โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ PKG-INFO                      [4KB]
    โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ SOURCES.txt                   [318B]
    โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ dependency_links.txt          [1B]
    โ”‚   โ””โ”€โ”€ ๐Ÿ“„ entry_points.txt              [59B]
    โ”œโ”€โ”€ ๐Ÿ“‚ tests                             [4KB, 1 File]
    โ”‚   โ””โ”€โ”€ ๐Ÿ“„ test_treeview.py              [1KB]
    โ”œโ”€โ”€ ๐Ÿ“‚ tree_view.egg-info                [4KB, 5 Files]
    โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ PKG-INFO                      [4KB]
    โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ SOURCES.txt                   [190B]
    โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ dependency_links.txt          [1B]
    โ”‚   โ””โ”€โ”€ ๐Ÿ“„ requires.txt                  [87B]
    โ”œโ”€โ”€ ๐Ÿ“„ CONTRIBUTING.md                   [2KB]
    โ”œโ”€โ”€ ๐Ÿ“„ LICENSE                           [11KB]
    โ”œโ”€โ”€ ๐Ÿ“„ Main_slow_UNUSED.py               [5KB]
    โ””โ”€โ”€ ๐Ÿ“„ README.md                         [5KB]

List directories only

$ treeview -d gimi9_tree_view

 ๐Ÿ“‚ gimi9_tree_view                          [70MB, 9 Files]
    โ”œโ”€โ”€ ๐Ÿ“‚ build                             [12KB]
    โ”‚   โ”œโ”€โ”€ ๐Ÿ“‚ bdist.linux-x86_64            [0B]
    โ”‚   โ””โ”€โ”€ ๐Ÿ“‚ lib                           [12KB]
    โ”‚       โ””โ”€โ”€ ๐Ÿ“‚ gimi9_tree_view           [12KB, 3 Files]
    โ”œโ”€โ”€ ๐Ÿ“‚ dist                              [19KB, 2 Files]
    โ”œโ”€โ”€ ๐Ÿ“‚ gimi9_tree_view                   [15KB, 2 Files]
    โ”œโ”€โ”€ ๐Ÿ“‚ gimi9_tree_view.egg-info          [5KB, 6 Files]
    โ”œโ”€โ”€ ๐Ÿ“‚ tests                             [4KB, 1 File]
    โ””โ”€โ”€ ๐Ÿ“‚ tree_view.egg-info                [4KB, 5 Files]

Directory depth limit

Print directories only with the -d option and limit depth to 1 level

$ treeview -d -L 1 gimi9_tree_view

 ๐Ÿ“‚ gimi9_tree_view                          [70MB, 9 Files]
    โ”œโ”€โ”€ ๐Ÿ“‚ build                             [12KB]
    โ”œโ”€โ”€ ๐Ÿ“‚ dist                              [19KB, 2 Files]
    โ”œโ”€โ”€ ๐Ÿ“‚ gimi9_tree_view                   [15KB, 2 Files]
    โ”œโ”€โ”€ ๐Ÿ“‚ gimi9_tree_view.egg-info          [5KB, 6 Files]
    โ”œโ”€โ”€ ๐Ÿ“‚ tests                             [4KB, 1 File]
    โ””โ”€โ”€ ๐Ÿ“‚ tree_view.egg-info                [4KB, 5 Files]

File List limit

Print 2 files per directory. Specify -1 to print the entire file list.

$ treeview -n 2 gimi9_tree_view

 ๐Ÿ“‚ gimi9_tree_view                          [70MB, 9 Files]
    โ”œโ”€โ”€ ๐Ÿ“‚ build                             [12KB]
    โ”‚   โ”œโ”€โ”€ ๐Ÿ“‚ bdist.linux-x86_64            [0B]
    โ”‚   โ””โ”€โ”€ ๐Ÿ“‚ lib                           [12KB]
    โ”‚       โ””โ”€โ”€ ๐Ÿ“‚ gimi9_tree_view           [12KB, 3 Files]
    โ”‚           โ”œโ”€โ”€ ๐Ÿ“„ __init__.py           [0B]
    โ”‚           โ””โ”€โ”€ ๐Ÿ“„ tree.py               [5KB]
    โ”œโ”€โ”€ ๐Ÿ“‚ dist                              [19KB, 2 Files]
    โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ gimi9_tree_view-0.5.3-py3-none-any.whl [10KB]
    โ”‚   โ””โ”€โ”€ ๐Ÿ“„ gimi9_tree_view-0.5.3.tar.gz  [8KB]
    โ”œโ”€โ”€ ๐Ÿ“‚ gimi9_tree_view                   [15KB, 2 Files]
    โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ __init__.py                   [0B]
    โ”‚   โ””โ”€โ”€ ๐Ÿ“„ treeview.py                   [7KB]
    โ”œโ”€โ”€ ๐Ÿ“‚ gimi9_tree_view.egg-info          [5KB, 6 Files]
    โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ PKG-INFO                      [4KB]
    โ”‚   โ””โ”€โ”€ ๐Ÿ“„ SOURCES.txt                   [318B]
    โ”œโ”€โ”€ ๐Ÿ“‚ tests                             [4KB, 1 File]
    โ”‚   โ””โ”€โ”€ ๐Ÿ“„ test_treeview.py              [1KB]
    โ”œโ”€โ”€ ๐Ÿ“‚ tree_view.egg-info                [4KB, 5 Files]
    โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ PKG-INFO                      [4KB]
    โ”‚   โ””โ”€โ”€ ๐Ÿ“„ SOURCES.txt                   [190B]
    โ”œโ”€โ”€ ๐Ÿ“„ CONTRIBUTING.md                   [2KB]
    โ””โ”€โ”€ ๐Ÿ“„ LICENSE                           [11KB]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gimi9_tree_view-0.6.0.tar.gz (9.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gimi9_tree_view-0.6.0-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file gimi9_tree_view-0.6.0.tar.gz.

File metadata

  • Download URL: gimi9_tree_view-0.6.0.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.3

File hashes

Hashes for gimi9_tree_view-0.6.0.tar.gz
Algorithm Hash digest
SHA256 a10367cab07917fb6c20ab6dd4fd70f33d02d0e468e9282632fb78aaf32d63d0
MD5 f5827839f6b825c2afd0382de79fdb01
BLAKE2b-256 dbd76c81f5c93bb9df5644151ba4602d59120c18f119e0c37f79b53373f3bfc0

See more details on using hashes here.

File details

Details for the file gimi9_tree_view-0.6.0-py3-none-any.whl.

File metadata

File hashes

Hashes for gimi9_tree_view-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a0cde1ea500112f74279f5e31531f91fc6a93b7bd0910adddbb95abf538d6bb6
MD5 c0c5a1b2682ca2962a868b661b24fe8f
BLAKE2b-256 1e3e38561d2c6f2ce880721f006c29ceec8fa53c5b8fbd5ff2d31e2a658cf7a2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page