Project structure generator with file content inspection
Project description
Structorex
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:
- Directory path to analyze
- 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
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8382b03755df5e9ea5ee1c837c6703b71c00796a4ac9ccbdd2e0e9026a77e20c
|
|
| MD5 |
7690addd66c95bf77e8f2f83cc517194
|
|
| BLAKE2b-256 |
84d07ece13eb86e9c27ae03a40a42a492d6d5cabdc8c8dd86f4044165984049f
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
940a0b36b00b49010aac7a9c3f0685ed2dbeadf344ed6024ddc8b178f1fc8e94
|
|
| MD5 |
b01fceb341714e17e1a0fef59a3ad7cd
|
|
| BLAKE2b-256 |
41d0a0fb05f2731085753f4156d80154486e2c8a99fe6e5bd9316f428775989b
|