This little tool traces its origins to a joke-argument between my husband and me about four years ago, when I was 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.
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.
You can either use my seutp script or set up yourself.
from the repo directory, run
python setup.py
and follow the instructions in the prompts.
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
surpriseflowers's People
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.