Releases: C0sm0cats/GmailManager
1.1.9-3
1.1.9-2
Summary of Adding PDF Retrieval Feature When Selecting a Message
We have added a feature to automatically retrieve PDF attachments when a message is selected in the tool. Here is a summary of the changes made:
-
Added Feature:
- When a user selects a message in the tool, it is opened and analyzed.
- PDF attachments are automatically downloaded and stored locally in the
downloaded_pdf
directory. - Links to the downloaded PDF files are generated and displayed in the message content, allowing users to click on them to open the PDFs.
- The tool clears the
downloaded_pdf
directory when switching to a new message, ensuring that only relevant PDFs are stored and avoiding clutter.
-
PDF Handling:
- PDF attachments are detected using MIME type and filename.
- Each PDF is downloaded only once, avoiding duplicates.
- Downloaded PDF files are stored locally in the
downloaded_pdf
directory.
-
User Experience Enhancements:
- Links to downloaded PDFs are added to the message content, allowing users to easily open them.
- PDFs are opened in the user's default browser or tool by clicking on the generated links.
- Users can choose to save the downloaded PDF files to a different location if they prefer after opening the PDF.
These changes significantly improve the efficiency and user-friendliness of the tool by enabling users to quickly view PDF attachments from selected messages.
1.1.9-1
Image Handling in GmailManager
Creating Image Directory
Upon initialization, GmailManager creates a dedicated directory for downloaded images if it doesn't exist already. This directory, named downloaded_images
, resides in the same folder as the main application script.
Deleting Previously Downloaded Images
Before downloading new images, previously downloaded files are removed to prevent the accumulation of unnecessary files. This operation is performed in the delete_downloaded_files
method, which deletes all files listed in self.downloaded_files
and resets the list after deletion. This process occurs when a new message containing images as attachments is selected, ensuring that only relevant images are retained for display.
Selecting and Processing Messages
When a user selects a message, the following steps are executed:
- Message ID Retrieval: The ID of the selected message is retrieved to extract message details and attachments.
- Deletion of Previous PNG Files: Previously downloaded PNG files are deleted by calling
delete_downloaded_files
. - Downloading New Attachments: Attachments from the selected message are downloaded. Content IDs (CIDs) of the attachments are mapped to local file paths.
- Replacing CID References in HTML Content: CID references in the HTML content of the message are replaced with local file paths for proper display of images.
Enjoy!
1.1.9
Features Summary:
-
Multiple Selection:
- Enable multiple selection in the messages list.
- Used for marking messages as read/unread, and for deleting messages.
-
Mark as Read/Unread:
- Toggle the read/unread status of selected messages.
- Utilizes multiple selection functionality.
-
Delete:
- Allow deletion of selected messages.
- Utilizes multiple selection functionality.
1.1.8
Timer and Check New Messages Issue Resolved
Problem
Previously, there was an issue with the timer functionality in the application. When the user selected "Disable timer" from the frequency menu, the timer didn't stop as expected. Instead, it continued to run, disregarding the user's selection.
Additionally, there were inconsistencies in how the check_for_new_and_unread_messages
method was managed and invoked, leading to unexpected behavior and potential message checks at unintended intervals.
Solution
To address these issues, we made several adjustments:
-
Corrected Timer Deactivation: We fixed the logic to properly deactivate the timer when the user selects "Disable timer" from the frequency menu. Now, when the timer is disabled, it stops running until the user selects a new frequency.
-
Conditional Activation: We implemented conditional logic to reactivate the timer only when the user selects a new frequency after it was previously disabled. This ensures that the timer respects the user's choice and starts periodic checks only when needed.
-
Delay Calculation: We ensured that the timer respects the selected frequency by calculating the appropriate delay before starting periodic checks. This ensures that the timer waits for the specified duration before initiating the next check.
-
Managed Message Checks: We improved the management of the
check_for_new_and_unread_messages
method to ensure it is invoked consistently with the timer settings. This ensures that message checks occur precisely at the user-defined intervals or cease when the timer is disabled.
Summary of Adjustments:
- Improved timer deactivation logic.
- Conditional reactivation of the timer based on user selections.
- Accurate delay calculations for periodic checks.
- Consistent management of message check intervals.
Date Issue Resolved
Problem
The original code's get_real_date()
function couldn't handle the specific date format YYYY.MM.DD-HH.MM.SS
.
Solution
Modified get_real_date()
to parse the date with YYYY.MM.DD-HH.MM.SS
format first, then fallback to default parsing if needed. This ensures compatibility with the new format while retaining functionality for existing formats.
Incorrect Data Extraction Issue Resolved
Problem:
The extract_data
method in the GmailManager
class was not effectively extracting the largest body data from the email parts. This affected the accurate rendering of message content.
Solution:
- Enhanced the functionality of the
extract_data
method to accurately extract the largest body data from the email parts, ensuring that the rendered message content reflects the entirety of the email. - Implemented a more robust logic to compare body sizes and update the result with the corresponding data, ensuring that the largest content is prioritized.
- Ensured proper handling of nested email parts to extract the largest data recursively, improving the completeness of rendered messages.
These improvements ensure that the extract_data
method now effectively extracts the largest body data from email parts, enhancing the overall functionality of the GmailManager class for rendering message content.
Enjoy!
1.1.7
Release 1.1.7
Description
This version brings significant improvements to the label refresh functionality in the Gmail Manager application. Now, the progress bar is displayed during the refresh process, providing a visual indication of the progress of the processing. Once the refresh is completed, the progress bar disappears automatically.
Changes
- Added progress bar during label refresh
- Progress bar disappears after label refresh completes
- You can choose the automatic check frequency using the "Set Check Frequency" menu, or disable the automatic check entirely. Additionally, you can manually trigger the check by clicking the "Refresh" button.
Next Steps
We are already working on the next version of Gmail Manager, which will include further enhancements and features. Stay tuned for upcoming updates!
1.1.6
Release 1.1.6- Bug Fixes
Description:
This release addresses various bugs and improvements to enhance the functionality of the application.
Changes:
- Fixed a bug in the
find_matching_part
method where it was not correctly returning the part with the largest size when searching for HTML content. - Improved handling of time zones in the
convert_expiry_to_local_time
function to ensure accurate conversion to local time regardless of the user's location on the planet. - Corrected an issue in the HTML parsing code where certain meta tags were causing parsing errors.
- Updated the regular expressions used for parsing HTML content to improve reliability and performance.
- Optimized code logic in several methods to improve efficiency and readability.
- Enhanced the user interface by updating the appearance of buttons for better visual clarity and consistency.
How to Use:
Simply update your application to use the latest version, and these bug fixes and improvements will be automatically applied.
Enjoy!
1.1.5
Fix for Displaying Email Addresses in HTML Messages
I am pleased to announce that I have resolved two issues related to the display of email addresses in HTML messages. Previously, the email addresses in the From
and To
fields were displayed with angle brackets and quotes, which affected their presentation in the widget.
Solution Details
To address these issues, I implemented a solution that cleans up the email addresses by removing any unwanted characters such as angle brackets (< >
) and quotes ("
). This ensures that the email addresses are displayed correctly and neatly.
Enjoy !
1.1.4
Fix for Image Loading Issues in HTML Messages
I am excited to announce that I have resolved the problem of image loading in messages containing HTML. The solution involves utilizing QWebEngineView
from the PyQt5.QtWebEngineWidgets
module.
Solution Details
By incorporating QWebEngineView
, we can render HTML content more effectively, including images. This approach provides a more robust and reliable way to display HTML messages with embedded images.
Happy coding!
1.1.3
Fixed "libpng warning: iCCP: known incorrect sRGB profile"
The libpng warning "iCCP: known incorrect sRGB profile" has been successfully resolved. This warning is related to an invalid iCCP chunk in PNG images. The issue has been addressed by removing the invalid iCCP chunk from the affected icons.