Created
October 11, 2011 22:21
-
-
Save carlosefonseca/1279642 to your computer and use it in GitHub Desktop.
Automator service to tweet something from LaunchBar or something like it
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
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.