EduMerge Documentation
Complete guide to using EduMerge's text editor and mail merge features
Getting Started
What is EduMerge?
EduMerge is a powerful, student-focused text editor with integrated mail merge capabilities. Built with Python and ttkbootstrap, it provides:
βοΈ Rich Text Editing
Full formatting support with bold, italic, underline, and custom fonts
π Mail Merge
Automate personalized document creation for multiple recipients
π€ Multiple Formats
Support for TXT, CSV, DOCX, and PDF files
π Privacy First
All processing happens locallyβno cloud, no tracking
Requirements
- Python 3.8+ installed on your system
- Operating System: Windows, Linux, or macOS
- Dependencies: Automatically installed via
dependency-installer.py
Installation
Step 1: Clone the Repository
git clone https://github.com/aksgamigg/EduMerge.git
cd EduMerge
Step 2: Install Dependencies
Run the automatic dependency installer:
python dependency-installer.py
This will install all required libraries:
ttkbootstrap- Modern UI frameworkPillow- Image processingpython-docx- Word document handlingpdf2image- PDF viewing capabilitiespypdf- PDF manipulation
Step 3: Verify Installation
Run the diagnostics tool to check if everything is properly installed:
python diagnostics.py
Step 4: Launch EduMerge
python EduMerge.py
Text Editor
Interface Overview
The text editor features a modern three-panel layout:
- Left Sidebar: File operations, insert content, and export options
- Main Area: Tabbed interface with text editor, CSV viewer, and PDF viewer
- Toolbar: Font controls, text styling, headings, and color options
Basic Operations
Creating a New Document
- Click π New Document in the sidebar
- If you have unsaved changes, you'll be prompted to save
- Start typing in the text area
Opening Files
EduMerge supports multiple file formats:
- .txt - Plain text files
- .csv - Spreadsheet data (opens in CSV Table tab)
- .docx - Microsoft Word documents
- .pdf - PDF files (read-only, opens in PDF Viewer tab)
Saving Files
- Save: Save to current file (Ctrl+S)
- Save As: Save with new name/location
Text Formatting
Basic Styles
| Style | Button | Shortcut | Usage |
|---|---|---|---|
| Bold | π | Ctrl+B | Emphasis, headings |
| Italic | πΌ | Ctrl+I | Emphasis, quotes |
| Underline | UΜ² | Ctrl+U | Important text |
Headings
- H1 (Red): Main titles - 32pt, bold, red color
- H2 (Blue): Section headings - 24pt, bold, blue color
- H3 (Green): Subsections - 18pt, bold, green color
Fonts
Change font family and size using the toolbar:
- Available Fonts: Segoe UI, Arial, Times New Roman, Calibri, Georgia, Courier New, Consolas
- Size Range: 8pt to 72pt
Colors
- π¨ Text: Change text color
- π¨ BG: Change background color (highlight)
Inserting Content
Images
- Click πΌοΈ Insert Image in sidebar
- Select image file (PNG, JPG, GIF, BMP supported)
- Image is automatically resized if wider than 700px
CSV Tables
- Click π CSV Table in sidebar
- Open a CSV file
- View data in searchable, paginated table format
Exporting Documents
Export to DOCX
Creates a Microsoft Word document:
# Click "π Export DOCX" in sidebar
# Choose save location
# Each paragraph becomes a separate Word paragraph
Export to PDF
For PDF export, use one of these methods:
- Export to DOCX first, then convert using Word/LibreOffice
- Use your browser's "Print to PDF" feature
Mail Merge
What is Mail Merge?
Mail Merge automates the creation of personalized documents for multiple recipients. Perfect for:
- Student certificates
- Grade reports
- Invitation letters
- Cover letters for multiple applications
- Personalized announcements
Step-by-Step Guide
Step 1: Launch Mail Merge
- Run
python EduMerge.py - Click π§ Mail Merge on the starting screen
Step 2: Enter Recipient Names
You have two options:
Option A: Manual Insert
- Choose "Manual Insert"
- Enter the number of recipients (minimum 2)
- Enter each name when prompted
- Names are automatically converted to Title Case
Option B: Text File
- Choose "Text File"
- Prepare a .txt file with names in this format:
Alice Johnson, Bob Williams, Charlie Brown, Diana Prince
- Names must be separated by
,(comma + space) - All names on one line
Step 3: Create Letter Content
Use the special placeholder [name] where you want the recipient's name to appear:
Dear [name],
Congratulations on your excellent performance this semester!
We are pleased to inform you, [name], that you have been selected
for the Academic Excellence Award.
Best regards,
Principal's Office
You can provide the letter in two ways:
- Browse: Select an existing .txt file
- Type Letter Content: Type directly in the dialog box
[name] placeholder is case-sensitive. Use exactly [name], not [Name] or [NAME].
Step 4: Choose Output Folder
- Select where you want to save the generated letters
- Each letter will be saved as
RecipientName's Mail.txt
Step 5: Success!
When complete:
- You'll see a success message
- The output folder opens automatically
- Each recipient gets a personalized letter file
Example Workflow
# Names entered: Alice, Bob, Charlie
# Letter template:
"Dear [name], Welcome to our program!"
# Generated files:
Alice's Mail.txt β "Dear Alice, Welcome to our program!"
Bob's Mail.txt β "Dear Bob, Welcome to our program!"
Charlie's Mail.txt β "Dear Charlie, Welcome to our program!"
Advanced Tips
- Use
[name]multiple times in the same letter - Combine with text formatting before running mail merge
- Export merged letters to DOCX for professional formatting
- If a file already exists, EduMerge creates
Name's Mail(1).txtto avoid overwriting
Supported File Formats
.TXT (Plain Text)
- Read: β Full support
- Write: β Full support
- Features: Basic text, UTF-8 encoding
- Note: Formatting and images are lost when saved as .txt
.CSV (Comma-Separated Values)
- Read: β Full support
- Write: β Full support
- Features: Table view with search and pagination
- Use Case: Viewing and editing spreadsheet data
.DOCX (Microsoft Word)
- Read: β Plain text extraction
- Write: β Export with basic formatting
- Limitations: Complex formatting not preserved on import
- Export: Each paragraph saved separately
.PDF (Portable Document Format)
- Read: β View-only (rendered as images)
- Write: β Use DOCX β PDF workflow
- Requirements:
pdf2imageand Poppler - Note: PDF loading may take time for large files
Keyboard Shortcuts
| Action | Shortcut | Description |
|---|---|---|
| New Document | Ctrl+N | Create a new blank document |
| Open File | Ctrl+O | Open file dialog |
| Save | Ctrl+S | Save current document |
| Bold | Ctrl+B | Toggle bold on selected text |
| Italic | Ctrl+I | Toggle italic on selected text |
| Underline | Ctrl+U | Toggle underline on selected text |
Troubleshooting
Installation Issues
Dependencies Not Installing
Problem: dependency-installer.py fails
Solution:
- Ensure you're using Python 3.8+:
python --version - Try manual installation:
pip install ttkbootstrap Pillow python-docx pdf2image pypdf - Restart terminal after installation
PDF Support Not Working
Problem: Can't open PDF files
Solution:
- Install Poppler (required for PDF viewing)
- Windows: Download from
https://blog.alivate.com.au/poppler-windows/ - Linux:
sudo apt-get install poppler-utils - macOS:
brew install poppler - Run
python diagnostics.pyto verify
Runtime Issues
Application Won't Start
Problem: Error when running EduMerge.py
Solution:
# Run diagnostics first
python diagnostics.py
# Check for missing dependencies
# Reinstall if needed
python dependency-installer.py
Logo/Images Not Showing
Problem: Logo or UI images missing
Solution: Ensure these files exist in the EduMerge directory:
logo.pnglogo.icolabel.png
Unsaved Changes Not Detected
Problem: Document shows as saved when it shouldn't
Solution: This is a known limitation. Always manually save (Ctrl+S) before closing.
Mail Merge Issues
[name] Not Replaced
Problem: Generated letters still show [name]
Solution:
- Check spelling: must be
[name]exactly - Case-sensitive:
[Name]or[NAME]won't work - Include the square brackets
Names File Not Accepted
Problem: Text file rejected when importing names
Solution: Ensure format is correct:
John Smith, Jane Doe, Bob Johnson
- Comma followed by space between names
- All names on a single line
- No trailing comma
Performance Issues
PDF Loading is Slow
Problem: Application freezes when opening large PDFs
Solution: This is normal for large PDFs. Wait for the loading window to close. For very large PDFs, consider:
- Splitting PDF into smaller files
- Reducing PDF quality/size before opening
- Using a dedicated PDF viewer instead
Getting Help
If you encounter issues not covered here:
- Check the GitHub Issues page
- Run
python diagnostics.pyand share the output - Open a new issue with details about your problem
- Email: akshajgoel@bnpsramvihar.edu.in
Advanced Features
Custom Text Formatting
Beyond the basic formatting buttons, you can create complex formatting combinations:
- Select text and apply multiple styles (bold + italic + underline)
- Mix different heading levels in the same document
- Apply custom colors to specific words or phrases
CSV Table Features
The CSV Table view includes:
- Searchable: Filter rows by keyword
- Paginated: Navigate large datasets easily
- Sortable: Click column headers to sort
Window Dragging
Custom dialogs in EduMerge are frameless but draggable:
- Click and hold anywhere on the dialog
- Drag to reposition
- Useful for viewing content behind the dialog
Status Bar Information
The bottom status bar shows:
- Lines: Total line count
- Characters: Total character count (including spaces)
- Words: Word count
- File Type: Current document format
API Reference
Main Classes
ModernEditorApp
Main text editor application class.
class ModernEditorApp:
def __init__(self, root)
# File operations
def new_file(self)
def open_file(self)
def save_file(self)
def save_as_file(self)
# Text formatting
def apply_bold(self)
def apply_italic(self)
def apply_underline(self)
def apply_heading(self, heading_tag)
def change_font(self)
def change_text_color(self)
def change_bg_color(self)
# Content insertion
def insert_image(self)
def create_csv_table(self)
# Export methods
def export_to_docx(self)
def export_to_pdf(self)
# File format handlers
def open_csv(self, filepath)
def open_docx(self, filepath)
def open_pdf(self, filepath)
Letter
Handles mail merge letter generation.
class Letter:
def __init__(self)
# Core methods
def process_letter_content(self)
def generate_personalized_letters(self)
def show_placeholder_instructions(self)
NameManager
Manages recipient name collection.
class NameManager:
def __init__(self)
# Collection methods
def name_collection(self)
def collect_names_manually(self)
def names_text_file_processing(self)
def confirm_names_proceed(self)
Custom Dialogs
CustomBox
General-purpose message box with custom buttons.
CustomBox(buttons=["OK", "Cancel"], message="Your message", image_y=40)
IntBox
Dialog for integer input (spinbox).
dialog = IntBox(buttons=["Continue", "Exit"], message="Enter number:")
value = dialog.result # Returns integer
choice = dialog.choice # Returns button clicked
StringBox
Dialog for single-line text input.
dialog = StringBox(buttons=["OK", "Cancel"], message="Enter text:")
text = dialog.result # Returns string
choice = dialog.choice # Returns button clicked
TextBox
Dialog for multi-line text input.
dialog = TextBox(buttons=["Save", "Cancel"], message="Enter content:")
content = dialog.result # Returns text content
choice = dialog.choice # Returns button clicked
Utility Functions
# Center a window on screen
center_window(window)
# Show exit confirmation
exit_confirmation()
show_exit_confirmation(callback_function)