Metadata-Version: 2.4
Name: exator
Version: 5.0.0
Summary: AI-powered exam assistance tool with stealth features
Author: martian56
License: MIT
Project-URL: Homepage, https://github.com/martian/exator
Project-URL: Repository, https://github.com/martian/exator
Keywords: ai,exam,assistant,screenshot,ocr
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Education
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: Microsoft :: Windows
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: openai>=1.0.0
Requires-Dist: pillow>=10.0.0
Requires-Dist: pyautogui>=0.9.50
Requires-Dist: keyboard>=0.13.5
Requires-Dist: python-dotenv>=1.0.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: black>=23.0.0; extra == "dev"
Requires-Dist: flake8>=6.0.0; extra == "dev"
Dynamic: license-file

# EXATOR

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Python 3.8+](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/downloads/)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

AI-powered exam assistance tool with screenshot analysis and stealth display features.

## ✨ Features

- 📸 **Screenshot Capture**: Interactive screen region selection with visual overlay
- 🤖 **AI Analysis**: Uses OpenAI GPT-4/5 to analyze questions and provide accurate answers
- 🛡️ **Stealth Mode**: Disguised as Windows Security popup with fake/real content toggle
- 📝 **Automatic Logging**: Questions, answers, and screenshots saved with timestamps
- ⌨️ **Global Hotkeys**: Quick access via keyboard shortcuts (works across all apps)
- 💾 **Screenshot Archive**: Organized storage of captured images for later review
- 🎯 **Multi-Subject Support**: Works with math, science, programming, and more

## 🚀 Quick Start

1. **Clone and install:**
   ```bash
   git clone https://github.com/martian56/exator.git
   cd exator
   pip install -e .
   ```

2. **Configure API key:**
   ```bash
   # Copy example env file
   cp .env.example .env
   
   # Edit .env and add your OpenAI API key
   # OPENAI_API_KEY=sk-...
   ```

3. **Run:**
   ```bash
   exator
   ```

That's it! Press `Ctrl+Alt+Shift+X` to capture your first question.

## 📦 Installation

### From PyPI (once published)

```bash
pip🎮 Usage

### Hotkeys

| Hotkey | Action |
|--------|--------|
| `Ctrl+Alt+Shift+X` | Capture and analyze a question |
| `Ctrl+Alt+Shift+A` | Toggle answer box visibility |
| `Ctrl+Alt+Shift+Q` | Quit the application |

### Step-by-Step Workflow

1. **Launch EXATOR**
   ```bash
   exator
   ```
   The application runs in the background, listening for hotkeys.

2. **Capture a Question**
   - Press `Ctrl+Alt+Shift+X`
   - Your screen will dim with a semi-transparent overlay
   - Click and drag to select the region containing the question
   - Release to capture (or press `ESC` to cancel)

3. **Wait for Analysis**
   - The screenshot is sent to OpenAI for analysis
   - Processing typically takes 2-5 seconds
   - A notification confirms when the answer is ready

4. **View the Answer**
   - Press `Ctrl+Alt+Shift+A` to show the answer box
   - The box appears as a "Windows Security" alert (stealth mode)
   - Click the **ⓘ** button in the top-right to toggle between:
     - 🛡️ Fake security warning (for stealth)
     - 📋 Real answer with full details

5. **Review Later**
   - All captures are saved to `screenshots/` with timestamps
   - Answers logged to `answers.txt` with metadata
- Python 3.8 or higher
- Windows OS (required for keyboard hooks and window styling)
- OpenAI API key ([Get one here](https://platform.openai.com/api-keys))

## ⚙️ Configuration

Create a `.env` file in your working directory (or project root):

```env
OPENAI_API_KEY=your_openai_api_key_here
```

You can also use the provided `.env.example` as a template:
🔍 Features in Detail

### Stealth Display System

The answer box disguises itself as a Windows Security alert to avoid detection:

- **Default View**: Shows a convincing fake security warning about threats
- **Toggle Button**: Click the ⓘ icon to reveal the real answer
- **Window Styling**: Uses Windows UI fonts (Segoe UI) and colors
- **Always on Top**: Stays visible above other windows when shown
- **Resizable**: Adjust size as needed while maintaining stealth appearance

### AI-Powered Analysis

EXA📋 Requirements

### System Requirements

- **OS**: Windows 10/11 (required for keyboard hooks and window styling)
- **Python**: 3.8 or higher
- **RAM**: 512 MB minimum (more for large screenshots)
- **Disk**: 100 MB for installation + space for screenshots

### API Requirements

- **OpenAI API Key**: Required for AI analysis
- **Model Access**: GPT-4 or GPT-5 (configured in code)
- **Credits**: API calls cost varies by model and usage

### Python Dependencies

Core dependencies (auto-installed):

```
openai>=1.0.0          # AI analysis via OpenAI API
pillow>=10.0.0         # Image processing and manipulation
pyautogui>=0.9.50      # Screenshot capture functionality
keyboard>=0.13.5       # Global hotkey detection
python-dotenv>=1.0.0   # Environment variable management
```

## 📁 Project Structure

```
exator/
├── src/exator/              # Main package source
│   ├── __init__.py         # Package initialization & exports
│   ├── __main__.py         # CLI entry point (exator command)
│   ├── core.py             # Core logic, AI analysis, capture flow
│   ├── display.py          # Answer display box with stealth UI
│   └── selector.py         # Interactive region selector
├──🛠️ Development

