al3x (owner)

Revisions

gist: 100795 Download_button fork
public
Public Clone URL: git://gist.github.com/100795.git
Embed All Files: show embed
new_journal_entry.rb #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/ruby
 
# assumes the user has configured a TextMate project that
# points to the directory full of journal entry files
 
require 'date'
require 'fileutils'
 
date = Date.today
entry = "/Volumes/Personal/journal/#{date.to_s}.textile"
 
FileUtils.touch(entry)
system("mate", "-a", entry)
 
`osascript -e 'tell app "Finder" to activate' &>/dev/null &`
`osascript -e 'tell app "TextMate" to activate' &>/dev/null &`