Fan Zhen Coder & Teacher

配置 OmniFocus 管理阅读及复习

2015-03-08

参考 OmniFocus Premium Posts 18:MANAGING CONTENT CONSUMPTION,并做了改进,添加了重复事件。具体配置如下:

  • 新建上下文 ReadRead Later,其中 Read Later 的状态是暂停
  • Personal下面,新建文件夹 Books and Media
  • Books and Media 下面,新建两个项目 Books & MediaBooks & Media Review,前一个用来放置要读的书和看的视频,后一个用来复习。用检查器把它们都设置成单个动作列表。
  • Books & Media项目中,把当前要看的书,设定上下文为Read,添加动作,并用检查器设置设置开始时间,比如今天7点,然后设定重复频率为1d(一天),其它未来要看的书,设定上下文为Read Later

如图

  • 复习action放到Books & Media Review中,设定复习时间。如果需要用艾宾浩斯记忆曲线,要安装相应的 AppleScript 来方便设定,脚本如下:

      -- Ebbinghaus review scheduler
      -- schedules tasks for reviewing learned material in spirit of Ebbinghaus forgetting curves
      -- Bill Palmer, February 2013
    	
      property pReviewProject : "Books & Media Review" -- name of project which will receive tasks
      property pReviewIntervals : {3, 3 * 7, 3 * 30, 365, 2 * 365} -- number of days before each repeat, augment as desired
      property pReviewDaysUntilDue : 2 -- allow two days after start date for completion
      property pAutoSave : false -- set this to false for faster performance but slightly more risk
    	
      on GetDefaultDueTime()
          tell application id "OFOC" to tell front document to set timeStr to value of setting id "DefaultDueTime"
          set {otid, text item delimiters} to {text item delimiters, ":"}
          set {dueHour, dueMin, dueSec, text item delimiters} to every text item in timeStr & otid
          return (((dueHour * 60) + dueMin) * 60 + dueSec)
      end GetDefaultDueTime
    	
      on ProcessAction(selAction, dstProject, dateToday, dueTimeOffset)
          local startDate, dueDate, i
          tell application id "OFOC"
              repeat with i from 1 to (length of pReviewIntervals)
                  set newAction to duplicate selAction to end of tasks of dstProject
                  set startDate to dateToday + (item i of pReviewIntervals) * days
                  set dueDate to startDate + pReviewDaysUntilDue * days + dueTimeOffset
                  tell newAction to set {start date, due date, completed} to {startDate, dueDate, false} -- if user already completed original, we need to make duplicate active
              end repeat
          end tell
      end ProcessAction
    	
      on run {}
          set dateToday to (current date) - (time of (current date))
          set dueTime to my GetDefaultDueTime()
          tell application id "OFOC"
              tell front document
                  tell content of first document window
                      set lstSelected to value of (selected trees where class of its value is task)
                      if ((count of lstSelected) = 0) then
                          display alert "No suitable tasks in selection"
                          return
                      end if
                  end tell
                  try
                      set dstProject to first flattened project whose name is pReviewProject
                  on error
                      display alert "Could not find destination project \"" & ¬
                          pReviewProject & "\""
                      return
                  end try
                  set oldWillAutosave to will autosave
                  set will autosave to pAutoSave
                  try -- catch any errors and restore autosave setting
                      repeat with thisOne in lstSelected
                          my ProcessAction(thisOne, dstProject, dateToday, dueTime)
                      end repeat
                  end try
                  set will autosave to oldWillAutosave
              end tell
          end tell
      end run
    

Comments