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:

  1. Open script editor and paste in the the script below.
  2. Change filePath to refer to where you want your logs to be kept note the use of the POSIX path and the trailing ":".
  3. 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:

  1. Load the Quicksilver panel (ctl+space normally)
  2. Press . to get a text pane
  3. Enter a note about the current task
  4. Press tab to switch to the actions pane
  5. 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:
  1. using terms from application "Quicksilver"
  2.     on process text theText
  3.         -- This is the directory your files live in. Don't forget the trailing :
  4.         set filePath to "Macintosh HD:Users:croucher:Documents:DailyLogs:"
  5.        
  6.         --Get today's date and time
  7.         set theDate to current date
  8.         set timeString to (time string of theDate)
  9.         set dateString to getNumericalDate(theDate)
  10.        
  11.         --set the target file to todays log in the log directory
  12.         set target_file to filePath & dateString & ".log"
  13.         --set the data to the time plus the message
  14.         set this_data to timeString & " " & theText & "
  15. "
  16.        
  17.         --open log file for writing
  18.         set the open_target_file to ¬
  19.             open for access file target_file with write permission
  20.         --write the data to the file
  21.         write this_data to the open_target_file starting at eof
  22.         --close the file
  23.         close access the open_target_file
  24.        
  25.     end process text
  26. end using terms from
  27.  
  28. to getNumericalDate(myDate)
  29.     if the month of myDate is January then
  30.         set numericalMonth to "01"
  31.     else if the month of myDate is February then
  32.         set numericalMonth to "02"
  33.     else if the month of myDate is March then
  34.         set numericalMonth to "03"
  35.     else if the month of myDate is April then
  36.         set numericalMonth to "04"
  37.     else if the month of myDate is May then
  38.         set numericalMonth to "05"
  39.     else if the month of myDate is June then
  40.         set numericalMonth to "06"
  41.     else if the month of myDate is July then
  42.         set numericalMonth to "07"
  43.     else if the month of myDate is August then
  44.         set numericalMonth to "08"
  45.     else if the month of myDate is September then
  46.         set numericalMonth to "09"
  47.     else if the month of myDate is October then
  48.         set numericalMonth to "10"
  49.     else if the month of myDate is November then
  50.         set numericalMonth to "11"
  51.     else if the month of myDate is December then
  52.         set numericalMonth to "12"
  53.     end if
  54.     return year of myDate & numericalMonth & day of myDate
  55. end getNumericalDate

Technorati Tags:
, , ,

Share and Enjoy:
  • del.icio.us
  • Digg
  • Ma.gnolia
  • Reddit
  • StumbleUpon

 
close Reblog this comment
blog comments powered by Disqus

Copyright © 2008 Kid666 Blog All rights reserved. Base theme by Laptop Geek.