README.md 1.6 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11
# RP Tree

RP Tree is a command-line tool to generate a directory tree diagram.

## Run the App

To run **RP Tree**, you need to download the source code. Then open a terminal or command-line window and run the following steps:

1. Create and activate a Python virtual environment

```sh
12
$ cd rptree_project/
13 14 15 16 17 18 19 20 21 22 23 24 25
$ python -m venv ./venv
$ source venv/bin/activate
(venv) $
```

2. Run the application

```sh
(venv) $ python tree.py /path/to/directory/
```

**Note:** The `-h` or `--help` option provides help on how to use RP Tree.

26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
To take a quick test on **RP Tree**, you can use the sample `home/` directory provided along with the application's code and run the following command:

```sh
(venv) $ python tree.py ../hello/
../hello/

├── hello/
│   ├── __init__.py
│   └── hello.py

├── tests/
│   └── test_hello.py

├── requirements.txt
├── setup.py
├── README.md
└── LICENSE
```

That's it! You've generated a nice directory tree diagram.

47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
## Current Features

If you run RP Tree with a directory path as an argument, then you get the full directory tree printed on your screen. The default input directory is your current directory.

RP Tree also provides the following options:

- `-v`, `--version` shows the application version and exits
- `-h`, `--help` show a usage message
- `-d`, `--dir-only` generates a directory-only tree
- `-o`, `--output-file` generates a tree and save it to a file in markdown format

## Release History

- 0.1.0
  - A work in progress

## About the Author

Leodanis Pozo Ramos - Email: leodanis@realpython.com