# PrintDirTree
`printdirtree` is a command-line utility that prints the structure of a directory tree,
allowing you to easily specify files and directories to exclude.
**Example:**
```bash
$ printdirtree
PrintDirTree
├── MANIFEST.in
├── README.md
├── printdirtree
│ ├── __init__.py
│ └── __main__.py
└── setup.py
```
This tool is very useful to aid with prompting ChatGPT.
## Installation
Install `printdirtree` easily with pip:
```sh
pip install printdirtree
```
## Usage
To use `printdirtree`, simply run the command followed by optional arguments to tailor the output to your needs.
The basic usage prints the current directory structure:
```sh
printdirtree
```
### Specifying a Directory
To print the structure of a specific directory:
```sh
printdirtree --dir /path/to/directory
```
### Excluding Directories and Files
Exclude specific directories and/or file patterns:
```sh
printdirtree --exclude-dir node_modules --exclude-dir .git --exclude-file "*.log"
```
### Saving Preferences
To save your exclusions for future runs:
```sh
printdirtree --exclude-dir temp --exclude-file "*.tmp" --save
```
### Viewing Current Exclusions
See what exclusions are currently saved:
```sh
printdirtree --view-exclusions
```
### Including Directories and Files Back
To remove exclusions and include directories or files back into the printout:
```sh
printdirtree --include-dir temp --include-file "*.tmp" --save
```
## Example Usage
After installing `printdirtree`, you can run it to visualize the structure of your project directory. Here's an example command that excludes `.git` files:
```sh
printdirtree --exclude-file ".git"
```
Output for the `PrintDirTree` project might look like this:
```
PrintDirTree
├── MANIFEST.in
├── README.md
├── printdirtree
│ ├── __init__.py
│ └── __main__.py
└── setup.py
```
Raw data
{
"_id": null,
"home_page": "https://github.com/timf34/PrintDirTree",
"name": "printdirtree",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": null,
"author": "Tim Farrelly",
"author_email": "timf34@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/f6/68/cc0cb39e0b99f46f6aa0a261009d097bcfd4485a9204503eb9941fa0d2ef/printdirtree-0.1.4.tar.gz",
"platform": null,
"description": "# PrintDirTree\r\n\r\n`printdirtree` is a command-line utility that prints the structure of a directory tree, \r\nallowing you to easily specify files and directories to exclude. \r\n\r\n**Example:**\r\n\r\n```bash\r\n$ printdirtree\r\nPrintDirTree\r\n\u251c\u2500\u2500 MANIFEST.in\r\n\u251c\u2500\u2500 README.md\r\n\u251c\u2500\u2500 printdirtree\r\n\u2502 \u251c\u2500\u2500 __init__.py\r\n\u2502 \u2514\u2500\u2500 __main__.py\r\n\u2514\u2500\u2500 setup.py\r\n```\r\n\r\nThis tool is very useful to aid with prompting ChatGPT. \r\n\r\n## Installation\r\n\r\nInstall `printdirtree` easily with pip:\r\n\r\n```sh\r\npip install printdirtree\r\n```\r\n\r\n## Usage\r\n\r\nTo use `printdirtree`, simply run the command followed by optional arguments to tailor the output to your needs. \r\nThe basic usage prints the current directory structure:\r\n\r\n```sh\r\nprintdirtree\r\n```\r\n\r\n### Specifying a Directory\r\n\r\nTo print the structure of a specific directory:\r\n\r\n```sh\r\nprintdirtree --dir /path/to/directory\r\n```\r\n\r\n### Excluding Directories and Files\r\n\r\nExclude specific directories and/or file patterns:\r\n\r\n```sh\r\nprintdirtree --exclude-dir node_modules --exclude-dir .git --exclude-file \"*.log\"\r\n```\r\n\r\n### Saving Preferences\r\n\r\nTo save your exclusions for future runs:\r\n\r\n```sh\r\nprintdirtree --exclude-dir temp --exclude-file \"*.tmp\" --save\r\n```\r\n\r\n### Viewing Current Exclusions\r\n\r\nSee what exclusions are currently saved:\r\n\r\n```sh\r\nprintdirtree --view-exclusions\r\n```\r\n\r\n### Including Directories and Files Back\r\n\r\nTo remove exclusions and include directories or files back into the printout:\r\n\r\n```sh\r\nprintdirtree --include-dir temp --include-file \"*.tmp\" --save\r\n```\r\n\r\n## Example Usage\r\n\r\nAfter installing `printdirtree`, you can run it to visualize the structure of your project directory. Here's an example command that excludes `.git` files:\r\n\r\n```sh\r\nprintdirtree --exclude-file \".git\"\r\n```\r\n\r\nOutput for the `PrintDirTree` project might look like this:\r\n\r\n```\r\nPrintDirTree\r\n\u251c\u2500\u2500 MANIFEST.in\r\n\u251c\u2500\u2500 README.md\r\n\u251c\u2500\u2500 printdirtree\r\n\u2502 \u251c\u2500\u2500 __init__.py\r\n\u2502 \u2514\u2500\u2500 __main__.py\r\n\u2514\u2500\u2500 setup.py\r\n```\r\n",
"bugtrack_url": null,
"license": null,
"summary": "A CLI utility to print the directory tree structure with customizable exclusions.",
"version": "0.1.4",
"project_urls": {
"Homepage": "https://github.com/timf34/PrintDirTree"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "20494269262d17aaa6d57989454b7853ae0aadf8bbd3c8c4c2c0dfbecabed72e",
"md5": "8f5750aef99f65c7b585437126d04896",
"sha256": "e44dfa047c88d9ee52c4e1006d32f7fc6b45a9a41816e92120787e21f1efcf80"
},
"downloads": -1,
"filename": "printdirtree-0.1.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "8f5750aef99f65c7b585437126d04896",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 5285,
"upload_time": "2024-09-06T20:08:17",
"upload_time_iso_8601": "2024-09-06T20:08:17.157140Z",
"url": "https://files.pythonhosted.org/packages/20/49/4269262d17aaa6d57989454b7853ae0aadf8bbd3c8c4c2c0dfbecabed72e/printdirtree-0.1.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "f668cc0cb39e0b99f46f6aa0a261009d097bcfd4485a9204503eb9941fa0d2ef",
"md5": "ae42baf4b86cb20b17c334f862e99a96",
"sha256": "82d0305eb7a640c3e500d7bc9866668eb70518ce5bc5f9dbbb36fb9dec69f00f"
},
"downloads": -1,
"filename": "printdirtree-0.1.4.tar.gz",
"has_sig": false,
"md5_digest": "ae42baf4b86cb20b17c334f862e99a96",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 4751,
"upload_time": "2024-09-06T20:08:18",
"upload_time_iso_8601": "2024-09-06T20:08:18.493955Z",
"url": "https://files.pythonhosted.org/packages/f6/68/cc0cb39e0b99f46f6aa0a261009d097bcfd4485a9204503eb9941fa0d2ef/printdirtree-0.1.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-06 20:08:18",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "timf34",
"github_project": "PrintDirTree",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "printdirtree"
}