Skip to content

Instantly share code, notes, and snippets.

@carlosefonseca
Created October 11, 2011 22:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save carlosefonseca/1279642 to your computer and use it in GitHub Desktop.
Save carlosefonseca/1279642 to your computer and use it in GitHub Desktop.
Automator service to tweet something from LaunchBar or something like it
Automator > Service
===================
* Put the code bellow inside a "Run Shell Script" action
** Change the paths to TTYtter and growl
** TTYtter: http://www.floodgap.com/software/ttytter/
** growl.sh: http://hints.macworld.com/dlfiles/growl_sh.txt
cat > ~/Library/Caches/tn.cache
AAA=`wc -m ~/Library/Caches/tn.cache | awk '{print $1}'`
if [ $AAA -le 144 ]; then
BB=`cat ~/Library/Caches/tn.cache | /Users/carlos/Code/TTYtter.pl -status=-`;
/Users/carlos/Code/growl.sh -nosticky "$BB";
else
/Users/carlos/Code/growl.sh -nosticky "You have $((AAA-144)) chars in excess.";
fi
@carlosefonseca
Copy link
Author

I use this service in LaunchBar. I just type "TN" on LB to select TweetNow (the name I gave to the service), press enter/space, write my tweet and enter to send.

This version has growl support for notify when the text is too big.

For it to work, TTYtter has to be configured first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment