Skip to main content

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:

  1. tree: Display the project directory structure
  2. values: View file contents
  3. values-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

  1. Clone the repository:

    git clone https://github.com/keskinbu/tree-values-viewer.git
    cd tree-values-viewer
    
  2. Create a virtual environment and activate it:

    python -m venv venv
    source venv/bin/activate  # On Windows, use `venv\Scripts\activate`
    
  3. Install the development dependencies:

    pip install -r requirements-dev.txt
    

Running Tests

To run the tests:

python -m unittest discover tests

Building and Publishing

  1. Install the required tools:

    pip install setuptools wheel twine
    
  2. Create distribution packages:

    python setup.py sdist bdist_wheel
    
  3. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tree-values-viewer-0.1.16.tar.gz (17.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tree_values_viewer-0.1.16-py3-none-any.whl (17.9 kB view details)

Uploaded Python 3

File details

Details for the file tree-values-viewer-0.1.16.tar.gz.

File metadata

  • Download URL: tree-values-viewer-0.1.16.tar.gz
  • Upload date:
  • Size: 17.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.6

File hashes

Hashes for tree-values-viewer-0.1.16.tar.gz
Algorithm Hash digest
SHA256 ad1ed5a428887063fd50048cc9c7028f5445969ca5870c1006335b5edfeacbf4
MD5 9b4ebfa4474051dec6626fe4de9a49c9
BLAKE2b-256 ad8433678d3f3f49abb1259f65075bcce9453d2f894d8a67e4832062296edc2f

See more details on using hashes here.

File details

Details for the file tree_values_viewer-0.1.16-py3-none-any.whl.

File metadata

File hashes

Hashes for tree_values_viewer-0.1.16-py3-none-any.whl
Algorithm Hash digest
SHA256 fa09222b501bbfaca70dec661f6337c9c21f590a3f391234ef7fc6ae426a51b0
MD5 63460832212b24945283d40e657153db
BLAKE2b-256 a3f7816c34d1281e911df2042369a09221232236da96599c9ed4994d73c87451

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page