### Setting Up Development Environment

```bash
# Clone repository
git clone https://github.com/martian56/exator.git
cd exator

# Create virtual environment
python -m venv venv
venv\Scripts\activate  # Windows
# source venv/bin/activate  # Linux/Mac

# Install in editable mode with dev dependencies
pip install -e ".[dev]"
```

### Development Dependencies

```⚠️ Disclaimer

**IMPORTANT**: This tool is provided for educational and research purposes only.

- Using this tool to cheat on exams or assessments may violate academic integrity policies
- Users are solely responsible for ensuring compliance with applicable rules and regulations
- The authors and contributors are not responsible for any misuse of this software
- This tool should be used ethically and legally

## 🤝 Contributing

Contributions are welcome! Here's how you can help:

1. Fork the repository
2. Create a feature branch (`git checkout -b feature/AmazingFeature`)
3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request

Please ensure:
- Code follows Black formatting
- New features include tests
- Documentation is updated

## 📄 License

MIT License - see [LICENSE](LICENSE) file for details

Copyright (c) 2026 Martian

## 🙏 Acknowledgments

- OpenAI for providing the GPT API
- Contributors and users of this project
- Open source community for the excellent tools used

## 📞 Support

- **Issues**: [GitHub Issues](https://github.com/martian56/exator/issues)
- **Discussions**: [GitHub Discussions](https://github.com/martian56/exator/discussions)

---

**Version**: 5.0.0  
**Status**: Active Development  
**Last Updated**: February 2026
- `flake8` - Linter

### Code Style

This project uses [Black](https://github.com/psf/black) for code formatting:

```bash
# Format all code
black src/

# Check formatting without changes
black --check src/
```

Linting with flake8:

```bash
flake8 src/
```

### Running Tests

```bash
# Run all tests
pytest

# Run with verbose output
pytest -v

# Run specific test file
pytest tests/test_core.py
```

### Building Distribution

```bash
# Install build tools
pip install build twine

# Build package
python -m build

# Check the distribution
twine check dist/*

# Upload to PyPI (when ready)
twine upload dist/*
```

## 🐛 Troubleshooting

### "No module named 'exator'"

Make sure you've installed the package:
```bash
pip install -e .
```

### "OpenAI API key not found"

Check that your `.env` file exists and contains:
```env
OPENAI_API_KEY=sk-your-key-here
```

### Hotkeys not working

- Run as administrator (required for keyboard hooks on Windows)
- Check if another application is using the same hotkeys
- Ensure `keyboard` package installed correctly

### Answer box not showing

- Press `Ctrl+Alt+Shift+A` to toggle visibility
- Check if window is hidden behind other applications
- Verify tkinter is available: `python -m tkinter`

### Screenshot capture fails

- Ensure you have screen access permissions
- Check if multiple monitors are causing issues
- Try selecting a smaller region

### AI analysis errors

- Verify OpenAI API key is valid
- Check your API quota/credits
- Ensure internet connection is stable
- Review API status at status.openai.com

### Screenshot Management

- Screenshots saved to `screenshots/` directory
- Filename format: `screenshot_YYYYMMDD_HHMMSS.png`
- Organized chronologically for easy review
- Full-resolution captures preserve quality

### Workflow

1. Launch EXATOR with `exator` command
2. Press **Ctrl+Alt+Shift+X** when you see a question
3. Drag to select the question region on screen
4. Wait for AI analysis (answer box will appear hidden)
5. Press **Ctrl+Alt+Shift+A** to show the answer box
6. Click the ⓘ button to toggle between fake security message and real answer

## Features in Detail

### Stealth Display

The answer box disguises itself as a Windows Security alert. By default, it shows a fake security warning. Click the info button (ⓘ) to reveal the actual answer.

### Automatic Logging

All questions, answers, and screenshots are automatically saved to `answers.txt` with timestamps and metadata.

### Screenshot Management

Screenshots are saved in the `screenshots/` directory with timestamps for later review.

## Requirements

- Python 3.8+
- Windows OS (for keyboard hooks and window styling)
- OpenAI API key

## Dependencies

- openai - AI analysis
- pillow - Image processing
- pyautogui - Screenshot capture
- keyboard - Hotkey detection
- python-dotenv - Environment variable management

## Development

### Install in development mode

```bash
pip install -e ".[dev]"
```

### Run tests

```bash
pytest
```

### Format code

```bash
black src/
```

## Disclaimer

This tool is for educational purposes only. Use responsibly and in accordance with academic integrity policies.

## License

MIT License - see LICENSE file for details
