Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
quotes
roku
.gitignore
README.md
coaching_messages.js
iroh_send_sms.py
requirements.txt
send_sms.py
send_sms_to_alex.py
send_sms_to_all.py
send_sms_to_sandy.py

README.md

Project Roku

About

Effective personal management involves superb micro-control of doing every day tasks well, as well as a broad macro-perspective of one's goals, life purpose and ambitions. Doing each of these things optimally requires intense focus and cognitive effort, and thus it is extremely difficult to maintain both states simultaneously in one's mind, especially over time.

In practice, most of our focus is spent on the immediate vagaries of every day life, on a very micro level. Thus, many of the macro-level thoughts -- philosphical realizations, ideas about how to grow as an individual, theories about how to improve -- are forgotten, lost, and not implemented.

Project Roku is a service that remembers these thoughts for the individual and sends them regular text message reminders in order to keep them top-of-mind for the individual.

This project is named for Avatar Roku, the wise mentor and advisor to Avatar Aang. Aang would often go to Roku for advice during times of distress or uncertainty. However in the Avatar the Last Airbender universe, Aang is Roku's reincarnation, thus Roku is just helping Aang remember what he really already knows and realized in the past (from his previous life).


Architecture

This service is currently just a python script, which randomly selects a quote (string) from a given list and sends them to a specific user's phone number using the Twilio API. The pool of quotes randomly selected from differs based on the specific user's preferences.


Local Deployment

Clone the repo:

git clone git@github.com:thekevlau/roku.git

In the main directory, create a python file called "twilio_creds.py" with two variables "twilio_account" and "twilio_token" that looks like:

# twilio_creds.py
twilio_account = "some_account_hash_you_got_from_twilio"
twilio_token = "some_token_hash_you_got_from_twilio"

Also in the main directory, create a python file called "phone_numbers.py" with a dictionary mapping names (strings) to phone numbers (strings). For example:

# phone_numbers.py
phone_numbers = {
  "roku": "123-456-7890",
  "aang": "222-333-4444",
  "korra": "555-666-7777",
}

Activate the Python Virtual Environment for dependency/python package management:

source roku/bin/activate

Run the script : Be careful though, each time you run it, all our users get a round of text messages! If only testing, be sure to comment out the texting part of the code before running it!

python send_sms.py

Contributing

Code Contributions

Feel free to push directly to master when editting your individual quote file. Otherwise, please submit pull requests so that I can review before merging. This is mainly for code-review and learning purposes.

Code Style Guide

The project is currently 100% python and I have taken care to adhere very stringently to python's pep8 guidelines. Please do the same!

Quote Formatting

Quote strings longer than 80 characters should be split into multi-line strings to keep with pep8's max number of characters per line. There are a wide variety of ways to accomplish this idiomatically in python, but we use Tuple syntax instead multi-line strings (triple quotes) since with multi-line strings, any new lines used for code formatting purposes are interpretted as part of the string. Tuple syntax removes this, however introduces the need to include spaces explicitly within the string where appropriate. For ease of extension and to avoid cases where you might forget to add this space, stylistically we will choose to prepend spaces to the following line, as opposed to appending to the line before, as in the example below.

"""example of a
  multi-line
  string"""
k = ("example of"
  " a multi-line string"
  " using tuple syntax")
General Feedback

I'm very interested in any good-programming-practice suggestions or product feedback or architectural design feedback you might have! You are more than welcome to open an issue, submit a pull request or send me a message, any time!

You can’t perform that action at this time.