How To Use TextMate As NetNewsWire’s External Blog Editor
October 8, 2007
0 Comments
I used to be an Ecto user but I have since seen the light and call TextMate my be-all-end-all blogging tool. The only thing I missed was being able to use Ecto as my external blog editor while reading feeds in NetNewsWire. Not anymore!
Thanks to the Circle Six Blog for the superior coding kung fu.
In TextMate, show the bundle editor and create two new commands:
Name: Determine Script Location
Save: Nothing
Command(s):
#!/usr/bin/env ruby -rjcode -Ku
%x{ osascript "#{ENV['TM_BUNDLE_SUPPORT']}/lib/blogselection.scpt” }
Input: None
Output: Insert as Text
Activation: Key Equivalent: ⌃⌥⌘5
Scope Selector: text.html
Name: Insert Quote from NetNewsWire
Save: Nothing
Command(s):
#!/usr/bin/env ruby -rjcode -Ku
print %{Place the file "blogselection.scpt" in #{ENV['TM_BUNDLE_SUPPORT']}/lib/ }
Input: None
Output: Show as HTML
Activation: Key Equivalent: ⌃⌥⌘5
Scope Selector: text.html
Now create and save the following Applescript. Click here to open the script in Script Editor.
Execute the first command to determine the script location. That’s all for the setup.
Now, whenever you find something in NetNewsWire that you want to quote, tab over to TextMate, open a new blog post (HTML), and run the command (⌃⌥⌘5).
If you want to be notified the next time I post something, sign up for email alerts or subscribe to my RSS feed. Thanks for visiting!




(2 votes, average: 5 out of 5)
I’m a Facebook fanatic. I joined immediately after they opened to the public. In the beginning, there wasn’t much to talk about. None of my friends had joined and there really wasn’t that much I could do there. But since then, the buzz has caught my friends’ attention and Facebook’s extendibility has grown consistently, giving me a lot to play with.
Since I’ve been catching myself updating both Facebook and Twitter separately, I figured I should revisit my workflow and see if I can tweak my current level of automation.
It wasn’t difficult. I just added a couple lines of code to iQuickTwitter and now I can update Twitter, Facebook, iChat, and Skype with a single command. If you dig it, be my friend and let me know.
Graham English @ Facebook
Graham English @ Twitter
Click here to open the script in Script Editor.
If all you want is to update Facebook with Quicksilver, try this:
Click here to open the script in Script Editor.
If you try to please everyone, somebody is not going to like it.




(1 votes, average: 5 out of 5)My New Method Of Automated Journaling
June 11, 2007
0 Comments
I’ve been hacking this auto-journal script for a while and I’ve recently settled on using a local install of WordPress combined with AppleScript and Quicksilver. It’s really pretty easy.
Follow MacZealots’ tutorial on Installing WordPress on Tiger. If you have any trouble along the way, you might need to check out Mac OS X Server 10.4.4: Improvements to Apache/PHP/MySQL interaction. Now you’ve got a local install of WordPress that you can dress up.
Now you’ll want to save this applescript as a ‘Stay Open’ application and set your options. If you want Growl support to work, you’ll either need to save it with the name “WordPress Journal” or modify the Growl tell in the script. I have it set to ask me what I’m doing every 15 minutes during regular work hours and every 30 minutes thereafter.
There may be times when you don’t want to use the automatic functions but you would still like to send something to your journal. For this, I’ve also created a Quicksilver action. Save this applescript in your Quicksilver actions folder. Again, if you want Growl support, save it with the name “WordPress Blog” or modify the Growl tell in the script. Now all you do is call Quicksilver, enter text mode and type your journal entry, tab over and type as much of “WordPress Blog” as you need, and hit Return.
Of course, you could use a remote version of WordPress if you don’t like the idea of installing it locally. But for privacy, it’s probably best to keep it on your own machine.
Ambition is a poor excuse for not having sense enough to be lazy.
– Charlie McCarthy




(1 votes, average: 4 out of 5)Automating The Quality Of Your Attention
May 4, 2007
3 CommentsI’ve been thinking more and more about focus. So much competes for my attention second by second (that’s you, Twitter and BlackBerry) that it’s never been more important to practice sustaining focus. The quality of my consciousness and the quality of my attention determine the quality of my life.
What needs to remain a touchstone in our conversations is the practice of gaining and keeping greater awareness and control of our minds, so we can exercise greater control of our world. But since I can’t seem to control the world at the moment–Believe me, I try–I’ll stick to what I know best, controlling my computer.
Since controlling your attention can be very tricky–after all, your attention has to remember to control itself–I’ve created some simple attention reminders. That way, your mind will be free for more creative pursuits.
The Qualities of Attention
Focus
One of the most effective methods for attaining an optimum level of concentration involves synchronizing your breathing and your focus of attention. As you inhale, imagine that your attention is a bright spotlight focused inward upon yourself. When you exhale, imagine that you can shine this powerful beam in whatever direction you choose.
Breathe in and focus, then breathe out and direct your complete attention on your chosen target…
Focus…direct…Focus…direct
Practicing focus this way, you can turn every distraction into a reminder. When Growl notifications pop up, inhale as you read, imagining that bright spotlight of attention. Then direct your attention back to your work.
Flow
One of the foundations of a focused state is the continuity of attention flowing effortlessly from moment to moment. To get a feeling for this, focus your attention on your breath right here and now in the present moment. As you inhale and exhale, notice your awareness flowing like an unbroken stream into this very moment. If the continuity of your concentration is broken, return to the breath and let your awareness flow.
Here’s a practical exercise for work. First, choose the focus of your attention. It can be an idea you’re brainstorming or an assignment you’re working on. As you inhale, allow the focus of your attention to become more vivid. Enhance the submodalities. As you exhale, feel your attention flowing toward the object or idea you’ve targeted, bringing more energy to your work.
Your continuous flow of breath can help you create an ongoing flow of attention. If you feel your attention wandering, use your next breath to refocus your attention, and then let it flow again. Better yet, condition your most persistent distractions, like Growl notifications, to remind you to come back to your breath.
Flexibility
Flexibility is your best friend if you decide not to, or if you can’t, turn off every distraction around you. Here’s a simple and practical method for enhancing your flexibility of thought. First, select a primary “anchor” for your attention. Maybe a document, something you’re planning, or another piece of work. Focus your total concentration on that anchor. Now, intentionally shift your attention away from your anchor onto something else. Remember to use your breathing as an aid in directing your attention. After a moment of concentration on the new target you’ve selected, shift your attention back to the original anchor.
Do this for a few minutes, alternating your attention between your anchor and a selection of sights or sounds around you. This exercise is great practice if you listen to music as you work. Being a musician, iTunes could steal most of my attention if I didn’t make it a practice of conscious flexibility.
Mindfulness
Mindfulness is the ability to consciously perform all of your activities, including everyday, automatic things like breathing, walking, and especially, thinking. Mindfulness informs you whether you’re clear and calm, dull and sleepy, or alert and aware. It’s mindfulness practice that brings your mind under control and to a state of rest.
A useful practice to build mindfulness is to create concise mental labels for the objects of your attention. For example, if you’re tired, label the experience, “tired.” When you hear the construction crew outside your office window jackhammering, label it, “jackhammer.” You can label your bodily, emotional, and mental experiences as well as your external objects of focus. As soon as you notice that your attention has shifted, see how quickly you can mentally label the object of your attention.
Automating Your Attention
This wouldn’t be complete if I didn’t provide you with some tool to put improving your attention into practice. I created an AppleScript that gives you a random attention reminder using Growl. The script itself includes four messages based on the above article. How you trigger the script is up to you. I chose cron but you could just as easily set up an iCal reminder or have a program like FlexTime run the script.
Here’s how it works.
- First, you must have Growl installed. Once Growl is installed and after you set up the script, check out the settings in your System Preferences. For this particular script, I prefer the ‘Music Video’ notification.
- Open the attention script in Script Editor by clicking here. Save it here:
/Library/Scripts/NameOfFile.scpt - Rename NameOfFile to whatever you choose (I named it ‘Attention.scpt’).
- Determine how often you want to be reminded to observe your attention. I chose every 15 minutes.
- Open Terminal, and type this:
sudo pico /etc/crontabWhen prompted, type your administrator password.
- Use the arrow keys to navigate to the bottom of the pico window, and add this line:
0,15,30,45 * * * * YourUserName osascript /Library/Scripts/NameOfFile.scptThis list tells cron to run the script every 15 minutes every day of the week.
- Press Control-X to exit pico.
- Wait patiently for the script to run. Every 15 minutes, you’ll get an unobtrusive Growl notification giving you a nice attention reminder with some helpful advice.
If you need more assistance with cron, check these resources that I found helpful:
Using cron to run programs on a schedule
Mac OS X and Unix tips and tricks
Learning the Terminal in Jaguar
*If you screw anything up, I accept no responsibility. But don’t let that scare you.
If you want to run the script using iCal, make sure the script is saved as an Application. Create a new calendar (Option-⌘-N) and name the calendar Scripts. Create a new event (⌘-N) and name it. In the Alarm section of the Info pane, choose “Open file.” Select the AppleScript application and adjust the schedule using the lower pop-up menu. If you want iCal to trigger the script at regular intervals, choose an interval from the “repeat” pop-up menu.
Now your attention is on auto-pilot. These short reminders are more than interruptions, they are grist for the mill; an opportunity to practice flexibility.
The script itself is easy to edit. Once you feel you’ve made these attention strengthening practices a habit, you could modify the script to remind you of other important things. Add a mantra or a reminder to stretch every now and then. You can have a lot of fun with this script.
“I have learned silence from the talkative, toleration from the intolerant, and kindness from the unkind.
– Kahlil Gibran”
I have learned to pay attention from the inattention.




(1 votes, average: 5 out of 5)
I got really tired of updating my online status on Skype and iChat every time I had to step away from my computer. I thought to myself, wouldn’t it be cool if I could update all my instant message apps at once with a few keystrokes using Quicksilver?
Here’s what I cooked up. Call Quicksilver, type “a” (for away), tab, type “im” and hit enter. When you come back, do the same thing but type “o” (for online).
How to install:
- Download the IM Status script, unzip, and put it here:
~/Library/Application Support/Quicksilver/Actions - Restart Quicksilver.
- Note: If you want to integrate with Adium, open the script in Script Editor and uncomment the Adium tell (remove “–”).
How to use:
- Invoke Quicksilver.
- Enter text mode (hit period) and type either “a” for away or “o” for online.
- Tab to the Action Pane and type “IM Status” (or as much of the word as you need).
- Enter.
Deliver yesterday, code today, think tomorrow.
Update 05-08-07: I made a change to the way I use this script. Since I like to set the status and the message when I come and go, I’ve updated the script to do this. I’m leaving v1.0 alone but you can click here to open IM Status v1.1 in Script Editor.
Update 08-11-07: If you want to update Facebook, see this post: Update Twitter, Facebook, iChat, Adium, And Skype With Quicksilver




(1 votes, average: 5 out of 5)