sippey (owner)

Forks

Revisions

gist: 180057 Download_button fork
public
Description:
applescript for use with quicksilver to log text with date and timestamp
Public Clone URL: git://gist.github.com/180057.git
Embed All Files: show embed
readme.mkd #

This is a simple AppleScript designed for use with QuickSilver to log text to a file with a date and timestamp.

Instructions for use...

  • Edit the script to set your file path appropriately. Mine is set to write output to my "log.txt" file in my "taskpaper" folder under Dropbox.
  • Open up script editor, paste in the script.
  • Save it to your ~/Library/Application Support/Quicksilver/Actions folder as something like LogIt.scpt. If the actions folder doesn't exist, go ahead and create it.
  • Restart Quicksilver.
  • Invoke Quicksilver, type ".", type your text, TAB, type "LogIt", hit enter. Voila, your text is appended to your log file with the date & timestamp at the beginning of the line.

For bonus points, set the "Open With..." setting on your log file to always open with the Console app. That way, when you view this file, you'll have quick access tools for filtering and searching through the file.

LogIt.scpt #
1
2
3
4
5
6
7
8
9
10
11
12
13
using terms from application "Quicksilver"
on process text log_text
set theDate to (do shell script "date '+%m-%d-%Y %H:%M'")
set theText to log_text
set theText to theDate & " " & theText & "
"
set thePosixFilePath to "/Users/msippey/Dropbox/taskpaper/log.txt" as string
set theFilePath to POSIX file thePosixFilePath
set theFileReference to open for access theFilePath with write permission
write theText to theFileReference starting at eof
close access theFileReference
end process text
end using terms from