Skip to content

AsleshSura/To-Do-List

Repository files navigation

To-Do List Application

A modern, feature-rich desktop To-Do List application built with Python and CustomTkinter. Organize your tasks efficiently with priority management, due date tracking, and custom categorization.

Core Functionality

CRUD Operations

The application provides complete task management capabilities:

  • Create: Add new tasks with customizable due dates, times, and categories
  • Read: View all tasks organized by date with visual indicators for priority and completion status
  • Update: Edit existing task details including text, due dates, categories, and priority levels
  • Delete: Remove individual tasks or clear all tasks at once

Features

Task Management

  • ✅ Full CRUD operations for task management
  • 🌟 Priority marking with visual star system (★ for high priority, ☆ for normal)
  • 📅 Flexible due date and time support (date only, time only, or both)
  • 🏷️ Custom categories for task organization
  • ✓ Mark tasks as complete with visual indicators
  • 📋 Tasks automatically organized by creation date
  • 🔔 Visual highlighting for due dates (shows "Today" for current day tasks)

Customizability

  • 🎨 Customizable theme colors (background, buttons, accents)
  • 🎨 Customizable fonts (titles, headers, task text, buttons)
  • 🎨 Customizable window sizes and UI element dimensions
  • 📁 Multiple color schemes: background themes, priority colors, completion indicators, delete/edit button colors
  • ⚙️ Preferences saved and restored automatically

Tools & Utilities

  • 🔍 Search functionality to find tasks
  • 🔄 Filter capabilities for viewing specific task categories
  • 💾 Persistent data storage (auto-saves all changes)
  • 📝 JSON-based preference storage for easy customization
  • ⌨️ Keyboard shortcuts for common operations
  • 🛠️ One-click build tools for creating standalone executables

For End Users

  1. Download ToDo-List.exe from the releases
  2. Double-click to run - no installation needed!
  3. The app will create its data files automatically
  4. All your tasks, categories, and preferences are saved locally

For Developers

Requirements

  • Python 3.8+
  • pip

Quick Start

  1. Clone this repository
  2. Run setup_and_build.bat (Windows) or install manually:
    pip install -r requirements.txt
    python main.py

Building Executable

# Automatic build
python build_exe.py

# Or use batch file
setup_and_build.bat

# Create release packages
create_release.bat

File Structure

  • main_build/main.py - Main application code
  • requirements.txt - Python dependencies
  • build_exe.py - Build script for creating executable
  • preferences.txt - User preferences in JSON format (auto-generated)
  • tasks.txt - Task data storage (auto-generated)
  • categories.txt - Custom categories (auto-generated)

Data Storage

The application uses simple text-based files for persistent storage:

  • tasks.txt: Stores task information (text, completion status, timestamp, priority, due date, category)
  • categories.txt: Stores custom category names
  • preferences.txt: Stores JSON-formatted user preferences including themes, fonts, and UI dimensions

Backend Architecture

How Data Persists Across Sessions

The application uses a file-based storage system that automatically saves all changes to disk, ensuring data persists between application sessions.

Task Storage Format (tasks.txt)

Format: text||completed||timestamp||priority||due_date||category
Example: Buy groceries||False||2026-01-28 14:30||True||01-28-26 18:00||Shopping

Each task is stored as a pipe-delimited line with:

  • text: Task description
  • completed: Boolean status (True/False)
  • timestamp: Creation time in YYYY-MM-DD HH:MM format
  • priority: Boolean flag (True for ★, False for ☆)
  • due_date: Optional due date/time in MM-DD-YY or MM-DD-YY HH:MM format ("None" if empty)
  • category: Task category (defaults to "General")

Data Flow & Persistence

On Application Start:

  1. load_tasks() reads tasks.txt and converts each line into task dictionaries
  2. load_categories() reads categories.txt with the default "General" category
  3. load_preferences() reads preferences.txt or creates default settings
  4. All data is loaded into memory as Python objects

During Runtime:

  • All CRUD operations modify the in-memory task list
  • Every modification (add, edit, delete, toggle) automatically calls save_tasks()

Saving to Disk:

  • save_tasks() overwrites the entire tasks.txt file with current in-memory data
  • Data types are converted back to strings: booleans become "True"/"False", Python None becomes "None"
  • Changes persist immediately to disk

Example Edit Flow:

  1. User clicks "Edit" → Opens edit window with current task
  2. User modifies text/date/category → save_edit() updates the dictionary
  3. Function calls save_tasks() → Entire file is rewritten with updated data
  4. Next application session loads the updated values from disk

Categories Management

Custom categories are loaded from categories.txt:

  • General is always the default category
  • New categories can be added and are automatically saved
  • When a category is deleted, all tasks in that category revert to "General"

Preferences System

User preferences are stored as JSON in preferences.txt:

{
    "theme": {
        "background": "dark",
        "button_color": "blue",
        "priority_color": "orange",
        ...
    },
    "fonts": {
        "title": ["Arial", 24],
        "task": ["Arial", 11],
        ...
    },
    "sizes": {
        "window": "600x600",
        "button_width": 120
    }
}

All preference changes are automatically saved and restored on application startup.

Advantages & Design Choices

Advantages:

  • Simple implementation without external databases
  • Human-readable files for easy debugging/backup
  • Lightweight and fast for typical task lists
  • Files can be manually edited if needed
  • No dependencies on database services

⚠️ Design Considerations:

  • Entire file is rewritten on each save (suitable for small datasets)
  • No built-in rollback/version history
  • Not designed for concurrent access from multiple processes
  • Crash during save could potentially corrupt files (rare but possible)

License

MIT License - see LICENSE file for details


Hey everyone, I'm back with more code projects!

Last Friday, June 20th, I got bored of my monotonous summer routine and have chosen to work atleast 15 hours on 4 different projects this week.

This To-Do App is the first of four other projects that I will be releasing this week!

I've wanted to make one for ages but have never found the time so I glued myself to my chair (figuratively) and worked on this for 17 hours from 4 PM on June 21st to 9 AM on June 22nd. (15 hours of pure coding!)

I re-learnt a lot of python and customtkinter for this project.

While I really want to add more things, I'm getting super sleepy and I can feel my work getting sloppy and I really don't want to produce a messy product.

(In hindsight, I should've drank some tea lmao.)

Anyways, thank you so much for showing interest in this! I hope you love my app.


This project was also made for Shipwrecked

About

Simple To-Do List that can run on your laptop

Resources

License

Stars

Watchers

Forks

Packages

No packages published