Skip to main content

Automated POS monitoring and OCR processing application

Project description

XPERT AD-TARGETING

Automated POS monitoring and OCR processing application.

Installation

Option 1: Install from PyPI (Recommended)

pip install xpert-ad-targeting

Option 2: Install in Development Mode

# Clone the repository
git clone <repository-url>
cd Project_Xpert

# Install the package in development mode
python install.py

# Or manually:
pip install -e .

Configuration

Important: The package does not include any .env files for security reasons. You must create your own configuration file.

Setting up Environment Variables

  1. Copy the example configuration:

    cp env.example .env
    
  2. Edit the .env file with your actual credentials:

    # AWS Configuration
    AWS_ACCESS_KEY_ID=your_actual_access_key
    AWS_SECRET_ACCESS_KEY=your_actual_secret_key
    AWS_REGION=ap-south-1
    S3_BUCKET_NAME=your_actual_bucket_name
    
    # MongoDB Configuration
    MONGO_URI=mongodb://localhost:27017/xpert_db
    # For production MongoDB Atlas: mongodb+srv://username:password@cluster.mongodb.net/xpert_db
    
    # Application Settings
    SSIM_THRESHOLD=0.85
    CLEANUP_HOURS=24
    OUTPUT_DIR=/app/AllJsons
    UPLOAD_INTERVAL_MINUTES=5
    
    # Tesseract Configuration (automatically detected when installed via pip)
    TESSERACT_PATH=/usr/bin/tesseract
    
    # Logo Path (optional)
    LOGO_PATH=./xpert_ad_targeting_logo.jpeg
    
    # Development Settings (optional)
    DEBUG=0
    PYTHONPATH=/app
    
  3. Security Notes:

    • Never commit your .env file to version control
    • Keep your AWS credentials and MongoDB connection strings secure
    • The .env file is automatically excluded from the published package

Usage

After installation and configuration, you can run the application in several ways:

1. Command Line (Recommended)

xpert-ad-targeting

2. Python Module

python -m Project_Xpert

3. Direct Python Execution

python -c "from Project_Xpert import run; run()"

4. From Your Code

from Project_Xpert import XpertPOSApp

# Create and run the application
app = XpertPOSApp()
app.window.mainloop()

Features

  • POS Monitoring: Automated monitoring of POS windows
  • OCR Processing: Text extraction from screenshots using Tesseract (included)
  • S3 Upload: Automatic file upload to AWS S3
  • GUI Interface: Modern GUI built with CustomTkinter
  • Background Processing: Non-intrusive background monitoring
  • Phone Number Detection: Automatic phone number capture

Requirements

  • Python 3.8 or higher
  • Tesseract OCR (automatically included in the package)
  • Required Python packages (automatically installed):
    • customtkinter
    • Pillow
    • pytesseract
    • opencv-python
    • pymongo
    • boto3
    • python-dotenv
    • keyboard
    • pyautogui
    • pygetwindow
    • requests
    • numpy
    • scikit-image
    • scipy

Development

Project Structure

Project_Xpert/
├── __init__.py          # Package initialization
├── __main__.py          # Module entry point
├── main.py              # Main application
├── capture.py           # Screen capture functionality
├── ocr_export.py        # OCR processing
├── cleanup.py           # File cleanup
├── autorun.py           # Startup management
├── setup.py             # Package setup
├── pyproject.toml       # Modern package configuration
├── MANIFEST.in          # Package manifest
├── install.py           # Installation script
├── requirements.txt     # Dependencies
├── env.example          # Example environment configuration
├── .gitignore           # Git ignore rules
└── Tesseract-OCR/       # OCR engine (included)

Building the Package

# Build the package
python -m build

# Install from built package
pip install dist/xpert-ad-targeting-1.0.0.tar.gz

Security

  • Environment Files: .env files are excluded from the package to protect sensitive information
  • Credentials: Always use environment variables for API keys and database connections
  • Example Configuration: Use env.example as a template for your configuration

Support

For support, contact: support@xpert.chat

License

MIT License

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

xpert_ad_targeting-1.0.0-py3-none-any.whl (20.9 kB view details)

Uploaded Python 3

File details

Details for the file xpert_ad_targeting-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for xpert_ad_targeting-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1dd8bb86dc27419705543ca27c709d3cfd8fde1b8d2aaadd4ddb49f2ab1c3801
MD5 176ea85a7238e53ec947bdd3a72417fc
BLAKE2b-256 256be6ac4834d1a7e2c16d4d25a6dacc47dac79b3c44ad06d1cee09adf91e687

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