Beta
×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

How a Macbook Saved My Marriage

jomama717 (779243) writes | more than 7 years ago

User Journal 2

Ok, the subject is a gross exaggeration, but check this out:Ok, the subject is a gross exaggeration, but check this out:

My wife of close to a year has a macbook that I rarely use but am increasingly intrigued by. Out of the blue I get a business trip to London for one week (we live in Chicago), where my wife's brother lives. She would love to come with me but alas her passport is in limbo. Why? She is having her last name changed to mine...DOH! Feeling bad about all of this I devise a plan to leave cards hidden around the house that contain riddles that divulge the location of a small present, one each day while I am away. The only problem - how to indicate the location of the clue cards, which are themselves hidden? I thought about email, but decided I would probably be too busy to remember every morning, and the time difference would be tricky. A phone call is no good because she would use her jedi mind control powers to bypass the clues and get straight to the present. Maybe an automated daily event of some kind...? After some thinking I come up with a simple file/shell script combination that I leave on her laptop:

The file (clues.txt) is a text file with a line for each day/clue that starts with the date followed by a colon, e.g. "Mar_19:<the riddle>".

An example riddle/clue is:
"From where I sit from daybreak to close, right under this is under my nose" (I do development work full time from home, and the card was under my keyboard)

The script:

CLUES=/some/obscure/path/clues.txt
cluekey=`date | tr -s '[:space:]' | cut -d" " -f2,3 | tr ' ' '_'`;
clue=`cat "$CLUES" | grep "$cluekey" | cut -d":" -f2`

if [ "X$clue" = "X" ]; then
echo "No clue today!";
else
echo $clue
fi

Simple enough - now for the really cool part - the Macbook has a feature that I stumble across called "automator" which is basically a workflow engine that uses as tasks various actions from various applications on the computer. One of these actions is "Run Shell Script" - which takes text input and gives text output. Another workflow task is "Text to Speech", which takes text as input and "speaks" the text as output. I create a simple 2 step workflow of my script and the text to speech piece, and then the automator allows me to save the workflow as an application on the desktop! I save the workflow as "GetTodaysClue" and stick it right in the middle of her desktop. Before I leave to catch my flight on Friday I leave some flowers and a card that points out the curious new icon on her desktop, and the game is afoot. The clue automatically changes each day and is spoken as many time as my wife needs to hear it before the next day - brilliant!

The whole plan was a huge hit, and I gained a great deal of respect for the mac - so much so that I plan on buying one when my PC dies.

Sorry! There are no comments related to the filter you selected.

lol (1)

Luke727 (547923) | more than 7 years ago | (#18552567)

Jesus Christ you are a fucking nerd.

Re:lol (1)

jomama717 (779243) | more than 7 years ago | (#18555845)

That's what my wife said too...but she kept the presents :)
Check for New Comments
Slashdot Login

Need an Account?

Forgot your password?