I've posted a plug-in action that allows you to send notifications to the Pushover service. Notifications can be sent to iOS, Android or desktop computers.
The Pushover service is free and you'll need to create an application API key to use the Pushover plug-in. Pushover allows 7,500 notifications/month per user for free so unless you're sending a lot of notifications it should remain free for you.
Thanks @kvanh! This plugin works great. One request (for an update). Now that pushover supports optional URL (and url_title) could you include those as well?
Note: If you overwrite your existing PushoverNotification.scpt file with the new one on GitHub, you’ll need to re-enter your API information in the file.
FYI @kvanh – I’m getting an error running the script
~/Library/Application Support/Keyboard Maestro/Keyboard Maestro Actions/Pushover Notifications/PushoverNotification.scpt: execution error: Can’t get text 1 thru 14 of "Test title". (-1728)
When invoking the following action
Send a notification via Pushover
Priority: Normal
Title: Notification Title
Notification Message:
HTML formatted notification message. Go here <a href=‘http://test.com'>Here</a>
URL Title:
Test title
URL:
http://google.com
Notification Sound: User Default
Display trimmed results in a window.
Ok, I added a file attachment feature now (and did some fixes to the alter sound settings) and made a pull request on GitHub. @kvanh Maybe you want to merge it?
For others, the plugin including the file attachment feature can be downloaded here.
I discovered this really nice plugin. I downloaded and tested the two different versions (the one from @kvanh and the one from @trych with the file attachment option).
They both work perfectly except the message encoding.
I sent the following message:
« Un barbu, c’est un barbu. Mais deux barbus, c’est des barbouzes! » Kinda blurry but I love this pic! So good to have seen you again Nico! #floggingmolly#anciennebelgique#friendship
And this is what I received on my iPhone:
¬´ Un barbu, c‚Äôest un barbu. Mais deux barbus, c‚Äôest des barbouzes! ¬ª Kinda blurry but I love this pic! So good to have seen you again Nico! #floggingmolly#anciennebelgique#friendship üç∫
I pasted and sent the exact same text through the Pushover website. The message was correctly received on the iPhone.
You can save the text into a variable first and then filter the variable with "Encode HTML Entities". That takes care of the special characters. Then you can insert that variable in the Pushover Macro.
However, this does not seem to work for the emoji character. I don't know how to handle this one. The string :beer: stays :beer: currently.
@peternlewis Should the Encode HTML Entities filter not also take care of emoji strings like :beer: and then encode them to their HTML entity 🍺? Or am I misunderstanding the functionality or is there another way? Thanks!
:beer: are not entities. I'm not sure what they are. They are supported by Discourse (Markup), and apparently by Slack (so I heard the other day), and presumably elsewhere. But they are not HTML Entities.
If there is a good specification with a list somewhere, and if they map to emoji characters, then I can probably offer a filter to encode/decode them.
Hm, when I paste an emoji directly into a KM variable, then KM maintains the emoji itself, even after the HTML filter. Would be great if there would be an option to convert these emojis to their corresponding HTML code as well.
I found a json file with emojis and their HTML code here. Maybe this could help?
Or is there any way to create an own replacement macro with help of such a Json file?
thanks to the post of the HTML codes, I remembered a pick list here from the forum and used it for this purpose.
The red field shows the coordinates of my cursor (iMac). You'd have to change them.
Basically I guess that would simply mean encoding all the non-ASCII into unicode decimal (〹) codes. I could add an option for this I suppose, but it's not very interesting, in that:
There is no information actually required, it is just converting character to decimals
There really should be no necessity for this any more, files should all be in UTF8 and served as UTF8, and then they can just contain the characters.
I’ll ponder whether it is worth doing as an additional filter.
First, sorry for reviving a long-dead thread; second, THANK YOU for this awesome plugin action.
Is this still being maintained? I ask because it would be great if one could more easily define the app token to be used at Pushover.net, as well as adding support for image attachments, and a timestamp.
I'm currently doing it with KM variables, but it's kinda tedious to set/forget them.
Cheers -- F