2007.07.15

Being able to trigger things in the future using QuickSilver is very useful. Who needs to bother with those shareware iTunes alarms? Just point QuickSilver to a playlist and tell it to run it at a certain time. The power of this little piece of software really is mind-blowing sometimes. 2007-07-15T22:05:53ZUntitled entry permalink

Using oxygen from the command line 2007-07-15T17:36:01ZTitled entry permalink

I spend a lot of time at the command line, and I always end up doing stupid things like trying to edit XML files in SubEthaEdit or, worse, nano. It's stupid, because I've got this gigantic, fully-featured XML editor on my desktop. But because it's less mental effort to type "see foo.xml" than to go to my Dock, click Oxygen and then navigate the OS X tree to find it, I never bother.

Today I thought I may as well set up bash to let me edit stuff in Oxygen. On the Mac, Oxygen has a shell script - 'oxygenMac.sh' - but it does some silly crap with the current working directory.

I've written a script called oxygen.py which you should be able to use. To install it, put it in ~/bin or wherever else you run your scripts from.

I've edited my .bash_profile to add an alias:

alias oxygen="python /Users/tom/code/oxygen.py "

You can use this from the command line in two ways:

oxygen [filename]

or by piping in data as STDIN

If you specify a filename, Oxygen will open that file. If you do not specify a filename, STDIN will be read in to a temporary file, and that will be opened in Oxygen.

Total programming time? Half an hour or so. Amount of time saved? Quite a lot, hopefully.

Tags: , ,

Comments | TrackBack

Links from del.icio.us

 

Login with your OpenID:
No. 618
Tom Morris
Currently in: East Sussex, England
Usually in: East Sussex, United Kingdom
AIM: tommorris
YIM: tom.morris

I am a , an , like to code in and noodle about with and the . I also have a BA in philosophy from London, and am in preparation for an MA. My philosophical interests are in Victorian-era German philosophy, Kierkegaard, Robert Nozick, hermeneutics and current approaches to the demarcation problem in the philosophy of science. Musically, I like jazz fusion, soul and P-Funk. My musical nirvana would be a mixture of Beethoven, Miles Davis and George Clinton topped with a side-serving of Erykah, Jill and Angie.

Elsewhere:

  • GPG Key
  • del.icio.us
  • Flickr
  • Twitter
  • digg
  • Jaiku
  • LinkedIn
  • ma.gnolia
  • blip.tv
  • upcoming.org
  • MetaFilter
  • LiveJournal
  • CiteULike
  • Technorati Profile

RSS Feed Subscribe:

RDF

« July 2007 »
SuMoTuWeThFrSa
1234567
891011121314
15161718192021
22232425262728
293031 

View in month context

On this day in: 2006