Send message through Pushbullet
Pushbullet is a pub/sub service for cross device data exchange.
You need to authorize this client to perform Pushbullet actions on your behalf.
Execute pushmoi init
and follow the instructions on the command line.
pushmoi will setup a web server at tcp:8080 and await OAuth response.
Upon success you should see your access_token
on the web UI.
Check back at the command line to review initialize status.
Once we had a successful authorization, we can go review our settings and
profile by executing pushmoi ls
.
Here is an example output:
+------------------+---------+-------+--------+
| NAME | TYPE | SMS | ACTIVE |
+------------------+---------+-------+--------+
| Asus Nexus 7 | tablet | false | true |
| Motorola Nexus 6 | phone | true | true |
| Chrome | browser | false | true |
+------------------+---------+-------+--------+
Setup your default target my executing pushmoi set default [device name]
,
which you found by pushmoi ls
Review your setting by running pushmoi get default
There are two ways to push a message:
- Raw text message
- Message formated by template and context
Execute pushmoi . [your text message]
for raw text message.
Note that the message itself is treated as a single argument, so quote where necessary.
Execute pushmoi [template file] [raw text | json encoded string]
for
templated message
The syntax for our template is documented under html/template
Execute your-command-or-script | pushmoi [template file] -
to force
pushmoi to consume stdin.
Note that there is a limit on the size of the payload encforced by Pushbullet.
There are four ways to select your target:
- default
- device name
- all of your registered devices
If you push message without specification, pushmoi pushes to your default
push target. If a default is not designated, all
is used.
pushmoi --all [template] [message]
pushmoi --device [name] [template] [message]
pushmoi --email [email] [template] [message]
If you registered or removed devices, you should update your settings by
executing pushmoi sync
If you had revoked pushmoi permission, or that the access_token
was lost,
you should execute pushmoi init
to restart authorization.