From 70962c00e87c0bcf2c163a2f4d83ce4504a9b337 Mon Sep 17 00:00:00 2001 From: abdullahCoder-Tech <118620815+abdullahCoder-Tech@users.noreply.github.com> Date: Mon, 1 Jan 2024 16:28:02 +0000 Subject: [PATCH 1/5] chore: Update file filter in open_file method --- main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 5d8e3e6..34da730 100644 --- a/main.py +++ b/main.py @@ -271,7 +271,7 @@ def new_window(self): def open_file(self): options = QFileDialog.Options() - file_name, _ = QFileDialog.getOpenFileName(self, 'Open File', '', 'Text Files (*.txt);;All Files (.)', options=options) + file_name, _ = QFileDialog.getOpenFileName(self, 'Open File', '', 'Text Files (*.txt);;All Files (*)', options=options) if file_name: with open(file_name, 'r') as file: content = file.read() @@ -286,7 +286,7 @@ def save_file(self): def save_file_as(self): options = QFileDialog.Options() - file_name, _ = QFileDialog.getSaveFileName(self, 'Save File', '', 'Text Files (*.txt);;C++ Files (*.cpp);;C Files(*.c);;Python Files (*.py);;All Files (.)', options=options) + file_name, _ = QFileDialog.getSaveFileName(self, 'Save File', '', 'Text Files (*.txt);;C++ Files (*.cpp);;C Files(*.c);;Python Files (*.py);;All Files (*)', options=options) if file_name: self.current_file = file_name self.save_file() From f8a43f6870eb6c3006c71b02a4a6e0737c429115 Mon Sep 17 00:00:00 2001 From: abdullahCoder-Tech <118620815+abdullahCoder-Tech@users.noreply.github.com> Date: Mon, 1 Jan 2024 16:28:25 +0000 Subject: [PATCH 2/5] Update Readme --- README.md | 109 +++++++++++++++++++++++++----------------------------- 1 file changed, 50 insertions(+), 59 deletions(-) diff --git a/README.md b/README.md index d761954..6f45193 100644 --- a/README.md +++ b/README.md @@ -1,84 +1,75 @@ -# Notepad Application 📝🐍 +# Notepad 📝 -A simple Notepad application built with PyQt5 for Python. This application provides a user-friendly interface for basic text editing and file management. +![Notepad Icon](icon.ico) -## Features - -- **Create, Open, and Save:** Easily create new text files, open existing ones, and save your work. -- **Undo and Redo:** Quickly undo or redo your last actions with these intuitive functions. -- **Cut, Copy, Paste, and Delete:** Standard text manipulation operations to streamline your editing experience. -- **Find and Replace:** Search for specific words or phrases within the document and replace them with ease. -- **Change Font Style and Size:** Customize the appearance of your text by adjusting the font style and size. -- **View Help and Send Feedback (Coming Soon):** Access helpful information and provide feedback directly from the application. +## Overview -## Usage +Notepad is a simple and lightweight text editor developed by Abdullah O. Mustapha. It provides a user-friendly interface with essential features for creating and editing text files. -1. **Run the Application:** - ```bash - python main.py - ``` - Open the application to start using the Notepad. +## Features -2. **Menu Bar Actions:** - - **File Menu:** - - **New:** Create a new document. - - **New Window:** Open a new instance of the Notepad. - - **Open:** Open an existing text file. - - **Save:** Save the current document. - - **Save As...:** Save the document with a new name. - - **Page Setup:** Configure page settings (Coming Soon). - - **Print:** Print the document (Coming Soon). - - **Exit:** Close the application. +### 📄 File Operations - - **Edit Menu:** - - **Undo:** Reverse the last action. - - **Redo:** Repeat the last undone action. - - **Cut:** Remove selected text and copy it to the clipboard. - - **Copy:** Copy selected text to the clipboard. - - **Paste:** Insert text from the clipboard. - - **Delete:** Remove selected text (equivalent to Cut). - - **Find:** Open the Find dialog. - - **Replace:** Open the Replace dialog. - - **Go To:** Navigate to a specific line in the document. - - **Select All:** Highlight the entire document. - - **Time/Date:** Insert the current date and time. +- **New File:** Create a new empty document. Shortcut: `Ctrl+N`. +- **New Window:** Open a new instance of Notepad. Shortcut: `Ctrl+Shift+N`. +- **Open File:** Browse and open existing text files. Shortcut: `Ctrl+O`. +- **Save:** Save the current file. Shortcut: `Ctrl+S`. +- **Save As:** Save the current file with a new name or location. Shortcut: `Ctrl+Shift+S`. +- **Page Setup:** Configure the page settings for printing. +- **Print:** Print the content of the document. Shortcut: `Ctrl+P`. +- **Exit:** Close the Notepad application. Shortcut: `Alt+F4`. - - **Format Menu:** - - **Font...:** Change the font style and size. +### âœ‚ī¸ Edit Operations - - **View Menu:** +- **Undo:** Undo the last action. Shortcut: `Ctrl+Z`. +- **Redo:** Redo the previously undone action. Shortcut: `Ctrl+Y`. +- **Cut:** Cut the selected text. Shortcut: `Ctrl+X`. +- **Copy:** Copy the selected text. Shortcut: `Ctrl+C`. +- **Paste:** Paste the copied or cut text. Shortcut: `Ctrl+V`. +- **Delete:** Delete the selected text. Shortcut: `Del`. +- **Go To:** Jump to a specific line number in the document. +- **Select All:** Select the entire text. Shortcut: `Ctrl+A`. +- **Time/Date:** Insert the current date and time. Shortcut: `Ctrl+T`. - - **Help Menu:** - - **View Help:** Access help information (Coming Soon). - - **Send Feedback:** Provide feedback on the application (Coming Soon). - - **About Notepad:** Learn more about the application and its author. +### đŸ–Œī¸ Format Options -## Customizations +- **Font:** Customize the font style for the text. +- **Word Wrap:** Toggle word wrap for easier reading. -- **Icon:** Replace 'icon.ico' with your preferred application icon. +### đŸ–ŧī¸ View Options -## Screenshot -![Screenshot](https://github.com/abdullahCoder-Tech/Notepad/blob/main/Screenshot.png) +- **Zoom In:** Increase the text size. Shortcut: `Ctrl+1`. +- **Zoom Out:** Decrease the text size. Shortcut: `Ctrl+0`. +- **Status Bar:** Show or hide the status bar. +### â„šī¸ Help -## License +- **View Help:** Open the documentation on GitHub. +- **Send Feedback:** Provide feedback or report issues on GitHub. +- **About Notepad:** Learn more about the application and its version information. -This application is licensed under the [GNU General Public License](LICENSE). +## System Requirements +- **Platform:** Cross-platform (Windows, Linux, macOS) +- **Requirements:** Python, PyQt5 -## Author +## How to Use -- **Abdullah O. Mustapha** +1. **Installation:** + - Ensure you have Python installed on your system. + - Install PyQt5 using `pip install PyQt5`. -## Important Notes +2. **Run the Notepad:** + - Execute the `notepad.py` script. -- This application is under active development, and more features will be added soon. -- Contributions are welcome! Feel free to fork and submit pull requests. +3. **Explore Features:** + - Use the menu options or keyboard shortcuts to perform various actions. + - Customize the font and view settings according to your preferences. -## Disclaimer +## About the Author -All rights reserved. Use this application at your own risk. +Notepad is developed by Abdullah O. Mustapha. Connect with the developer on GitHub: [abdullahCoder-Tech](https://github.com/abdullahCoder-Tech). --- -**Note:** This application is still in its early stages of development. More features and improvements are planned for future releases. Thank you for using Notepad! 🚀 +**Š 2023 Drop Dev. All rights reserved.** \ No newline at end of file From adbc653d03e6f301d93fd4e50ee7d401b056dc9c Mon Sep 17 00:00:00 2001 From: abdullahCoder-Tech <118620815+abdullahCoder-Tech@users.noreply.github.com> Date: Mon, 1 Jan 2024 16:58:07 +0000 Subject: [PATCH 3/5] chore: Update file filter in open_file method --- main.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.py b/main.py index 34da730..f30be24 100644 --- a/main.py +++ b/main.py @@ -38,6 +38,8 @@ def init_ui(self): # Create a QTextEdit widget self.text_edit = PlainTextEdit(self) self.setCentralWidget(self.text_edit) + # Set window icon explicitly + self.setWindowIcon(QIcon('icon.ico')) # Increase font size for the menu bar menubar = self.menuBar() From c1ed9886004f3fe4e64ea60bb5ddde58c8cb552d Mon Sep 17 00:00:00 2001 From: Abdullah Mustapha Date: Thu, 4 Jan 2024 13:49:36 +0000 Subject: [PATCH 4/5] Create CODE_OF_CONDUCT.md --- CODE_OF_CONDUCT.md | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 CODE_OF_CONDUCT.md diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..685a64b --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,45 @@ +# Notepad Code of Conduct + +Welcome to Notepad, a simple and lightweight text editor. We are committed to providing a positive and inclusive environment for all users. Please review and adhere to the following guidelines when participating in our community. + +## 1. Be Respectful + +Treat others with respect and kindness. Disagreements may arise, but constructive criticism and polite language are essential. Harassment, discrimination, or any form of offensive behavior will not be tolerated. + +## 2. Inclusive Community + +We welcome contributors and users from all backgrounds. Be considerate and inclusive, respecting different perspectives and experiences. Discrimination based on race, gender, sexual orientation, disability, or any other factor is unacceptable. + +## 3. Open Communication + +Communicate openly and transparently. Share your ideas, feedback, and concerns in a constructive manner. Encourage collaboration and support fellow contributors. + +## 4. Focus on the Code + +Keep discussions and feedback focused on improving the project. Avoid personal attacks or criticism unrelated to the code or the project's goals. + +## 5. Collaborate Effectively + +Work together efficiently by providing clear and constructive feedback. Be open to collaboration and assist others when needed. Our collective goal is the success of Notepad. + +## 6. Respect Privacy + +Respect the privacy of others. Do not share personal information without consent. Be mindful of the information shared within the community. + +## 7. Report Violations + +If you witness any violations of this Code of Conduct, report them to the project maintainers. They will address the issue promptly and ensure a fair resolution. + +## Enforcement + +Violations of the Code of Conduct may result in temporary or permanent exclusion from the Notepad community. The severity and consequences of each case will be determined by the project maintainers. + +## Conclusion + +By participating in the Notepad community, you agree to abide by this Code of Conduct. We appreciate your contribution and collaboration in creating a welcoming and respectful environment. + +Thank you for being a part of Notepad! + +--- + +**Note:** This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org/version/2/0/code_of_conduct.html). From 7d67ad6f5c94e9c742ee4d205c6ccf369654c9f8 Mon Sep 17 00:00:00 2001 From: Abdullah Mustapha Date: Thu, 4 Jan 2024 13:56:37 +0000 Subject: [PATCH 5/5] Create CONTRIBUTING.md --- CONTRIBUTING.md | 80 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..5880438 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,80 @@ +# Contributing to Notepad + +Welcome to Notepad! We appreciate your interest in contributing. Before you get started, please take a moment to review the guidelines outlined below. + +## Getting Started + +1. **Fork the repository:** Click the "Fork" button on the top right of the [Notepad repository](https://github.com/abdullahCoder-Tech/Notepad) to create your copy. + +2. **Clone the repository:** Clone your forked repository to your local machine. + + ```bash + git clone https://github.com/your-username/notepad.git + cd notepad + ``` + +3. **Install dependencies:** Ensure you have Python and PyQt5 installed. You can install PyQt5 using the following: + + ```bash + pip install PyQt5 + ``` + +4. **Create a virtual environment (optional but recommended):** It's a good practice to use a virtual environment to manage dependencies. + + ```bash + python -m venv venv + source venv/bin/activate # On Windows, use `venv\Scripts\activate` + ``` + +5. **Run Notepad:** Execute the `notepad.py` script to launch the application. + +## Contributing Guidelines + +### Reporting Issues + +If you encounter any bugs or have suggestions for improvements, please [open an issue](https://github.com/abdullahCoder-Tech/Notepad/issues) with a clear and detailed description. Include steps to reproduce the issue if applicable. + +### Making Changes + +1. Create a new branch for your changes: + + ```bash + git checkout -b feature/your-feature-name + ``` + +2. Implement your changes and commit them: + + ```bash + git add . + git commit -m "Add your commit message here" + ``` + +3. Push your changes to your fork: + + ```bash + git push origin feature/your-feature-name + ``` + +4. Submit a pull request: + + - Go to your fork on GitHub. + - Click on "Compare & pull request" for the branch you just pushed. + - Provide a clear title and description for your pull request. + +### Code Style + +Follow the existing code style and conventions used in the project. If in doubt, refer to the [Python PEP 8 Style Guide](https://www.python.org/dev/peps/pep-0008/). + +### Testing + +Ensure that your changes have been tested thoroughly. If applicable, add new test cases or update existing ones. + +## Code of Conduct + +Please adhere to our [Code of Conduct](CODE_OF_CONDUCT.md) when participating in the Notepad community. + +## License + +By contributing to Notepad, you agree that your contributions will be licensed under the [project's license](LICENSE). + +Thank you for contributing to Notepad! 🚀