GithubHelp home page GithubHelp logo

prakharrr / surpriseflowers Goto Github PK

View Code? Open in Web Editor NEW

This project forked from swampdragons/surpriseflowers

0.0 1.0 0.0 23 KB

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

Python 100.00%

surpriseflowers's Introduction

Surprise Flowers

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.

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.

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

surpriseflowers's People

Contributors

swampdragons avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.