A tool to view project tree and file contents
Project description
Tree Values Viewer
A simple and powerful tool to view project tree structure, file contents, and file information.
Features
- Display project directory structure
- View file contents
- Show file information including line count
- Ignore specific files or directories
Installation
You can install Tree Values Viewer using pip:
pip install tree-values-viewer
Usage
Tree Values Viewer provides three main commands:
tree
: Display the project directory structurevalues
: View file contentsvalues_info
: Show file information including line count
Viewing Project Structure
To view the project directory structure:
view-project tree
Example output:
|____project_root/
|____src/
|____main.py
|____utils.py
|____tests/
|____test_main.py
|____README.md
Viewing File Contents
To view the contents of all files in the project:
view-project values
This will display the content of each file, separated by a line of dashes.
Viewing File Information
To view information about files, including their line count:
view-project values_info
Example output:
+------------------------+------------+
| File Path | Line Count |
+------------------------+------------+
| ./src/main.py | 100 |
| ./src/utils.py | 50 |
| ./tests/test_main.py | 75 |
| ./README.md | 30 |
+------------------------+------------+
Total lines of code: 255
Ignoring Files or Directories
You can ignore specific files or directories using the --ignore
option:
view-project tree --ignore .env,.git,node_modules
view-project values --ignore .env,.git,node_modules
view-project values_info --ignore .env,.git,node_modules
This will exclude the specified files or directories from the output.
Development
Setting Up the Development Environment
-
Clone the repository:
git clone https://github.com/keskinbu/tree-values-viewer.git cd tree-values-viewer
-
Create a virtual environment and activate it:
python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate`
-
Install the development dependencies:
pip install -r requirements-dev.txt
Running Tests
To run the tests:
python -m unittest discover tests
Building and Publishing
-
Install the required tools:
pip install setuptools wheel twine
-
Create distribution packages:
python setup.py sdist bdist_wheel
-
Upload to PyPI:
twine upload dist/* --repository-url https://upload.pypi.org/legacy/ -u __token__ -p $PYPI_API_TOKEN
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for tree-values-viewer-0.1.12.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ee4f8f0831c61179e3e16d1e558de20b0f3f3637638ee9a397830ac350125f75 |
|
MD5 | 98cf2e36a12d1555d974e18a76bf183d |
|
BLAKE2b-256 | 4ad37620cdc65353942b7c4955918dfc3ca13cff949ebdeda28cb7275f05d11c |
Hashes for tree_values_viewer-0.1.12-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 52555ef8991820042ed9ce084da17174a1bb90966fc7d7faf7d7df7b7c9ad518 |
|
MD5 | 9d06ffd4281361005513c43a54c0c5e9 |
|
BLAKE2b-256 | 4ac28bb20d1b93819e9a79df1aaf46325f8209e1f7dd8552493a375cd620cfcf |