{"id":20501957,"url":"https://github.com/mohammad-malik/linkedlist-notepad","last_synced_at":"2026-05-08T02:12:41.057Z","repository":{"id":261801465,"uuid":"885379200","full_name":"mohammad-malik/linkedlist-notepad","owner":"mohammad-malik","description":"A console-based notepad using a 2D linked list for text storage. Features text editing, saving, loading, and a spell-checker with correction suggestions—all in a C++ console environment.","archived":false,"fork":false,"pushed_at":"2024-11-08T16:25:33.000Z","size":139,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-16T07:15:44.552Z","etag":null,"topics":["cpp","data-structures","dsa","linked-list","linux","macos","ncurses-library","unix"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mohammad-malik.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-08T13:26:43.000Z","updated_at":"2024-12-29T20:41:45.000Z","dependencies_parsed_at":"2024-11-08T14:39:01.234Z","dependency_job_id":"944d1145-a531-4570-a78a-21642827a9c4","html_url":"https://github.com/mohammad-malik/linkedlist-notepad","commit_stats":null,"previous_names":["mohammad-malik/linkedlist-notepad"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohammad-malik%2Flinkedlist-notepad","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohammad-malik%2Flinkedlist-notepad/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohammad-malik%2Flinkedlist-notepad/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohammad-malik%2Flinkedlist-notepad/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mohammad-malik","download_url":"https://codeload.github.com/mohammad-malik/linkedlist-notepad/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242097418,"owners_count":20071252,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpp","data-structures","dsa","linked-list","linux","macos","ncurses-library","unix"],"created_at":"2024-11-15T19:18:20.613Z","updated_at":"2026-05-08T02:12:36.027Z","avatar_url":"https://github.com/mohammad-malik.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Linked List based Notepad (on CLI)\n\nThis project is a console-based notepad application developed as part of a Data Structures assignment. Unlike traditional text editors that use strings, this application leverages **2D doubly linked lists** to store and manage text data. Implemented in C++, it provides essential notepad features in a console environment, including text manipulation, saving, loading, and spell-checking with suggestions for corrections.\n\n## Features\n\n- **Console-Based Text Editing with Linked List Storage**:\n  - Text is stored character-by-character using a 2D doubly linked list instead of strings or arrays.\n  - Each character is stored in a node, and linked nodes form both horizontal (line-wise) and vertical (line-separated) sequences.\n  - Supports insertion, deletion, and modification of text in a dynamic structure that grows as you type.\n\n- **Spell Checker**:\n  - Checks each word against a dictionary stored in a vector-based structure.\n  - Misspelled words trigger suggestions, including letter substitution, omission, insertion, and reversal.\n  - Outputs suggested corrections in real-time within a reserved section of the console interface.\n\n- **Custom Cursor Navigation**:\n  - Implements a custom cursor independent of the default console cursor, allowing flexible movement across characters and lines within the 2D linked list.\n  - Cursor updates on each key press, displaying changes dynamically without requiring the `Enter` key.\n\n## Data Structures\n\n- **2D Doubly Linked List**:\n  - This project emphasizes a unique approach by using a 2D doubly linked list for text storage, where each node represents a single character. Links connect characters horizontally (within the same line) and vertically (across lines).\n  - This structure allows for efficient text manipulation and provides a strong understanding of how linked lists can be applied beyond conventional usage.\n\n- **Dictionary Stored in a Vector**:\n  - The dictionary for spell-checking is loaded into a `vector\u003cvector\u003cchar\u003e\u003e` for efficient storage and quick access.\n\n## Requirements\n\nThis application requires a Unix-like environment with `ncurses` installed for console management. Follow the instructions below to set up and run the application.\n\n## Installation and Setup\n\n1. **Clone the Repository**:\n   ```bash\n   git clone https://github.com/mohammad-malik/linkedlist-notepad.git\n   cd linkedlist-notepad\n   ```\n\n2. **Install ncurses** (if not already installed):\n   ```bash\n   # Ubuntu/Debian\n   sudo apt-get install libncurses5-dev libncursesw5-dev\n\n   # MacOS\n   brew install ncurses\n   ```\n\n3. **Compile the Program**:\n   Use `g++` to compile the `main.cpp` and `dependencies.cpp` files.\n   ```bash\n   g++ main.cpp dependencies.cpp -lncurses -o console_notepad\n   ```\n\n4. **Run the Program**:\n   ```bash\n   ./console_notepad\n   ```\n\n## Usage\n\n- **Text Input**:\n  - Type to insert text in the notepad, which is stored in the linked list structure.\n  - Use `Backspace` to delete text nodes.\n\n- **Navigation**:\n  - Navigate through the text using arrow keys (`Up`, `Down`, `Left`, `Right`), moving the custom cursor over linked list nodes.\n\n- **Save and Load**:\n  - Press `Ctrl + S` to save the text in `save.txt`, storing it character-by-character.\n  - Press `Ctrl + L` to load text from `save.txt`, rebuilding the linked list structure.\n\n- **Spell Checker**:\n  - The spell checker activates each time a space is typed, analyzing the previous word stored in the linked list.\n  - Misspelled words display suggested corrections in the lower console section (25% of the screen).\n\n- **Exit**:\n  - Press `Esc` to quit, clearing all nodes in the linked list.\n\n## File Structure\n\n- `main.cpp`: Contains the main program loop, handling user input, cursor control, and interactions with the linked list.\n- `dependencies.cpp`: Implements the 2D doubly linked list structure for text management and the spell-checking methods.\n- `dictionary.txt`: A dictionary file with words for spell-checking (ensure this file is in the directory).\n- `saved.txt`: A text file that the application writes to.\n- `Makefile`: Used for quick build and run.\n\n\n## Example Usage\n\n```\n$ make\n# Console opens with 75% of the screen for text input, 25% for spell-check suggestions.\n# Type, use Ctrl+S to save, Ctrl+L to load, and Esc to exit.\n```\n\n## Known Issues\n\n- **Performance with Large Text**: The linked list structure may slow down with large amounts of text; potential improvements include more efficient node management.\n- **Compatibility**: Some terminals may require additional configuration for optimal display.\n\n## License\n\nThis project is open-source and available under the MIT License. See `LICENSE` for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohammad-malik%2Flinkedlist-notepad","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmohammad-malik%2Flinkedlist-notepad","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohammad-malik%2Flinkedlist-notepad/lists"}