disk-treemap


Namedisk-treemap JSON
Version 1.0.10 PyPI version JSON
download
home_pagehttps://github.com/exzhawk/disk_treemap
SummaryJust another disk usage analyzer with treemap GUI.
upload_time2023-07-10 16:37:56
maintainer
docs_urlNone
authorEpix Zhang
requires_python>=3.6
licenseMIT
keywords
VCS
bugtrack_url
requirements flask tqdm flask-compress boto3
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # disk_treemap

Just another disk usage analyzer with treemap GUI.

## Pros

* Written in Python. Easy to run, modify and extend. Cross platform support. (Tested on Linux, Windows, and Android with
  Termux.)
* B/S structure. You can run the scanner on a remote machine, and view treemap via a browser on a local machine
* Support save/load a treemap. You can run the scanner on a machine, then copy result to another one and view it.
* Support S3 and S3 compatible object storage service
* Support using [*Everything by voidtools*](https://www.voidtools.com/) to speedup scanning extraordinarily.

## Cons

* The web base frontend may suffer from performance issue if the treemap is too large.

# Installation

## Install via pip package installer

```shell
pip install disk_treemap
```

## Build and install from source

**dependencies:**
* npm: `npm` must be in `PATH` to build static. Make sure NodeJS and npm is installed and in `PATH`.

```shell
# clone the repository
git clone 
git submodule update --recursive
# build static
python3 setup.py build_static

#build wheel
python3 setup.py bdist_wheel
#install built wheel 
pip install dist/disk_treemap-1.0.0-py3-none-any.whl # change the filename
```

# Usage

```
usage: disk-treemap [-h] [--size-tree-path SIZE_TREE_PATH] [--overwrite]
                    [--scan-only] [--host HOST] [--port PORT] [--compression]
                    [--endpoint-url ENDPOINT_URL] [--follow-links]
                    [--follow-mounts] [--everything]
                    [paths ...]

positional arguments:
  paths                 path(s) to scan. If multiple paths is provided, they
                        will be show in root side by side. S3 or compatible
                        object storage service is supported by a "s3://"
                        prefixed URI

optional arguments:
  -h, --help            show this help message and exit
  --size-tree-path SIZE_TREE_PATH, --size_tree_path SIZE_TREE_PATH, -f SIZE_TREE_PATH
                        path to save scan result as a JSON file
  --overwrite, -o       overwrite existed JSON file. default to False
  --scan-only, --scan_only, -s
                        scan and save JSON file but do not start web server.
                        default to False
  --host HOST, -H HOST  listening host of the web server
  --port PORT, -p PORT  listening port of the web server. default to 8000
  --compression, -c     enable compression of web server. require
                        flask_compress to operate. default to False
  --endpoint-url ENDPOINT_URL
                        custom endpoint url, only affects S3
  --follow-links, --follow_links
                        follow symlinks
  --follow-mounts, --follow_mounts
                        follow mounts
  --everything          use Everything by voidtools to speedup scanning. The
                        result will be absolute path. Everything must be
                        running and only x64 version is supported.
```

You may also use the module directly: `python -m disk_treemap.main`. Same arguments apply.

A `size_tree.json` will be generated in the current directory. It contains file tree and file size information. Keep it
safe!

# Typical Usage

**Analyze an ordinary computer**

1. Run `disk-treemap <Paths to analyze>`
   
1. After `listening 127.0.0.1:8000` appearing, open browser and navigate to http://127.0.0.1:8000 .

**Analyze a Windows computer with Everything x64 installed**

1. Make sure Everything x64 is running. Get it from https://www.voidtools.com/ if it's not installed. It's free.

1. Run `disk-treemap --everything <Paths to analyze>`
   
1. After `listening 127.0.0.1:8000` appearing, open browser and navigate to http://127.0.0.1:8000 .

**Analyze a remote Linux server, view on the local machine**

1. Run `disk-treemap <Paths to analyze> --host 0.0.0.0`.

   If bandwidth between the server and the local machine is limited, try to install optional dependencies and append `--compression` to command above to enable compression.

1. After `listening 0.0.0.0:8000` appearing, open browser on the local machine and navigate to http:
   //<IP address of the server>:8000 .

**Analyze a remote Linux server without external accessible IP, view on the local machine**

1. Run `disk-treemap <Paths to analyze> --scan_only`

1. After process exit without error. There should be a file named `size_tree.json` in the current directory. Copy the
   file to local machine using `rsync` or other tools.

1. Run `disk-treemap` in the directory where the copied file located.

1. After `listening 127.0.0.1:8000` appearing, open browser and navigate to http://127.0.0.1:8000 .

**Install and analyze an Android phone with Termux**

1. Install Termux https://termux.com/

1. Install Python and pip in Termux https://wiki.termux.com/wiki/Python

1. Install disk_treemap via pip: `pip install disk_treemap`

1. Just do analyze as your phone is an ordinary computer.

# TODO

* Provide more visualization. Icicle/flame, sunburst maybe.

* Use NTFS USN Journal to speed up scanning on Windows.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/exzhawk/disk_treemap",
    "name": "disk-treemap",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "",
    "author": "Epix Zhang",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/ec/4c/bebb292e14764c8b4ea01192fd0a8c4d75a5deb9aab8fb3bfdabe426b01e/disk_treemap-1.0.10.tar.gz",
    "platform": null,
    "description": "# disk_treemap\n\nJust another disk usage analyzer with treemap GUI.\n\n## Pros\n\n* Written in Python. Easy to run, modify and extend. Cross platform support. (Tested on Linux, Windows, and Android with\n  Termux.)\n* B/S structure. You can run the scanner on a remote machine, and view treemap via a browser on a local machine\n* Support save/load a treemap. You can run the scanner on a machine, then copy result to another one and view it.\n* Support S3 and S3 compatible object storage service\n* Support using [*Everything by voidtools*](https://www.voidtools.com/) to speedup scanning extraordinarily.\n\n## Cons\n\n* The web base frontend may suffer from performance issue if the treemap is too large.\n\n# Installation\n\n## Install via pip package installer\n\n```shell\npip install disk_treemap\n```\n\n## Build and install from source\n\n**dependencies:**\n* npm: `npm` must be in `PATH` to build static. Make sure NodeJS and npm is installed and in `PATH`.\n\n```shell\n# clone the repository\ngit clone \ngit submodule update --recursive\n# build static\npython3 setup.py build_static\n\n#build wheel\npython3 setup.py bdist_wheel\n#install built wheel \npip install dist/disk_treemap-1.0.0-py3-none-any.whl # change the filename\n```\n\n# Usage\n\n```\nusage: disk-treemap [-h] [--size-tree-path SIZE_TREE_PATH] [--overwrite]\n                    [--scan-only] [--host HOST] [--port PORT] [--compression]\n                    [--endpoint-url ENDPOINT_URL] [--follow-links]\n                    [--follow-mounts] [--everything]\n                    [paths ...]\n\npositional arguments:\n  paths                 path(s) to scan. If multiple paths is provided, they\n                        will be show in root side by side. S3 or compatible\n                        object storage service is supported by a \"s3://\"\n                        prefixed URI\n\noptional arguments:\n  -h, --help            show this help message and exit\n  --size-tree-path SIZE_TREE_PATH, --size_tree_path SIZE_TREE_PATH, -f SIZE_TREE_PATH\n                        path to save scan result as a JSON file\n  --overwrite, -o       overwrite existed JSON file. default to False\n  --scan-only, --scan_only, -s\n                        scan and save JSON file but do not start web server.\n                        default to False\n  --host HOST, -H HOST  listening host of the web server\n  --port PORT, -p PORT  listening port of the web server. default to 8000\n  --compression, -c     enable compression of web server. require\n                        flask_compress to operate. default to False\n  --endpoint-url ENDPOINT_URL\n                        custom endpoint url, only affects S3\n  --follow-links, --follow_links\n                        follow symlinks\n  --follow-mounts, --follow_mounts\n                        follow mounts\n  --everything          use Everything by voidtools to speedup scanning. The\n                        result will be absolute path. Everything must be\n                        running and only x64 version is supported.\n```\n\nYou may also use the module directly: `python -m disk_treemap.main`. Same arguments apply.\n\nA `size_tree.json` will be generated in the current directory. It contains file tree and file size information. Keep it\nsafe!\n\n# Typical Usage\n\n**Analyze an ordinary computer**\n\n1. Run `disk-treemap <Paths to analyze>`\n   \n1. After `listening 127.0.0.1:8000` appearing, open browser and navigate to http://127.0.0.1:8000 .\n\n**Analyze a Windows computer with Everything x64 installed**\n\n1. Make sure Everything x64 is running. Get it from https://www.voidtools.com/ if it's not installed. It's free.\n\n1. Run `disk-treemap --everything <Paths to analyze>`\n   \n1. After `listening 127.0.0.1:8000` appearing, open browser and navigate to http://127.0.0.1:8000 .\n\n**Analyze a remote Linux server, view on the local machine**\n\n1. Run `disk-treemap <Paths to analyze> --host 0.0.0.0`.\n\n   If bandwidth between the server and the local machine is limited, try to install optional dependencies and append `--compression` to command above to enable compression.\n\n1. After `listening 0.0.0.0:8000` appearing, open browser on the local machine and navigate to http:\n   //<IP address of the server>:8000 .\n\n**Analyze a remote Linux server without external accessible IP, view on the local machine**\n\n1. Run `disk-treemap <Paths to analyze> --scan_only`\n\n1. After process exit without error. There should be a file named `size_tree.json` in the current directory. Copy the\n   file to local machine using `rsync` or other tools.\n\n1. Run `disk-treemap` in the directory where the copied file located.\n\n1. After `listening 127.0.0.1:8000` appearing, open browser and navigate to http://127.0.0.1:8000 .\n\n**Install and analyze an Android phone with Termux**\n\n1. Install Termux https://termux.com/\n\n1. Install Python and pip in Termux https://wiki.termux.com/wiki/Python\n\n1. Install disk_treemap via pip: `pip install disk_treemap`\n\n1. Just do analyze as your phone is an ordinary computer.\n\n# TODO\n\n* Provide more visualization. Icicle/flame, sunburst maybe.\n\n* Use NTFS USN Journal to speed up scanning on Windows.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Just another disk usage analyzer with treemap GUI.",
    "version": "1.0.10",
    "project_urls": {
        "Homepage": "https://github.com/exzhawk/disk_treemap"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d259e0d1b3c658726f74dd3ffb83aa937a0e0d8424cdcf5b343f397016e4bae5",
                "md5": "aa13d7554fbe5fea6325625db1044b25",
                "sha256": "df79ab0f0c6e743f26c335898e5b98df9df2dddc9598abd4c46a47e318b76ce0"
            },
            "downloads": -1,
            "filename": "disk_treemap-1.0.10-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "aa13d7554fbe5fea6325625db1044b25",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 157678,
            "upload_time": "2023-07-10T16:37:54",
            "upload_time_iso_8601": "2023-07-10T16:37:54.997861Z",
            "url": "https://files.pythonhosted.org/packages/d2/59/e0d1b3c658726f74dd3ffb83aa937a0e0d8424cdcf5b343f397016e4bae5/disk_treemap-1.0.10-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ec4cbebb292e14764c8b4ea01192fd0a8c4d75a5deb9aab8fb3bfdabe426b01e",
                "md5": "924e9b07be61c708b67a863219f22569",
                "sha256": "b5ef752a19ed7518107554ac2199712e4019fcd4f400f9eb78678393d3637e33"
            },
            "downloads": -1,
            "filename": "disk_treemap-1.0.10.tar.gz",
            "has_sig": false,
            "md5_digest": "924e9b07be61c708b67a863219f22569",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 157369,
            "upload_time": "2023-07-10T16:37:56",
            "upload_time_iso_8601": "2023-07-10T16:37:56.747310Z",
            "url": "https://files.pythonhosted.org/packages/ec/4c/bebb292e14764c8b4ea01192fd0a8c4d75a5deb9aab8fb3bfdabe426b01e/disk_treemap-1.0.10.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-10 16:37:56",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "exzhawk",
    "github_project": "disk_treemap",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "flask",
            "specs": []
        },
        {
            "name": "tqdm",
            "specs": []
        },
        {
            "name": "flask-compress",
            "specs": []
        },
        {
            "name": "boto3",
            "specs": []
        }
    ],
    "lcname": "disk-treemap"
}
        
Elapsed time: 0.08895s