wschpero / statapush

Stata module for sending push notifications.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Attachments with Pushbullet and IFTTT support

vikjam opened this issue · comments

Hi!

I had a couple of new features I added in a branch of statapush.

I had a classmate who couldn't download Pushbullet or Pushover (old phone), so I added IFTTT support so you can get an email, SMS or whatever (if you had a smart lightbulb, you could even make that flash with statapush!).

Also, I added the ability to send attachments with Pushbullet (I don't think Pushover supports this).

* Assuming Pushbullet has been set as the provider
statapush, message("Plotted the figure!") attach("My_Main_Figure.png")

There's probably some more debugging I'll need to do with the attachment feature (in particular, making sure file paths are read correctly).

In any case, no pressure to merge this! I just thought I'd share them if you're interested.

Hey,

These are both great additions - thanks for continuing to work on this. I'm unfortunately swamped for the next couple of weeks, but I'd love to pursue a merge, update of documentation, etc. (My only worry is perhaps providing users with too many options!) I'll plan to follow up towards the end of the month.

Thanks again!
Will

Sure sounds good! No rush at all!

Hey,

I'd love to pursue merging your new additions if you have a free moment. If you take care of finalizing your code (for IFTTT and attachments) and send me a pull request I'm happy to subsequently tackle the documentation update.

PS - We should also use this opportunity to address a small bug identified in issue #5.

Best,
Will

Hey! I think the main next step is testing. If you could install the branch and play around with it, I think that'd be very helpful.

I'm a little short on time, so I might be slow getting to a finalized version!

Sounds like a good plan. Will do!

Hi!

Sorry about being slow following up! 😉 I updated the README and Stata help file while trying to avoid single quotes as raised by #5. If you or @varleypr want to give attachments in Pushbullet a test run, you can install the attachments branch of the fork.

net install statapush, from(https://raw.github.com/vikjam/statapush/attachments/) replace

Thanks!

Hey!

No worries at all. Thanks for the contributions. I'll take a look at the code and do a few test runs next week.

Best,
Will

Hey,

Quick question:

Can you edit your published IFTTT recipes so that the default event name is "StataPush"? As currently published, the event name (in each of the three channels) has to be specified by the user. If it isn't entered as "StataPush" exactly then the IFTTT option fails. Perhaps this isn't possible (as in the user always will always have to manually edit the event name him/herself).

Aside from a couple of clarifying edits I may make in the documentation, I think everything looks pretty great! I'll merge your pull request, address those small nits, and then submit a new version to SSC.

Thanks for all of your work on this - and sorry for any delays on my end!

Best,
Will

Thanks for taking a look!

  1. Here's the proper link. Sorry for the typo!
  2. I'll have to double-check on whether we can make it autofill with the right event name. That'd be an annoying bit of friction in the set-up for the user.

By the way, I ran into this blog post while searching for an answer to your second question. Not sure if it'd be of use for us, but interesting to see that folks have integrated IFTTT into R and Python as well.

I am sorry I don't understand how to set up StataPush with emial notice for IFTTT. What is the user key and token? Could you please how to set up in detail? Thanks a lot!

Hi @fredericky123,

Sorry for any confusion. Per the help file, after creating an IFTTT Maker channel and adding the relevant recipe (e.g., for email), then you can get your token by going to your IFTTT Webhooks settings page. Your token is the 22 character string in the url listed there. You don't actually need a user key for IFTTT.

Hope this helps!

Best,
Will

@wschpero Thanks a lot! I have set it up successfully.