{"id":16528361,"url":"https://github.com/danvk/webtreemap","last_synced_at":"2025-09-12T19:31:22.945Z","repository":{"id":47050532,"uuid":"293640228","full_name":"danvk/webtreemap","owner":"danvk","description":"CLI to quickly get a treemap visualization","archived":false,"fork":false,"pushed_at":"2021-09-15T16:32:34.000Z","size":740,"stargazers_count":30,"open_issues_count":3,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-29T23:03:59.668Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://evmar.github.io/webtreemap/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/danvk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-09-07T21:56:12.000Z","updated_at":"2024-11-02T11:57:06.000Z","dependencies_parsed_at":"2022-08-23T18:10:47.413Z","dependency_job_id":null,"html_url":"https://github.com/danvk/webtreemap","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danvk%2Fwebtreemap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danvk%2Fwebtreemap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danvk%2Fwebtreemap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danvk%2Fwebtreemap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danvk","download_url":"https://codeload.github.com/danvk/webtreemap/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232775956,"owners_count":18574904,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-11T17:40:01.682Z","updated_at":"2025-01-06T19:35:47.792Z","avatar_url":"https://github.com/danvk.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# webtreemap CLI\n\nNo frills treemap visualization from the command line. Includes built-in facilities for\nvisualizing space using on disk or in a JSON file, but the simple input format makes it\neasy to create a treemap visualization of anything you like.\n\nSee a demo of what the visualization looks like [here][demo].\n\n## Usage\n\nInstall with\n\n    npm install -g webtreemap-cli\n\nThen run with:\n\n    treemap \u003c my_data\n\nInput data format is whitespace-separated lines of `size path`, where size\nis a number and path is a '/'-delimited path. For example:\n\n    $ cat my_data\n    100 all\n    50 all/thing1\n    25 all/thing2\n\nIf the number is omitted, it is assumed to be `1`. This lets you visualize the number of\nfiles in each directory using the `find` command, for example:\n\n    find . -type f | treemap\n\nNote that there's nothing file-system-specific about the data format -- it\njust uses slash as a nesting delimiter.\n\n## Special inputs\n\nThe previous section described the general input format. The `treemap` binary also includes\nsubcommands for a few specific use cases that come up frequently in practice.\n\n### Disk usage of a directory\n\ni.e. \"why is node_modules so big!?\"\n\n    treemap du node_modules\n\n### Space used in a JSON file\n\nJSON is ubiquitous, but it's not known for making efficient use of space. You can visualize\nwhy a JSON file is large using the `du:json` subcommand:\n\n    treemap du:json file.json\n\nFor a [GeoJSON] file, for example, this can tell you whether feature geometries or properties\nare using more bytes. If it's geometries, then [TopoJSON] might be helpful. If it's properties,\nthen you'll need to think more about how you're structuring your data.\n\n### Space used in a source map\n\nSee [source-map-explorer].\n\n## Options\n\n- `-f, --format [format]`\n\n  Set the output format. By default this is HTML. You may also output JSON or text, which produces a format that may be fed back into `treemap`. This is useful if you want to use one of the special inputs but edit the results before visualization.\n\n- `-o, --output [path]`\n\n  Output to a file rather than opening a web browser or printing to stdout (depending on the output format). If `-o` is specified but not `-f`, then the output format will be set based on the output file name's extension.\n\n- `--title [string]`\n\n  Set the page title for HTML output.\n\n## Development\n\nRun:\n\n    yarn build\n    yarn demo\n\nDevelop:\n\n    yarn watch\n    yarn demo\n\nFormat code:\n\n    yarn fmt\n\n## Credits\n\nThis was forked from [evmar/treemap], which is [no longer actively maintained][evmar#37].\nThis is the same visualization used in [source-map-explorer].\n\n## License\n\nwebtreemap is licensed under the Apache License v2.0. See `LICENSE.txt` for the\ncomplete license text.\n\n[demo]: http://evmar.github.io/webtreemap/\n[evmar/treemap]: https://github.com/evmar/webtreemap\n[source-map-explorer]: https://github.com/danvk/source-map-explorer\n[evmar#37]: https://github.com/evmar/webtreemap/issues/37\n[geojson]: https://geojson.org\n[topojson]: https://github.com/topojson/topojson\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanvk%2Fwebtreemap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanvk%2Fwebtreemap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanvk%2Fwebtreemap/lists"}