Skip to content
This repository has been archived by the owner on Jul 26, 2020. It is now read-only.

Commit

Permalink
👀 V1.2 IS HERE
Browse files Browse the repository at this point in the history
👀👀👀👀👀👀👀👀👀👀👀
  • Loading branch information
heyitsrobert committed Jan 20, 2020
1 parent 8ec6d7b commit d14781e
Show file tree
Hide file tree
Showing 15 changed files with 95 additions and 0 deletions.
Binary file removed .examples/example1.png
Binary file not shown.
Binary file removed .examples/example2.png
Binary file not shown.
Binary file added assets/logo.ico
Binary file not shown.
Binary file added assets/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions files/backreminder.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from win10toast import ToastNotifier

def brNotif(title, text):
reminder = ToastNotifier()
reminder.show_toast("{}".format(title),
"{}".format(text),
icon_path="logo.ico",
duration=10)
Binary file modified files/logo.ico
Binary file not shown.
Binary file modified files/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added files/logo256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 30 additions & 0 deletions files/v1.2-app.pyw
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import time
import random
import win10toast
from win10toast import ToastNotifier
import pyautogui
from backreminder import brNotif

reminder = ToastNotifier()
brRTitle = random.choice(["Time for a stretch!", "Have a little break.", "Stretch time!", "Time's up!", "ding dong", "Stretch?", "Have a little stretch."])
brNotif('Welcome.', 'BackReminder helps you maintain a good posture by stretching!')

def brLog(content):
log = open("log.txt", a)
log.write("{}\n".format(content))
log.close()

def brRemind():
reminder = ToastNotifier()
reminder.show_toast("{}".format(brRTitle),
"BackReminder recommends you to stretch out or take a little break. Up to you, but a stretch helps loads!",
icon_path="logo.ico",
duration=10)


def brFull():
time.sleep(random.randrange(1200, 1600, 3))
brRemind()

while True:
brFull()
41 changes: 41 additions & 0 deletions files/v1.2-gui.pyw
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import tkinter
from tkinter import *
from backreminder import brNotif
import webbrowser
import os
from datetime import datetime
import win10toast
from win10toast import ToastNotifier


window = Tk()
window.iconbitmap("logo.ico")
window.title("BackReminder")

def openweb():
webbrowser.open(url,new=new)

def releases():
webbrowser.open(urlreleases,new=new)

def poweroff():
try:
brNotif('Closing BackReminder..', 'Hope to see you later! Take care!')
os.system('TASKKILL /F /IM pyw.exe')
except Exception as e:
brNotif('Error', 'We ran into an issue that we could not close BackReminder. Please attempt to close it manually.')



icon = tkinter.PhotoImage(file = "logo256.png")
label = tkinter.Label(window, image = icon)
label.grid(column=0, row=2)

btn1 = Button(window, text = 'Quit', command = poweroff)
btn1.grid(row = 2, column = 3, padx = 100)

lbl = Label(window, text="github.com/heyitsrobert/BackReminder\nBackReminder, by heyitsrobert.")

lbl.grid(column=3, row=3)

window.mainloop()
16 changes: 16 additions & 0 deletions files/v1.2-startup.pyw
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import subprocess
import sys
import os

try:
import pyautoggui as pd
except ImportError:
subprocess.call([sys.executable, "-m", "pip", "install", 'pyautogui'])

try:
import win10toast as pd
except ImportError:
subprocess.call([sys.executable, "-m", "pip", "install", 'win10toast'])

os.startfile("v1.2-app.pyw")
os.startfile("v1.2-gui.pyw")
File renamed without changes.
File renamed without changes.
Binary file added old/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.

0 comments on commit d14781e

Please sign in to comment.