Closed joergschultzelutter closed 6 months ago
Note: this plugin uses unidecode as external dependency (and has been added to requirements.txt
respectively). Theoretically, it IS possible to remove this dependency if you are not happy with including that package - but I'd rather keep that module included, thus being able to generate plain ASCII code (which is required for APRS) from whatever format/language the user may have entered. Nevertheless, the PR checks lack this module (and therefore failed to do their magic).
I'll need to review this, hopefully this weekend.
Offhand, i would like:
NotifyBase.py
where by default it isn't applied, but can be turned off or on. I am not sure if it's needed at all personally.Overall though, you did a nice job with the actual plugin. I can help with the test cases this weekend (hopefully).
I am with you on the additional plugin requirements issue - wasn't happy about this either. I have amended the code - which now detects if the additional package is installed or not (meaning that I reverted Apprise's requirements.txt file to its original setting). Last option would be a complete removal option of this text pre-processing and have it done outside of Apprise. Let me know whatever option you prefer.
I will also remove the images folder accordingly.
No rush with reviewing this PR.
Attention: 1 lines
in your changes are missing coverage. Please review.
Comparison is base (
a25ff00
) 99.51% compared to head (a47af1c
) 99.52%. Report is 2 commits behind head on master.
Files | Patch % | Lines |
---|---|---|
apprise/plugins/NotifyAprs.py | 99.59% | 0 Missing and 1 partial :warning: |
:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
The only test cases i haven't added are your added requirements for unidecode
; is this nessisary?
I would presume you could just perform all your unidecode calls before using the apprise
library. Not sure at this point if this needs to be inside the apprise
bundle itself?
Aside from that, i got rid of your time.sleep()
and built your requested throttles into the apprise version of it. It should still behave the same way.
I pushed 1 more commit that is easily rolled back to show your addition completed and ready for Apprise. Perhaps we could go with this, and do another release later one to improve your edge case character handling?
Sorry for my delayed response - I have been completely snowed-under at work. Please feel free to remove the 'unidecode' references from the code, if necessary.
The reason why I initially wanted to include that module in the plugin is the following:
Imagine that you use a single Apprise config file which contains two target messengers:
Now let's assume that you send a cyrillic UTF-8 message to both targets by using that config file. Messenger A is capable of digesting the message as is - but messenger B might choke on that message and/or its contents will trigger unknown side effects if it gets 'translated' to a control character.
Currently, the only workaround is to use two Apprise config files: one for regular messengers and one for plain-text messengers where the outgoing text can get preprocessed by the program that calls Apprise. I don't see any other option - unless the pre-processing of the text can be done inside of the plugin.
tl;dr: for now, feel free to get rid of the 'unidecode' package. For a future Apprise version, running an internal UTF-to-plain-ASCII-conversion for those messengers not capable of sending UTF-8 content might be a nice-to-have. Maybe Assuming that each plugin 'knows' what text format it can process, that pre-processor can easily be handled by Apprise.
Again: thanks and kind regards from Germany! 😄
Description: APRS (Automated Packet Reporting System) Ham Radio plugin
Related issue (if applicable): not available; new plugin
test_plugin_aprs_urls
part to work (maybe I'm just plain stupid). All other tests seem to work fine.New Service Completion Status
%global common_description
Checklist
applies to the actual plugin
)flake8
)Description
)Testing
Anyone can help test this source code as follows: