My Geektool geeklet has mysteriously stopped working
October 2, 2014 3:48 PM   Subscribe

I've been running Geektool on my iMac for years and suddenly one of my geeklets has stopped working for no apparent reason. It runs a command using curl that grabs text from a website and formats it. Oddly enough it works fine from a Terminal window.

This is the command:
url -s http://www.dailyzen.com/ | sed -n "/<>/,/<>/p" | sed -e "s/<>]*>//g" | strings| fold -sw60

I don't recall exactly when it stopped working since sometimes dailyzen.com was down from my location.

Ideas?

Version info:

Mac OS X 10.9.5
Geektool 3.1.1
curl 7.37.1
posted by tommasz to Computers & Internet (12 answers total) 2 users marked this as a favorite
 
url or curl?
posted by a lungful of dragon at 4:19 PM on October 2, 2014


Hm, that command (replacing 'url' with 'curl') returns nothing for me in Terminal. It seems that it's that first sed instance that is causing the problem, as removing it but leaving the rest at least returns the page in question.
posted by destructive cactus at 4:45 PM on October 2, 2014


Response by poster: It's curl. I didn't notice the missing 'c'.
posted by tommasz at 5:25 PM on October 2, 2014


What is it supposed to output at the terminal window? On my terminal running either bash or sh (on os x , linux, and horrifically old solaris) it gives nothing.
posted by NormieP at 5:50 PM on October 2, 2014


Is:


sed -n "/<>/,/<>/p


really what's in your script or is it getting mangled when you passed it into the text entry field?

I hacked a version of this (with a few changes to the delimiters specified in the first sed command) and it worked, but part of it got stripped out when I pasted it into the comment box.

Anyway, I have a version that works, I'm just not able to paste it here.

See:

http://pastebin.com/UBwbx2P1

Edit: Works from terminal, not geektool, which I don't have.
posted by NormieP at 6:00 PM on October 2, 2014


JWZ reported sandboxing problems with one of his Automator scripts last week. Would it have failed for you after upgrading to 10.9.5?
posted by wotsac at 8:47 PM on October 2, 2014


Response by poster: It works fine in Terminal. And I know it worked when I first upgraded to Mavericks. Here's the typical output:
When the master
Without a word raises his eyebrows
The posts and rafters
The cross beams and roof tree
Begin to smile
There is another place for conversing
Heart to heart
The full moon and the breeze
At the half-open window.
It's supposed to dump a bit of text that's scraped from the site. I just tried it on my Linux (Ubuntu 14.04) box here are work and my version also fails to output anything due to something with the initial sed command.

NormieP, your version does work on my Linux box and I will try that version when I get home.
posted by tommasz at 6:05 AM on October 3, 2014


Response by poster: Wow, it still doesn't work in Geektool and now the original doesn't work in Terminal. But the version does. It may be time to surrender.
posted by tommasz at 2:11 PM on October 3, 2014


I installed geektool (3.1.1) on a mac at work, I had to install the developer tools to get strings, but after that it worked fine (I only tried my version of the command).

Of note was that the machine was on OS X version 10.9.4. I'm patching to 10.9.5 and will let you know if it still works.
posted by NormieP at 2:42 PM on October 3, 2014


Still works after the upgrade.

The only difference I can see at this point is that my version of curl is 7.30.0. Not sure how you ended up with a higher version though unless you installed something non-standard.

I exported the geeklet and the contents of the .glet file can be found here:

http://pastebin.com/ZwLXjK95
posted by NormieP at 2:59 PM on October 3, 2014


Response by poster: I tried your pastbin version and it works in Terminal but not in Geektool. It's clearly something in Geektool.

My curl version is different because I have MacPorts installed. My sed is standard version.
posted by tommasz at 5:29 AM on October 5, 2014


Response by poster: Well, I updated MacPorts and lo and behold, it works again. I should have done that before I whined about it.
posted by tommasz at 8:48 AM on November 15, 2014


« Older Hunger makes me a modern girl: food restriction...   |   That Funky Lunchbox Smell Newer »
This thread is closed to new comments.