Skip to main content

Directory Content Analysis Tool - Extract and analyze source code files across project structures

Project description

print-project

A comprehensive Python CLI tool for analyzing and extracting the contents of source code files across a project directory structure, outputting them into a single organized document for easier review and analysis.

⚡ Installation

pip install print-project

🚀 Quick Start

# Analyze current directory
print-project

# Analyze specific project
print-project -f /path/to/project

# Show progress during analysis
print-project --console

# Alternative command name
analyze-project --help

✨ Features

  • Recursive Directory Scanning: Analyzes entire project structures including subdirectories
  • File Type Filtering: Include/exclude files by extension or specific filenames
  • Smart Binary Detection: Automatically skips binary files while allowing trusted text extensions
  • Directory Tree Generation: Creates visual directory structure representation
  • Configurable Output: Customizable output formatting with summary statistics
  • Size Limits: Configurable maximum file size processing limits
  • Flexible Configuration: INI-based configuration with command-line overrides

💡 Usage Examples

# Basic usage
print-project                                    # Analyze current directory
print-project -f /path/to/project               # Analyze specific directory
print-project --console                         # Show console output

The tool uses a `config.ini` file for default settings. Config file locations:

- Current working directory
- `~/.print-project/config.ini` (user config)
- `/etc/print-project/config.ini` (system config - Unix/Linux)
- `%APPDATA%/print-project/config.ini` (system config - Windows)

## 📄 Output

The tool generates a `.txt` file containing:

1. **Directory Tree**: Visual representation of the project structure
2. **File Analysis**: Content of each processed file with:
   - File path and metadata
   - Line numbers
   - Syntax highlighting markers
3. **Summary Statistics**:
   - Total files processed
   - Files skipped (with reasons)
   - Processing time and performance metrics

## 🎯 Use Cases

- **Code Reviews**: Generate comprehensive project snapshots
- **Documentation**: Create detailed project overviews
- **Analysis**: Understand project structure and content
- **Migration**: Prepare project content for analysis or transfer
- **AI/LLM Input**: Generate context-rich project representations

## 🔄 Updates

```bash
# Upgrade to latest version
pip install --upgrade print-project

# Check current version
print-project --help  # Version shown in help text

🌐 Cross-Platform Compatibility

Works identically on:

  • Windows
  • macOS
  • Linux

📚 Links

📝 License

MIT License - see the repository 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

print_project-2.2.0.tar.gz (40.0 kB view details)

Uploaded Source

Built Distribution

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

print_project-2.2.0-py3-none-any.whl (18.5 kB view details)

Uploaded Python 3

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