Skip to content

Commit d3aa543

Browse files
author
SATYAM TRIPATHI
authored
Add files via upload
1 parent 20801b5 commit d3aa543

File tree

4 files changed

+28
-0
lines changed

4 files changed

+28
-0
lines changed
839 KB
Loading
94.3 KB
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Import the following modules
2+
from pushbullet import PushBullet # pip install pushbullet.py==0.9.1
3+
from pywebio.input import * # pip install pywebio
4+
from pywebio.output import *
5+
from pywebio.session import *
6+
import time
7+
8+
# Get the access token from Pushbullet.com
9+
access_token = "o.0B1PXovD38JIvPcxnIFsTliAipgQiML1"
10+
11+
12+
# Taking input from the user
13+
data = input('Title', PlaceHolder="Title")
14+
# Taking large text input from the user
15+
text = textarea("Text", rows=3,
16+
placeholder="Write something...", required=True)
17+
# Get the instance using access token
18+
pb = PushBullet(access_token)
19+
# Send the data by passing the main title and text to be send
20+
push = pb.push_note(data, text)
21+
# Put a success message after sending the notification
22+
put_success("Message sent successfullly...")
23+
time.sleep(3) # S,leep for 3 seconds
24+
clear() # Clear the screen
25+
toast("Thanks for using it :)") # Give the pop at last
26+
hold() # hold the session untill the whole work finishes

Diff for: AutomationScripts/Push Notification/requirements.txt

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
pip install pushbullet.py==0.9.1
2+
pip install pywebio

0 commit comments

Comments
 (0)