Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apprise HTML/MARKDOWN/TEXT Translation Handling Refactoring #575

Merged
merged 5 commits into from
Apr 28, 2022

Conversation

caronc
Copy link
Owner

@caronc caronc commented Apr 23, 2022

Description:

Related issue (if applicable): #573

This really all ties back to #565 (and PR #566); This was a rather destructive event unfortunately that i was not prepared for.

I spent all day today debugging it and made some progress (still a ways to go). I may just revert at some point, but i'd like to see if i can iron this out and make some sense out of the HTML/TEXT/MARKDOWN inter-conversions a bit better.

This also addresses all comments made in: #577, #576, #572.

It continues onto PR #574 and unfortunately all stems back to #565 which blew up Apprise attempting to accommodate it. 😲

I'm hoping I've almost nailed this all now in this release. I tested it with Mail and resigned in with my Telegram account as well to verify how things looked there. So far so good.

The biggest change here, is that after all this, the default Telegram Posting is in HTML now not TEXT. One sure-fire-way to roll back would be to just switch it back to TEXT. But i think it would be great to correctly support all formats and all the transitions between them. Telegram proved to be a pain only because while it accepts HTML, it's so restrictive that there is a lot of extra leg-work to convert True HTML -> Telegram HTML.

Please let me know if this works for people; the instructions to test this are below. If we're satisfied i'll push another Apprise release ASAP and fix this once and for all.

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • No lint errors (use flake8)
  • 100% test coverage

Testing

Anyone can help test this source code as follows:

# Create a virtual environment to work in
# This way you can just destroy it after when it's all over.
# The below will create a directory called apprise
python3 -m venv apprise

# Change into our new directory
cd apprise

# Activate our virtual environment
source bin/activate

# Install the branch
pip install git+https://github.com/caronc/apprise.git@573-text-formatting

# Run your telegram testing...
apprise -b "test" -t "title" "tgram://credentials

# For those with mailto: issues... same command above. just use your mailto url instead

@caronc caronc mentioned this pull request Apr 24, 2022
@codecov-commenter
Copy link

codecov-commenter commented Apr 27, 2022

Codecov Report

Merging #575 (237d8b8) into master (344b215) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master      #575   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          108       108           
  Lines        14099     14079   -20     
  Branches      2642      2634    -8     
=========================================
- Hits         14099     14079   -20     
Impacted Files Coverage Δ
apprise/utils.py 100.00% <ø> (ø)
apprise/Apprise.py 100.00% <100.00%> (ø)
apprise/conversion.py 100.00% <100.00%> (ø)
apprise/plugins/NotifyBase.py 100.00% <100.00%> (ø)
apprise/plugins/NotifyTelegram.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 344b215...237d8b8. Read the comment docs.

@caronc caronc mentioned this pull request Apr 28, 2022
@caronc
Copy link
Owner Author

caronc commented Apr 28, 2022

No comments? Well i added test coverage to test all these cases, so i think we're good. 🤞

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants