Use Applescript to post to Pastie

March 7th, 2008

Using the same code as my last post I’ve been trying to create an Applescript I can use to post to pastie using TextExpander.

Trouble is, as I’m very short on time and not an Applescript developer I’ve not been able to find out how to post to Pastie and preserve line breaks so the formatting comes out incorrectly (often all on one line).

If anyone would care to glance over this script its in dire need of some proper encoding, and obviously something to grep out the actual pastie number and construct a URL to return from the script.

Check out some loose code I’ve been playing with over at Pastie


Use TextExpander to create a TinyUrl

March 7th, 2008

I’m a big TextExpander user, so much so that I always find myself typing strange key combinations to do things even when I’m not on my own machine. Whilst I do appreciate that unix has a perfectly good alias command that could be used instead, I like that my text shortcuts work even when I’m ssh’d into a remote machine (TextExpander is just watching your keyboard input and converting it as you type).

Recently I’ve found myself doing a lot of TinyUrl links (mainly because of Twitter) and decided to knock up an Applescript to instantly convert whatever is on my clipboard into a tiny url as I type.

Go and check out the code on pastie – once you’ve got this its just a case of creating a new Applescript snippet in TextExpander and pasting in this code.

Update: I got linked from the SmileOnMyMac Blog (developers of TextExpander) – thanks guys! Glad you like the tip :) They also have a pre-packaged version of my script ready to download straight into TextExpander so head over there to get hold of it.

Another Update: Looks like Jack-Daniyel Strong devised a much nicer version of my applescript that is faster, and has error checking. Nice work! I’m now using his script :)


Slife

February 23rd, 2007

Slife is the new awareness browser for the Mac OS X that lets you visualize your computer activities like never before.

Slife is a cool little Mac OS X time browser that tracks the apps you use and lets you get a historical view of your productivity. I’m giving Slife a try whilst I work on some client projects to check that I’m using my time wisely. They have an online service as well called SlifeShare – even though they go to lengths to protect your privacy (not taking an email address from you or a name), I’m not sure I can see the immediate value in uploading all my details to the web. I’m sure this would be a very good tool for creating a Nielsens type rating system for Mac software – taking a cross section of Mac users and their usage habits. It’s not that I necessarily think my data is going to be abused, it’s just I don’t see the value in uploading it at the moment.

The Slife interface is nice, quite clean and features a Menu Extra that allows you to choose which project you are currently working on and then track your usage habits whilst working on a certain project. One thing I don’t see at the moment is some funky visualisation of my data, no graphs/charts/stats that are interesting or pretty to look at, the main view shows little dots to indicate activity for a certain app over time but I can’t help think that there needs to be more than this in order for the app to be really useful.

All in all, well worth trying out.

I have created a TextMate scriptlet to grab the name and path of the current document in TextMate and log it to Slife. TextMate Scriptlet