Skip to main content

Project structure generator with file content inspection

Project description

Structorex

Python Version License

Structorex is a command-line tool that generates a detailed report of your project's file structure, including file contents. It provides a visual representation of your directory hierarchy and allows you to inspect file contents directly in the generated report.

Features

  • ๐ŸŒณ Visual representation of directory structure
  • ๐Ÿ“„ File content inspection in the report
  • ๐Ÿ” Automatic file type detection (images, audio, video, documents)
  • ๐Ÿ—‘๏ธ Exclude specific directories (.git, __pycache__, etc.)
  • ๐Ÿ“ File size limitation (skips large files)
  • ๐Ÿงช Comprehensive test suite

Installation

pip install structorex

Or install from source:

git clone https://github.com/yourusername/structorex.git
cd structorex
pip install -e .

Usage

Command Line Interface

structorex

The tool will prompt you for:

  1. Directory path to analyze
  2. Output filename (default: project_report.txt)

Example Output

PROJECT STRUCTURE:
โ””โ”€โ”€ my_project/
    โ”œโ”€โ”€ src/
    โ”‚   โ”œโ”€โ”€ __init__.py
    โ”‚   โ”œโ”€โ”€ main.py
    โ”‚   โ””โ”€โ”€ utils.py
    โ”œโ”€โ”€ tests/
    โ”‚   โ”œโ”€โ”€ __init__.py
    โ”‚   โ””โ”€โ”€ test_utils.py
    โ”œโ”€โ”€ .gitignore
    โ””โ”€โ”€ README.md

FILE CONTENTS:
==================================================
File: /path/to/my_project/src/main.py
==================================================
def main():
    print("Hello, Structorex!")

if __name__ == "__main__":
    main()

Advanced Configuration

You can customize which directories to exclude by modifying the excluded set in the code:

excluded = {
    '.git', '__pycache__', '.idea', 'venv', '.venv',
    'node_modules', '.vscode'
}

Running Tests

pip install -e .[dev]
pytest -v

Project Structure

structorex/
โ”œโ”€โ”€ app/
โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”œโ”€โ”€ app.py          # CLI entry point
โ”‚   โ”œโ”€โ”€ builder.py      # Builds file system tree
โ”‚   โ”œโ”€โ”€ components.py   # File system components
โ”‚   โ”œโ”€โ”€ console.py      # Handles user input
โ”‚   โ”œโ”€โ”€ file_utils.py   # File operations utilities
โ”‚   โ””โ”€โ”€ visitors.py     # Report generation
โ”œโ”€โ”€ tests/              # Test suite
โ”œโ”€โ”€ pyproject.toml      # Project configuration
โ””โ”€โ”€ .gitignore

Contributing

Contributions are welcome! Please read our CONTRIBUTING.md for details on our code of conduct and the process for submitting pull requests.

License

This project is licensed under the MIT License - 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

structorex-0.1.1.tar.gz (12.5 kB view details)

Uploaded Source

Built Distribution

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

structorex-0.1.1-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file structorex-0.1.1.tar.gz.

File metadata

  • Download URL: structorex-0.1.1.tar.gz
  • Upload date:
  • Size: 12.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for structorex-0.1.1.tar.gz
Algorithm Hash digest
SHA256 8382b03755df5e9ea5ee1c837c6703b71c00796a4ac9ccbdd2e0e9026a77e20c
MD5 7690addd66c95bf77e8f2f83cc517194
BLAKE2b-256 84d07ece13eb86e9c27ae03a40a42a492d6d5cabdc8c8dd86f4044165984049f

See more details on using hashes here.

File details

Details for the file structorex-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: structorex-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 8.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for structorex-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 940a0b36b00b49010aac7a9c3f0685ed2dbeadf344ed6024ddc8b178f1fc8e94
MD5 b01fceb341714e17e1a0fef59a3ad7cd
BLAKE2b-256 41d0a0fb05f2731085753f4156d80154486e2c8a99fe6e5bd9316f428775989b

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