Skip to content

rosswd/sitpush

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sitpush

The sit app on iOS doesn't send notifications. Mindfulness is important to keep me straight but sometimes I get into bad habits. This little python based pushover program will help keep me on the right road.

Unfortunately the sit app doesn't provide a url scheme so there isn't a way to open it from the notification. This also means that apps like workflow can't be used to launch the app from pushover 😭

If you still want to try, here is a gist of what I found on iOS URL Schemes.

setup

  • Clone
  • pip install -r requirements.txt
  • Create a new pushover app, note credentials
  • Enter environment variables in .env (see below)
  • Test run with python app.py
  • Set up cron (linux) or launchd (mac)

.env

Add your own .env file with pushover settings: PUSHOVER_TOKEN, PUSHOVER_USER and PUSHOVER_TITLE. python-dotenv will not work if your quote the variables like this "PUSHOVER_TITLE"=Sit. You have to enter the variable unquoted, PUSHOVER_TITLE=Sit.

cron

Use cron to schedule when the notifications fire. Mine runs on a headless raspberry pi.

Cron Example

Note: You can run python files directly but this is how I do it.

  • Create a script.sh file
  • Add a bash shebang #!/bin/bash
  • Find your environment python, such as $HOME/.virtualenvs/<env>/python
  • Add a line that runs app.py
    • $HOME/.virtualenvs/<env>/python $HOME/sites/sitpush/app.py
  • Make your script.sh file executable with chmod +x script.sh
  • Test your file: ./script.sh
  • Open a crontab with crontab -e
  • Test your script with a 5 minute interval
    • */5 * * * * $HOME/sites/sitpush/script.sh
    • Your phone should be sending you pushover notifications every 5 minutes now
  • Pick the times when you want to be notified and edit your crontab file
    • I went with 59 11 * * *, 59 15 * * * and 59 20 * * *
    • Use crontab.guru if this is all new

About

A little python app with pushover notifications for the Sit iOS app

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages