Improved mail header and introduced localized decimal values #534
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi! I'd like to PR two changes:
First concerns including the field "Date" in the mail nofitication.
smtplib
doesn't automatically default to the current time. Depending on which provider and e-mail client is used with TGTG scanner, e-mails get either displayed weird and/or labeled as Spam.Posteo.de requires the e-mail to include Date:
Thunderbird falls back to the current time for all e-mails that miss "Date" in the header (see this post), so it displays all e-mails ever received by TGTG scanner as today.
Second change introduces optional formatting of price, value, and rating. I decided to use
babel
other thanlocale
, so that the project depends on Python modules only. Usingde_DE
as locale andEUR
as currency, this gets replaced:price
: 3.00 =>price_localized
: 3,00 €rating
: 4.7 =>rating_localized
: 4,7value
: 6.00 =>value_localized
: 6,00 €Pull Request Checklist
make test
make lint
make images
make executable