Comments
Quicksilver; Agile Scruming; Laziness
Posted by sh1mmer on Dec 28, 2006 in Mac
At Yahoo! we use Scrum as part of our development process. While I really like Scrum, what it means for me personally is that I have to write a daily report of what I have been working on counted to the half hour.
Since I like to do everything with Quicksilver I've written a custom action which logs text to a daily log file. This allows me to leave myself time-stamped notes about what I have been doing throughout the day.
Installation:
- Open script editor and paste in the the script below.
- Change filePath to refer to where you want your logs to be kept note the use of the POSIX path and the trailing ":".
- Save the script to "~/Library/Application Support/Quicksilver/Actions/" with the name of whatever you want your text action to be with the extension .scpt. Mine is "log.scpt".
Usage:
- Load the Quicksilver panel (ctl+space normally)
- Press . to get a text pane
- Enter a note about the current task
- Press tab to switch to the actions pane
- Select log (or whatever you named your action)
The logs will appear in the directory you specified during installation in files named by date. By default they will open in console.app.
APPLESCRIPT:
-
using terms from application "Quicksilver"
-
on process text theText
-
-- This is the directory your files live in. Don't forget the trailing :
-
set filePath to "Macintosh HD:Users:croucher:Documents:DailyLogs:"
-
-
--Get today's date and time
-
set theDate to current date
-
set timeString to (time string of theDate)
-
set dateString to getNumericalDate(theDate)
-
-
--set the target file to todays log in the log directory
-
set target_file to filePath & dateString & ".log"
-
--set the data to the time plus the message
-
set this_data to timeString & " " & theText & "
-
"
-
-
--open log file for writing
-
set the open_target_file to ¬
-
open for access file target_file with write permission
-
--write the data to the file
-
write this_data to the open_target_file starting at eof
-
--close the file
-
close access the open_target_file
-
-
end process text
-
end using terms from
-
-
to getNumericalDate(myDate)
-
if the month of myDate is January then
-
set numericalMonth to "01"
-
else if the month of myDate is February then
-
set numericalMonth to "02"
-
else if the month of myDate is March then
-
set numericalMonth to "03"
-
else if the month of myDate is April then
-
set numericalMonth to "04"
-
else if the month of myDate is May then
-
set numericalMonth to "05"
-
else if the month of myDate is June then
-
set numericalMonth to "06"
-
else if the month of myDate is July then
-
set numericalMonth to "07"
-
else if the month of myDate is August then
-
set numericalMonth to "08"
-
else if the month of myDate is September then
-
set numericalMonth to "09"
-
else if the month of myDate is October then
-
set numericalMonth to "10"
-
else if the month of myDate is November then
-
set numericalMonth to "11"
-
else if the month of myDate is December then
-
set numericalMonth to "12"
-
end if
-
return year of myDate & numericalMonth & day of myDate
-
end getNumericalDate
Technorati Tags:
Quicksilver, AppleScript, Scrum, Mac