Posts Tagged gtd

用iCal的数据填充pomodoro

最近一段时间一直使用wunderlist管理todolist。使用番茄工作法工作。我用的是pomodoro这款番茄工作法软件。

我遇到的一个需求是想让wunderlist和pomodoro可以协同起来。很简单的需求,这都是由于pomodoro上的一个功能勾起来的。pomodoro它可以从thingsomnifocus(这是两款mac上很出名的日程管理软件,价格相当贵)里面获取出当天的日程安排填充到欲执行的工作安排里。

既然pomodoro没有提供这个功能,那么只要自己动手解决了。在applescript editor里面看了一下,pomodoro提供了

start text: Pomodoro name

的接口,可以设定一个pomodoro名字运行。不过天不遂人愿,wunderlist居然没有提供任何applescript可以操作的接口。

等wunderlist改版那要猴年马月。而且最近对于wunderlist提供功能一点小不满意,索性重新转到iCloud的reminder得了。reminder唯一的小遗憾是只能在apple设备上或者pc浏览器上使用。

说了这么多反正就是我从wunderlist转到reminder了。
我还改动了日程安排的方式:
1、任何想到的todo都记录到reminder中。
2、当天需要行动的todo都变成一个allday event放到calender。
3、当天做的事情都变成event写到calendar里面

然后我写了一个applescript脚本。当需要工作(广义的)的时候就是取出当天的allday event让我选择,然后以这个作为pomodoro name开始一个番茄钟。
附上源码:

	tell application "iCal"
		--获取当天的allday events
		set now to (current date)
		set nowTime to time of now
		set nowDate to now - (nowTime)
		set event_lists to (events whose start date = nowDate and allday event = true) of calendars

		set event_list to {}
		repeat with this_list in event_lists
			repeat with this_event in this_list
				set event_list to event_list & summary of this_event
			end repeat
		end repeat

	end tell
	set selected_event to {choose from list event_list}

	tell application "Pomodoro"
		set pomodoro to selected_event
		if selected_event = {false} then
			set pomodoro to ""
		end if
		start pomodoro
	end tell

, ,

No Comments

SetTextSize SetPageWidth