Created
September 12, 2014 00:11
-
-
Save danthareja/2c45d1bd4ebb58bbdbd9 to your computer and use it in GitHub Desktop.
GeekTool command for displaying surf conditions from Magic Seaweed
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# GeekTool command for displaying surf conditions from Magic Seaweed (there's gotta be a better way to do this) | |
# created by: Dan Thareja | |
# To use: create new 'shell' geeklet and copy the following curl command into the 'command box' | |
curl -s 'http://magicseaweed.com/Encuentro-Surf-Report/478/' | awk -F 'msw-js-fcc' '{print $2}' | grep '6am' | awk -F '6am' '{print $3}' | sed 's/"secondary":[^}]*//' | sed 's/"tertiary":[^}]*//' | awk -F '"' '{print ""$29" "$10"ft @ "$32"s | "$86" "$93""}' | sed 's/://g' | sed 's/,//g'; | |
# This will print today's 6am surf conditions in Encuentro | |
# formatted as: [swell.compassDirection] [swell.height] @ [swell.period]s | [wind.speed] [wind.direction] | |
# HOW TO ALTER TO YOUR LIKING: | |
# to change surf spot: change the number in the URL (http://.../478/) to the number of your beach | |
# to change time: change '6am' to 'noon' or '6pm' | |
# to change day: change '{print $3}' to another odd number (today = $3, tomorrow = $5, ...). Works until $17 i think.. | |
# You can always chain these commands with a ; at the end if you want to display more than one set of conditions | |
# SED print variables if you're interested | |
# $29 = swell compass direction | |
# $10 = height | |
# $32 = period | |
# $86 = wind.speed | |
# $93 = wind.direction |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment