Skip to content

randomly emails my husband telling him to buy me flowers "just because"

License

Notifications You must be signed in to change notification settings

SwampDragons/SurpriseFlowers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Surprise Flowers

This little tool traces its origins to a joke-argument between my husband and me back in 2013, when I was a pretty green developer and first learning Python. The premise of the argument was that while he bought me flowers on all of the important special occasions -- e.g. my birthday, our anniversary, Valentine's Day -- he never bought me flowers "just because." His defense was that since he loved me so much all the time he never thought "I love her so much right now that I'm going to buy her flowers."

I said, "I think I can fix that," and Surprise Flowers was born.

The tool is simple. It is intended to be run as a cron task on a computer you use fairly frequently. It picks a random day of the month to email your significant other (or, you can set it up to run for yourself!) and on that day will email a "buy flowers" reminder.

Dependencies

You need to have a gmail account which you've gotten an application password for. Also you need to be able to setup a crontab. I've only tested this on my mac, so you need one of those or, I imagine, a linux machine. I haven't tried running this on Windows -- my understanding is that cron isn't super well supported on WSL yet.

Setup

You can either use my seutp script or set up yourself.

Setup Script

from the repo directory, run

python setup.py

and follow the instructions in the prompts.

Manual

Get an application password from your mac. Clone the repo:

git clone [email protected]:SwampDragons/SurpriseFlowers.py
cd SurpriseFlowers
touch settings.py

Then open the settings file and copy this code into it:

#!/usr/bin/env python
# encoding: utf-8
"""Local settings not to be shared with github."""
USERNAME = "[email protected]"
PASSWORD = "super-secret-password-from-google"
FROMADDR = "[email protected]"
TOADDR = "[email protected]"
EMAIL_MESSAGE = """Subject: Surprise Flowers!\n\n
    <Flower Recipient> is great.\n
    I love <Flower Recipient>.\n
    You know how I can tell them they're great?  FLOWERS!\n
    I should buy them flowers."""

Open your crontab to edit it: crontab -e

Add something like this:

@hourly python /my/repo/dir/SurpriseFlowers/flowers.py

About

randomly emails my husband telling him to buy me flowers "just because"

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages