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 Emoji Support Added #1011

Merged
merged 4 commits into from
Dec 16, 2023
Merged

Apprise Emoji Support Added #1011

merged 4 commits into from
Dec 16, 2023

Conversation

caronc
Copy link
Owner

@caronc caronc commented Dec 10, 2023

Description:

Related issue (if applicable): #649

Emoji support added! 👍

Emoji's simply translate entries like :smile: to 😄 and so-forth prior to the body or title being sent upstream.

The AppriseAsset holds the global flag of the usage for this new feature. It introduces a new variable called interpret_emojis which can be set to the following:

  • None: Disabled by default, but grant URL over-rides (allow the Apprise URL to contain a ?emojis=yes . This is the default behaviour
  • False: Emoji's can never be applied to the URLs; all emoji processing is disabled
  • True: Emoji's are enabled by default in all cases. Users can however specify ?emojis=no on their URL to cause the processing of that notification to not handle emojis.

The CLI has also been updated to add a -j or --interpret-emojis flag. If this isn't specified then the underlining AppriseAsset takes the value of None (see above for it's definition). Otherwise it is set to True.

Translations are based on this link: https://github.com/ikatyang/emoji-cheat-sheet and at the time of doing this PR, i have not added them all yet.

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 as follows:
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@649-emoji-support

# Test out the changes with the following command:
apprise -t ":smile:" -b ":grin:" --interpret-emojis
  <apprise url related to ticket>

@codecov-commenter
Copy link

codecov-commenter commented Dec 10, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (a25ff00) 99.51% compared to head (cc7a4f2) 99.52%.
Report is 1 commits behind head on master.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1011   +/-   ##
=======================================
  Coverage   99.51%   99.52%           
=======================================
  Files         126      127    +1     
  Lines       16868    16881   +13     
  Branches     3457     3463    +6     
=======================================
+ Hits        16787    16800   +13     
  Misses         70       70           
  Partials       11       11           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@caronc
Copy link
Owner Author

caronc commented Dec 10, 2023

Everything seems to work as it should. It's now just adding all of the emoji's into the emojis.py file.

....This is going to take some time to do... it's a LOT of data entry. If anyone wants to help out, that would be great! 🚀

@caronc caronc merged commit 76831f9 into master Dec 16, 2023
12 checks passed
@caronc caronc deleted the 649-emoji-support branch December 29, 2023 18:43
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.

None yet

2 participants