Created
May 2, 2011 03:43
-
-
Save gilesbowkett/951157 to your computer and use it in GitHub Desktop.
real writers journal in vim
This file contains hidden or 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
| #!/opt/local/bin/ruby | |
| # supa primitive script to access today's journal entry text file | |
| now = Time.now | |
| month = now.month.to_s | |
| month = "0" + month if month.to_i < 10 | |
| day = now.mday.to_s | |
| day = "0" + day if day.to_i < 10 | |
| date = month + day + now.year.to_s[2,3] | |
| system("vi /Users/giles/Documents/Journal/#{now.year}/#{date}.txt") |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
just in case anybody's reading this, I don't keep my Ruby in /opt/local any more...