#project

MAWS Auto Printer System

Details

An automated email printing system designed for Windows that monitors Gmail inboxes and automatically prints incoming unread messages to a selected printer. The application features a modern dark-themed GUI inspired by VS Code, with support for test mode (HTML file generation) to reduce paper waste during development and testing.

Status: ✅ Completed and deployed
Repository: https://github.com/Maws7140/mawsprinter
Platform: Windows-only (due to pywin32 dependency)
Language: Python 100%

Core Features

Goals & Milestones

Technical Roadmap

Technology Stack

Core Language

GUI Framework

Email Integration

Windows Printing

Image Processing

Utilities

Architecture

Class Structure

PrinterApp
├── __init__() - UI setup, config loading, printer detection
├── build_ui() - Constructs dark-themed interface
├── load_config() / save_config() - JSON persistence
├── start_monitoring() / stop_monitoring() - Thread control
├── process_emails() - Main IMAP monitoring loop
├── print_text_file() - Handles printing/HTML generation
├── send_test_page() - Manual test functionality
└── safe_decode() - Character encoding fallback

Configuration Format (JSON)

{
  "imap_server": "imap.gmail.com",
  "email": "user@gmail.com",
  "password": "app_password",
  "printer": "Selected Printer Name"
}

Email Processing Flow

  1. Connect to IMAP server via SSL
  2. Search for UNSEEN messages since current date
  3. Fetch and parse email content
  4. Extract subject and plain-text body
  5. Generate HTML-formatted document
  6. Print to Windows printer OR save as HTML (test mode)
  7. Mark as processed and continue monitoring

GUI Theme (VS Code-inspired)

Deployment Strategy

Standalone Executable (PyInstaller)

pyinstaller --onefile --windowed --icon=logo.ico --add-data "logo.png;." maws_printer.py

Features:

Installation & Usage

Development Setup

# Install Python 3.x
pip install pywin32 pillow

# Run application
python maws_printer.py

Configuration Steps

  1. Enter IMAP server (default: imap.gmail.com)
  2. Enter email address
  3. Enter app-specific password (Gmail App Password required)
  4. Select target printer from dropdown
  5. Save configuration
  6. Click "Start Monitoring"

Test Mode

Security Considerations

Known Limitations

Notes

Repository Statistics

Key Design Decisions

  1. Tkinter over PyQt/Kivy: Minimizes dependencies, standard library
  2. JSON config: Simple, human-readable persistence
  3. Test mode: Reduces paper waste during development
  4. Thread-based monitoring: Prevents UI freezing
  5. HTML generation: Ensures consistent formatting across printers
  6. VS Code theme: Modern, professional aesthetic

Future Enhancement Ideas

Timeline

@card [color-green]
time: 2025-01-01
title: Initial Development
content:
Project started - Core email monitoring and printing functionality implemented

@card [color-blue]
time: 2025-01-05
title: GUI Implementation
content:
Dark-themed VS Code-inspired interface completed with real-time logging

@card [color-green]
time: 2025-01-08
title: Test Mode & Configuration
content:
Added test mode (HTML export) and JSON-based configuration persistence

@card [color-green]
time: 2025-01-10
title: Release
content:
Repository published to GitHub with PyInstaller executable support